[Intel-gfx] [PATCH i-g-t] igt_core: Skip sync when listing subtests

Tvrtko Ursulin tursulin at ursulin.net
Fri Jul 21 13:00:27 UTC 2017


From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

No need to sync filesystems when only listing subtest.

Extremely marginal benefit of avoid a short stall after make
followed by listing subtests.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
---
 lib/igt_core.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/igt_core.h b/lib/igt_core.h
index 6c55c04b7de0..24f308477049 100644
--- a/lib/igt_core.h
+++ b/lib/igt_core.h
@@ -257,9 +257,10 @@ void __igt_subtest_group_restore(int);
 #define igt_main \
 	static void igt_tokencat(__real_main, __LINE__)(void); \
 	int main(int argc, char **argv) { \
-		sync(); \
 		igt_subtest_init_parse_opts(&argc, argv, NULL, NULL, NULL, \
 					    NULL, NULL); \
+		if (!igt_only_list_subtests()) \
+			sync(); \
 		igt_tokencat(__real_main, __LINE__)(); \
 		igt_exit(); \
 	} \
@@ -298,9 +299,10 @@ void igt_simple_init_parse_opts(int *argc, char **argv,
 #define igt_simple_main \
 	static void igt_tokencat(__real_main, __LINE__)(void); \
 	int main(int argc, char **argv) { \
-		sync(); \
 		igt_simple_init_parse_opts(&argc, argv, NULL, NULL, NULL, \
 					   NULL, NULL); \
+		if (!igt_only_list_subtests()) \
+			sync(); \
 		igt_tokencat(__real_main, __LINE__)(); \
 		igt_exit(); \
 	} \
-- 
2.9.4



More information about the Intel-gfx mailing list