[PATCH i-g-t 4/5] DO_NOT_MERGE: gem_concurrent_all: limit scope of test

Kamil Konieczny kamil.konieczny at linux.intel.com
Wed Feb 2 17:49:31 UTC 2022


DO NOT MERGE: limit the scope of test to minimal one and
make it behave like gem_concurrent_blit. Make it with ifdefs
because even for named tests there are executed some parts
like pinning, which in turn take a few minutes to complete
despite the fact they are doing nothnig due to name mismatch
in following HAX patch. Second reason is I want to test
gem_concurrent_blit, but that one is really gem_concurrent_all
with one check for its executable name, so the easiest way
is to disable this check.
With this ./gem_concurrent_all --run '4KiB-tiny-gpu-*' takes
about 40s instead of minutes.

Signed-off-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
Cc: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
---
 tests/i915/gem_concurrent_all.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/tests/i915/gem_concurrent_all.c b/tests/i915/gem_concurrent_all.c
index fbb6578b..bb20edc2 100644
--- a/tests/i915/gem_concurrent_all.c
+++ b/tests/i915/gem_concurrent_all.c
@@ -1766,6 +1766,9 @@ num_buffers(uint64_t max,
 	return n;
 }
 
+#define ONLY_TINY_TESTS
+#define ONLY_BLIT_TESTS
+
 igt_main
 {
 	const struct access_mode modes[] = {
@@ -1880,15 +1883,17 @@ igt_main
 		{ "16MiB", 2048, 2048 },
 		{ NULL}
 	};
-
+#ifndef ONLY_TINY_TESTS
 	uint64_t pin_sz = 0;
 	void *pinned = NULL;
+#endif
 	char name[80];
 	int count = 0;
 
+#ifndef ONLY_BLIT_TESTS
 	if (strstr(igt_test_name(), "all"))
 		all = true;
-
+#endif
 	igt_fixture {
 		igt_allow_unlimited_files();
 
@@ -1908,6 +1913,7 @@ igt_main
 
 	for (const struct create *c = create; c->name; c++) {
 		for (const struct size *s = sizes; s->name; s++) {
+#ifdef ONLY_TINY_TESTS
 			/* Minimum test set */
 			snprintf(name, sizeof(name), "%s%s-%s",
 				 c->name, s->name, "tiny");
@@ -1918,6 +1924,7 @@ igt_main
 				run_modes(name, c, modes, s, count);
 			}
 
+#else
 			/* "Average" test set */
 			snprintf(name, sizeof(name), "%s%s-%s",
 				 c->name, s->name, "small");
@@ -2009,6 +2016,7 @@ igt_main
 					}
 				}
 			}
+#endif
 		}
 	}
 }
-- 
2.32.0



More information about the Intel-gfx-trybot mailing list