RE: [PATCH v6 3/4] lib/igt_core: Enable automatic platform filtering in subtest execution
"Zhang, Jesse(Jie)" <[email protected]>
| Newsgroups | org.freedesktop.lists.igt-dev |
|---|---|
| Message-ID | <DM4PR12MB515289E9B1CF4057D8359E55E3A42@DM4PR12MB5152.namprd12.prod.outlook.com> |
AMD General Review-by: Jesse Zhang <[email protected]> > -----Original Message----- > From: [email protected] <[email protected]> > Sent: Thursday, August 20, 2026 9:27 AM > To: [email protected] > Cc: [email protected]; [email protected]; > [email protected]; [email protected]; Zhang, > Jesse(Jie) <[email protected]>; Koenig, Christian > <[email protected]>; Deucher, Alexander > <[email protected]>; Prosyak, Vitaly <[email protected]> > Subject: [PATCH v6 3/4] lib/igt_core: Enable automatic platform filtering in subtest > execution > > From: Vitaly Prosyak <[email protected]> > > Hook igt_platform_should_skip() into __igt_run_subtest() so tests initialized with > igt_platform_filter_init() automatically skip filtered subtests without any manual calls > in test code. > > Cc: Kamil Konieczny <[email protected]> > Cc: Krzysztof Karas <[email protected]> > Signed-off-by: Vitaly Prosyak <[email protected]> > Reviewed-by: Krzysztof Karas <[email protected]> > --- > lib/igt_core.c | 18 +++++++++++++++++- > 1 file changed, 17 insertions(+), 1 deletion(-) > > diff --git a/lib/igt_core.c b/lib/igt_core.c index 2f737b01a..0ec7b4861 100644 > --- a/lib/igt_core.c > +++ b/lib/igt_core.c > @@ -80,6 +80,7 @@ > #include "igt_rc.h" > #include "igt_list.h" > #include "igt_map.h" > +#include "igt_platform_filter.h" > #include "igt_device_scan.h" > #include "igt_thread.h" > #include "igt_vec.h" > @@ -1525,7 +1526,6 @@ bool __igt_run_subtest(const char *subtest_name, > const char *file, const int lin > return false; > } > > - > if (skip_subtests_henceforth) { > _subtest_result_message(_SUBTEST_TYPE_NORMAL, > subtest_name, > skip_subtests_henceforth == SKIP ? "SKIP" : > "FAIL", @@ -1533,6 +1533,22 @@ bool __igt_run_subtest(const char > *subtest_name, const char *file, const int lin > return false; > } > > + /* Automatic platform filtering - if initialized, check if subtest should be > skipped */ > + if (igt_platform_filter_is_initialized()) { > + enum skip_source source; > + const char *reason; > + > + if (igt_platform_should_skip(igt_test_name(), subtest_name, > + &source, &reason)) { > + _subtest_result_message(_SUBTEST_TYPE_NORMAL, > subtest_name, > + "SKIP", 0.0); > + igt_info("Platform filtering (%s): %s\n", > + source == SKIP_SOURCE_BUILTIN ? "built-in" : > + source == SKIP_SOURCE_CONFIG ? "config" : > "env", > + reason); > + return false; > + } > + } > igt_kmsg(KMSG_INFO "%s: starting subtest %s\n", > command_str, subtest_name); > igt_trace("%s: starting subtest %s\n", command_str, subtest_name); > -- > 2.54.0