Re: [PATCH] selftests: x86: test_shadow_stack: return KSFT_SKIP when test is skipped

From: Edgecombe, Rick P

Date: Fri Mar 20 2026 - 13:27:40 EST


On Fri, 2026-03-20 at 10:52 +0100, Pavel Tikhomirov wrote:
>         if (ARCH_PRCTL(ARCH_SHSTK_ENABLE, ARCH_SHSTK_SHSTK)) {
> -               printf("[SKIP]\tCould not re-enable Shadow stack\n");
> +               printf("[FAIL]\tCould not re-enable Shadow stack\n");
>                 return 1;
>         }
>  
>         if (ARCH_PRCTL(ARCH_SHSTK_ENABLE, ARCH_SHSTK_WRSS)) {
> -               printf("[SKIP]\tCould not enable WRSS\n");
> +               printf("[FAIL]\tCould not enable WRSS\n");
>                 ret = 1;
>                 goto out;
>         }
> @@ -1057,6 +1061,7 @@ int main(int argc, char *argv[])
>         if (test_ptrace()) {
>                 ret = 1;
>                 printf("[FAIL]\tptrace test\n");
> +               goto out;
>         }

Seems fine. The rest of the test could continue, but it's probably better to
have everything match. This whole function could be cleaned up actually, to be
more understandable and cleaner, so don't want to dig any further.

>  
>         if (test_32bit()) {

The rest looks good, thanks!