diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2011-06-07 22:30:03 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2011-06-13 00:58:45 +0200 |
commit | 9649dd7ef0bc55a027219347734b2bb13fe0fc71 (patch) | |
tree | 03cc70b6e89ab3307bb38d63703b49c1fe49e22a /tests/gem_stress.c | |
parent | e0532d4eb0192f62d2fed29a67b830f122f356c2 (diff) |
gem_stress: option to override the number of rounds to complete
gem_stress -c 1
... sometimes takes a while to hit a problem.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/gem_stress.c')
-rw-r--r-- | tests/gem_stress.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/gem_stress.c b/tests/gem_stress.c index d098a9b19..c143431e3 100644 --- a/tests/gem_stress.c +++ b/tests/gem_stress.c @@ -617,7 +617,8 @@ static void parse_options(int argc, char **argv) {"disable-render", 0, 0, 'r'}, {"untiled", 0, 0, 'u'}, {"x-tiled", 0, 0, 'x'}, - {"use-cpu-maps", 0, 0, 'm'} + {"use-cpu-maps", 0, 0, 'm'}, + {"rounds", 1, 0, 'o'}, }; options.scratch_buf_size = 256*4096; @@ -629,8 +630,9 @@ static void parse_options(int argc, char **argv) options.use_blt = 1; options.forced_tiling = -1; options.use_cpu_maps = 0; + options.total_rounds = 512; - while((c = getopt_long(argc, argv, "ds:g:c:t:rbuxm", + while((c = getopt_long(argc, argv, "ds:g:c:t:rbuxmo:", long_options, &option_index)) != -1) { switch(c) { case 'd': @@ -691,6 +693,10 @@ static void parse_options(int argc, char **argv) options.forced_tiling = I915_TILING_NONE; printf("disabling tiling\n"); break; + case 'o': + options.total_rounds = atoi(optarg); + printf("total rounds %i\n", options.total_rounds); + break; default: printf("unkown command options\n"); break; @@ -816,7 +822,7 @@ int main(int argc, char **argv) fan_out(); - for (i = 0; i < 512; i++) { + for (i = 0; i < options.total_rounds; i++) { printf("round %i\n", i); if (i % 64 == 63) { fan_in_and_check(); |