[PATCH v4 3/5] lib: Add platform filter initialization check for automatic filtering

<[email protected]>
Newsgroups org.freedesktop.lists.igt-dev
Message-ID <[email protected]>
From: Vitaly Prosyak <[email protected]>

Provide igt_platform_filter_is_initialized() helper function to allow
the IGT core to check if platform filtering has been enabled for the
current test before attempting automatic filtering.

This enables the __igt_run_subtest() hook (in next commit) to
conditionally apply platform filtering only when tests have opted in
via platform_filter_init().

Without this check, tests that haven't called platform_filter_init()
would fail when the framework tries to call igt_platform_should_skip().

v3 changes:
 - This is now patch 3/6 (was 4/7 in v2) due to squashing of patches 1+2
   per Kamil Konieczny's review feedback
 - No code changes from v2

Cc: Kamil Konieczny <[email protected]>
Cc: Jani Nikula <[email protected]>
Cc: Jesse Zhang <[email protected]>
Cc: Christian König <[email protected]>
Cc: Alex Deucher <[email protected]>
Signed-off-by: Vitaly Prosyak <[email protected]>
Reviewed-by: Krzysztof Karas <[email protected]>
Change-Id: I1f8d7c1b76d8a2e3d5f6c4b9e0a7d8e9f0a1b2c3
---
 lib/igt_platform_filter.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/igt_platform_filter.h b/lib/igt_platform_filter.h
index d64450489..b4639e610 100644
--- a/lib/igt_platform_filter.h
+++ b/lib/igt_platform_filter.h
@@ -119,4 +119,6 @@ void igt_platform_filter_dump(void);
 
 int igt_platform_filter_dump_to_file(const char *filename);
 
+bool igt_platform_filter_is_initialized(void);
+
 #endif /* IGT_PLATFORM_FILTER_H */
-- 
2.54.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.