[igt-dev] [PATCH i-g-t] lib/igt_core: Ensure subtest result is skip if all dynamic subtests skip
Petri Latvala
petri.latvala at intel.com
Wed Dec 15 10:35:06 UTC 2021
Even though the best practices for dynamic subtests is to not execute
the dynamic subtest at all instead of skipping, there are a couple of
tests that to the opposite, without an easy way to construct them
along best practices. Accomodate this with fixing the handling of
skipping dynamic subtests so that the result of the containing subtest
becomes a skip also if all dynamic subtests skip, not just when there
are no dynamic subtests.
Signed-off-by: Petri Latvala <petri.latvala at intel.com>
Cc: Arkadiusz Hiler <arek at hiler.eu>
Cc: Jari Tahvanainen <jari.tahvanainen at intel.com>
---
lib/igt_core.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/lib/igt_core.c b/lib/igt_core.c
index ec05535c..7c906675 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -1471,7 +1471,14 @@ void igt_skip(const char *f, ...)
}
if (in_subtest) {
- /* Doing the same even if inside a dynamic subtest */
+ if (in_dynamic_subtest) {
+ /*
+ * Don't count skipping dynamic subtests, for
+ * the purposes of getting the result of the
+ * containing subtest.
+ */
+ _igt_dynamic_tests_executed--;
+ }
exit_subtest("SKIP");
} else if (test_with_subtests) {
skip_subtests_henceforth = SKIP;
--
2.29.2
More information about the igt-dev
mailing list