Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: sigaltstack: do not use ksft_exit_skip after ksft_set_plan

Calling ksft_exit_skip after ksft_set_plan results in executing fewer tests
than planned. Use ksft_test_result_skip when possible, or just bail out if
memory corruption is detected.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>

authored by

Paolo Bonzini and committed by
Shuah Khan
5b0b77ac f000a39c

+2 -2
+2 -2
tools/testing/selftests/sigaltstack/sas.c
··· 71 71 swapcontext(&sc, &uc); 72 72 ksft_print_msg("%s\n", p->msg); 73 73 if (!p->flag) { 74 - ksft_exit_skip("[RUN]\tAborting\n"); 74 + ksft_exit_fail_msg("[RUN]\tAborting\n"); 75 75 exit(EXIT_FAILURE); 76 76 } 77 77 } ··· 144 144 err = sigaltstack(&stk, NULL); 145 145 if (err) { 146 146 if (errno == EINVAL) { 147 - ksft_exit_skip( 147 + ksft_test_result_skip( 148 148 "[NOTE]\tThe running kernel doesn't support SS_AUTODISARM\n"); 149 149 /* 150 150 * If test cases for the !SS_AUTODISARM variant were