diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2015-03-26 08:11:43 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2015-03-26 08:15:19 +0000 |
commit | 7763349a9a878ca58de4fb559edcbf81040da07b (patch) | |
tree | f373c328ad78b8645d545aa5ec19a930ed9fe7ae | |
parent | c666a19e0c16821a1ccd2a2ea7dda549d19c67d1 (diff) |
igt/gem_concurrent_blit: Separate out the combinatorial explosion
Apparently nobody else likes testing and debugging GEM coherency issues.
However, this also means that QA is skipping these vital tests. Split
out a set of canaries into igt/gem_concurrent_blit and keep the rest in
igt/gem_concurrent_all.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89497
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | lib/igt_core.c | 5 | ||||
-rw-r--r-- | lib/igt_core.h | 1 | ||||
-rw-r--r-- | tests/.gitignore | 1 | ||||
-rw-r--r-- | tests/Makefile.am | 2 | ||||
-rw-r--r-- | tests/Makefile.sources | 1 | ||||
-rw-r--r-- | tests/gem_concurrent.c (renamed from tests/gem_concurrent_blit.c) | 27 |
6 files changed, 28 insertions, 9 deletions
diff --git a/lib/igt_core.c b/lib/igt_core.c index 61b3a338..7c68d4eb 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -248,6 +248,11 @@ static struct { } log_buffer; static pthread_mutex_t log_buffer_mutex = PTHREAD_MUTEX_INITIALIZER; +const char *igt_test_name(void) +{ + return command_str; +} + static void _igt_log_buffer_append(char *line) { pthread_mutex_lock(&log_buffer_mutex); diff --git a/lib/igt_core.h b/lib/igt_core.h index 07160009..33f89406 100644 --- a/lib/igt_core.h +++ b/lib/igt_core.h @@ -202,6 +202,7 @@ bool igt_only_list_subtests(void); static void igt_tokencat(__real_main, __LINE__)(void) \ +const char *igt_test_name(void); void igt_simple_init_parse_opts(int *argc, char **argv, const char *extra_short_opts, struct option *extra_long_opts, diff --git a/tests/.gitignore b/tests/.gitignore index 35b32895..843db4aa 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -21,6 +21,7 @@ gem_bad_reloc gem_basic gem_caching gem_close_race +gem_concurrent_all gem_concurrent_blit gem_cpu_reloc gem_cs_prefetch diff --git a/tests/Makefile.am b/tests/Makefile.am index 5efc8d8c..0ae2541e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -52,6 +52,8 @@ gem_ctx_basic_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS) gem_ctx_basic_LDADD = $(LDADD) -lpthread gem_ctx_thrash_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS) gem_ctx_thrash_LDADD = $(LDADD) -lpthread +gem_concurrent_all_SOURCES = gem_concurrent.c +gem_concurrent_blit_SOURCES = gem_concurrent.c gem_fence_thrash_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS) gem_fence_thrash_LDADD = $(LDADD) -lpthread gem_fence_upload_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS) diff --git a/tests/Makefile.sources b/tests/Makefile.sources index 798cb75e..0a974a64 100644 --- a/tests/Makefile.sources +++ b/tests/Makefile.sources @@ -23,6 +23,7 @@ TESTS_progs_M = \ gem_caching \ gem_close_race \ gem_concurrent_blit \ + gem_concurrent_all \ gem_cs_tlb \ gem_ctx_param_basic \ gem_ctx_bad_exec \ diff --git a/tests/gem_concurrent_blit.c b/tests/gem_concurrent.c index e6214640..3a7ab7f0 100644 --- a/tests/gem_concurrent_blit.c +++ b/tests/gem_concurrent.c @@ -27,9 +27,9 @@ * */ -/** @file gem_concurrent_blit.c +/** @file gem_concurrent.c * - * This is a test of pread/pwrite behavior when writing to active + * This is a test of pread/pwrite/mmap behavior when writing to active * buffers. * * Based on gem_gtt_concurrent_blt. @@ -57,11 +57,12 @@ #include "intel_io.h" #include "intel_chipset.h" -IGT_TEST_DESCRIPTION("Test of pread/pwrite behavior when writing to active" +IGT_TEST_DESCRIPTION("Test of pread/pwrite/mmap behavior when writing to active" " buffers."); int fd, devid, gen; struct intel_batchbuffer *batch; +int all; static void nop_release_bo(drm_intel_bo *bo) @@ -908,7 +909,7 @@ run_basic_modes(const struct access_mode *mode, { "blt", blt_copy_bo, bcs_require }, { "render", render_copy_bo, rcs_require }, { NULL, NULL } - }, *p; + }, *pskip = pipelines + 3, *p; const struct { const char *suffix; do_hang hang; @@ -922,7 +923,10 @@ run_basic_modes(const struct access_mode *mode, struct buffers buffers; for (h = hangs; h->suffix; h++) { - for (p = pipelines; p->prefix; p++) { + if (!all && *h->suffix) + continue; + + for (p = all ? pipelines : pskip; p->prefix; p++) { igt_fixture { batch = buffers_init(&buffers, mode, fd); } @@ -1052,11 +1056,13 @@ run_basic_modes(const struct access_mode *mode, static void run_modes(const struct access_mode *mode) { - run_basic_modes(mode, "", run_single); + if (all) { + run_basic_modes(mode, "", run_single); - igt_fork_signal_helper(); - run_basic_modes(mode, "-interruptible", run_interruptible); - igt_stop_signal_helper(); + igt_fork_signal_helper(); + run_basic_modes(mode, "-interruptible", run_interruptible); + igt_stop_signal_helper(); + } igt_fork_signal_helper(); run_basic_modes(mode, "-forked", run_forked); @@ -1069,6 +1075,9 @@ igt_main igt_skip_on_simulation(); + if (strstr(igt_test_name(), "all")) + all = true; + igt_fixture { fd = drm_open_any(); devid = intel_get_drm_devid(fd); |