All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] lib/igt_core: Ensure subtest result is skip if all dynamic subtests skip
@ 2021-12-15 10:35 Petri Latvala
  2021-12-15 11:33 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Petri Latvala @ 2021-12-15 10:35 UTC (permalink / raw)
  To: igt-dev; +Cc: Petri Latvala, Jari Tahvanainen

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@intel.com>
Cc: Arkadiusz Hiler <arek@hiler.eu>
Cc: Jari Tahvanainen <jari.tahvanainen@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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-12-16  7:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-15 10:35 [igt-dev] [PATCH i-g-t] lib/igt_core: Ensure subtest result is skip if all dynamic subtests skip Petri Latvala
2021-12-15 11:33 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2021-12-15 13:48 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-12-16  6:35   ` Petri Latvala
2021-12-16  7:27     ` Vudum, Lakshminarayana
2021-12-15 14:31 ` [igt-dev] [PATCH i-g-t] " Dixit, Ashutosh
2021-12-16  6:37   ` Petri Latvala
2021-12-16  7:20 ` [igt-dev] ✓ Fi.CI.IGT: success for " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.