Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] selftests/liveupdate: return KSFT_SKIP when all VM tests are skipped
@ 2026-11-28 22:01 Nevzat Kutay Aydoğdu
  2026-11-28 22:04 ` sashiko-bot
  2026-12-01 10:58 ` Mike Rapoport
  0 siblings, 2 replies; 3+ messages in thread
From: Nevzat Kutay Aydoğdu @ 2026-11-28 22:01 UTC (permalink / raw)
  To: pasha.tatashin, rppt, pratyush
  Cc: shuah, kexec, linux-kselftest, Nevzat Kutay Aydoğdu

When all Live Update VM tests are skipped, run-vmtests.sh reports zero
passes and zero failures but exits with status 0. Callers that rely on
the exit status can mistake a skipped run for a successful one.

Return KSFT_SKIP (4) when all tests are skipped. Keep returning 1 if
any test fails and 0 if at least one test passes and none fail.

Fixes: 89dd1421c554 ("selftests/liveupdate: add end to end test infrastructure and scripts")

Signed-off-by: Nevzat Kutay Aydoğdu <kutaynevzat2006@gmail.com>
---
 tools/testing/selftests/liveupdate/run-vmtests.sh | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/liveupdate/run-vmtests.sh b/tools/testing/selftests/liveupdate/run-vmtests.sh
index d656ce58c5a7..574dee7b08ce 100755
--- a/tools/testing/selftests/liveupdate/run-vmtests.sh
+++ b/tools/testing/selftests/liveupdate/run-vmtests.sh
@@ -91,7 +91,14 @@ function main() {
 		echo "Logs: $output_dir"
 	fi
 
-	exit $((failed != 0))
+	if (( failed > 0 )); then
+		exit 1
+	fi
+
+	if (( passed == 0 && skipped > 0 )); then
+		exit 4
+	fi
+
 }
 
 main "$@"
-- 
2.53.0



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

* Re: [PATCH] selftests/liveupdate: return KSFT_SKIP when all VM tests are skipped
  2026-11-28 22:01 [PATCH] selftests/liveupdate: return KSFT_SKIP when all VM tests are skipped Nevzat Kutay Aydoğdu
@ 2026-11-28 22:04 ` sashiko-bot
  2026-12-01 10:58 ` Mike Rapoport
  1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-11-28 22:04 UTC (permalink / raw)
  To: Nevzat Kutay Aydoğdu, pasha.tatashin, rppt, pratyush; +Cc: shuah, kexec

> When all Live Update VM tests are skipped, run-vmtests.sh reports zero
> passes and zero failures but exits with status 0. Callers that rely on
> the exit status can mistake a skipped run for a successful one.
> 
> Return KSFT_SKIP (4) when all tests are skipped. Keep returning 1 if
> any test fails and 0 if at least one test passes and none fail.
> 
> Fixes: 89dd1421c554 ("selftests/liveupdate: add end to end test infrastructure and scripts")
> 
> Signed-off-by: Nevzat Kutay Aydoğdu <kutaynevzat2006@gmail.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261128220130.14164-1-kutaynevzat2006@gmail.com?part=1


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

* Re: [PATCH] selftests/liveupdate: return KSFT_SKIP when all VM tests are skipped
  2026-11-28 22:01 [PATCH] selftests/liveupdate: return KSFT_SKIP when all VM tests are skipped Nevzat Kutay Aydoğdu
  2026-11-28 22:04 ` sashiko-bot
@ 2026-12-01 10:58 ` Mike Rapoport
  1 sibling, 0 replies; 3+ messages in thread
From: Mike Rapoport @ 2026-12-01 10:58 UTC (permalink / raw)
  To: Nevzat Kutay Aydoğdu
  Cc: pasha.tatashin, pratyush, shuah, kexec, linux-kselftest

Hi,

On Sun, Nov 29, 2026 at 01:01:30AM +0300, Nevzat Kutay Aydoğdu wrote:
> When all Live Update VM tests are skipped, run-vmtests.sh reports zero
> passes and zero failures but exits with status 0. Callers that rely on
> the exit status can mistake a skipped run for a successful one.
 
Normally kselftests return 0 even when the skipped all the tests.

> Return KSFT_SKIP (4) when all tests are skipped. Keep returning 1 if
> any test fails and 0 if at least one test passes and none fail.
> 
> Fixes: 89dd1421c554 ("selftests/liveupdate: add end to end test infrastructure and scripts")
> 
> Signed-off-by: Nevzat Kutay Aydoğdu <kutaynevzat2006@gmail.com>
> ---
>  tools/testing/selftests/liveupdate/run-vmtests.sh | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/liveupdate/run-vmtests.sh b/tools/testing/selftests/liveupdate/run-vmtests.sh
> index d656ce58c5a7..574dee7b08ce 100755
> --- a/tools/testing/selftests/liveupdate/run-vmtests.sh
> +++ b/tools/testing/selftests/liveupdate/run-vmtests.sh
> @@ -91,7 +91,14 @@ function main() {
>  		echo "Logs: $output_dir"
>  	fi
>  
> -	exit $((failed != 0))
> +	if (( failed > 0 )); then
> +		exit 1
> +	fi
> +
> +	if (( passed == 0 && skipped > 0 )); then
> +		exit 4
> +	fi
> +
>  }
>  
>  main "$@"
> -- 
> 2.53.0
> 

-- 
Sincerely yours,
Mike.


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

end of thread, other threads:[~2026-12-01 10:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-28 22:01 [PATCH] selftests/liveupdate: return KSFT_SKIP when all VM tests are skipped Nevzat Kutay Aydoğdu
2026-11-28 22:04 ` sashiko-bot
2026-12-01 10:58 ` Mike Rapoport

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox