[PATCH] app/test: prevent exiting after skipped test

Bruce Richardson bruce.richardson at intel.com
Thu Dec 14 12:38:13 CET 2023


When processing a list of tests to run, the loop termination condition
was a test returning a value != 0. This means that if one of a series of
tests was skipped, i.e. returned TEST_SKIPPED, the whole execution run
was stopped. Since a test being skipped is not an error condition, we
put in an explicit check for that to keep executing any remaining tests.

Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
---
 app/test/test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test.c b/app/test/test.c
index c818fda17b..8b25615913 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -235,7 +235,7 @@ main(int argc, char **argv)
 				ret = last_test_result;
 
 end_of_cmd:
-			if (ret != 0)
+			if (ret != 0 && ret != TEST_SKIPPED)
 				break;
 		}
 		if (n_skip_tests > 0)
-- 
2.40.1



More information about the dev mailing list