Linux Kernel Selftest development
 help / color / mirror / Atom feed
* [PATCH] selftests/x86: sigframe_fpu_portability: fix TAP plan mismatches
@ 2026-11-20 13:40 Jakov Novak
  0 siblings, 0 replies; only message in thread
From: Jakov Novak @ 2026-11-20 13:40 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Shuah Khan, linux-kernel, linux-kselftest
  Cc: linux-kernel-mentees, Shuah Khan, Jakov Novak

 The plan set to 2 with ksft_set_plan(), but check_avx_support()
 may call ksft_exit_skip() which leads to a TAP plan mismatch.
 Move the ksft_set_plan() call after the check is done.

Signed-off-by: Jakov Novak <jakovnovak30@gmail.com>
---
 tools/testing/selftests/x86/sigframe_fpu_portability.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/x86/sigframe_fpu_portability.c b/tools/testing/selftests/x86/sigframe_fpu_portability.c
index 8377de052032..f738895e5159 100644
--- a/tools/testing/selftests/x86/sigframe_fpu_portability.c
+++ b/tools/testing/selftests/x86/sigframe_fpu_portability.c
@@ -221,12 +221,13 @@ static void test_invalid_shrunk_xstate_size(void)
 int main(void)
 {
 	ksft_print_header();
-	ksft_set_plan(2);
 
 	self_pid = getpid();
 
 	check_avx_support();
 
+	ksft_set_plan(2);
+
 	test_valid_shrunk_xstate_size();
 	test_invalid_shrunk_xstate_size();
 
-- 
2.56.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-20 13:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-20 13:40 [PATCH] selftests/x86: sigframe_fpu_portability: fix TAP plan mismatches Jakov Novak

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