Skip to contentSkip to conversation

selftests/x86: sigframe_fpu_portability: fix TAP plan mismatches

PATCH In review Jakov Novak 2 participants 2 messages Nov 20

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests/x86: sigframe_fpu_portability: fix TAP plan mismatches

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.

---
 tools/testing/selftests/x86/sigframe_fpu_portability.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/x86/sigframe_fpu_portability.c +2 -1
index 8377de052032..f738895e5159 100644
@@ -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();
 
Signature · 1 line
2.56.1
#1 lore raw
Quoted 3 lines · 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.

I'd really like to know more about what this is fixing. It's not super clear from this changelog.