From 3953d2dd22ea1c87aa77e3a9415aaf767d2ec3ed Mon Sep 17 00:00:00 2001 From: Derek Morton Date: Mon, 14 Dec 2015 09:59:17 +0000 Subject: gem_flink_race/prime_self_import: Improve test reliability gem_flink_race and prime_self_import have subtests which read the number of open gem objects from debugfs to determine if objects have leaked during the test. However the test can fail sporadically if the number of gem objects changes due to other process activity. This patch introduces a change to check the number of gem objects several times to filter out any fluctuations. v2: Moved the common code to a library and made the loop android specific (Daniel Vetter) v3: Renamed get_stable_obj_count -> igt_get_stable_obj_count Signed-off-by: Derek Morton Signed-off-by: Daniel Vetter --- lib/igt_debugfs.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/igt_debugfs.h') diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h index bbf7f697..24018eb3 100644 --- a/lib/igt_debugfs.h +++ b/lib/igt_debugfs.h @@ -165,4 +165,10 @@ void igt_drop_caches_set(uint64_t val); void igt_disable_prefault(void); void igt_enable_prefault(void); +/* + * Put the driver into a stable (quiescent) state and get the current number of + * gem buffer objects + */ +int igt_get_stable_obj_count(int driver); + #endif /* __IGT_DEBUGFS_H__ */ -- cgit v1.2.3