Re: [PATCH v3] selftests: x86: test_shadow_stack: return KSFT_SKIP when test is skipped
From: Edgecombe, Rick P
Date: Wed Mar 25 2026 - 16:58:09 EST
+Jiri who added this part of the test
Link:https://lore.kernel.org/lkml/20260323104536.198738-1-aleksey.oladko@xxxxxxxxxxxxx/
On Mon, 2026-03-23 at 12:15 +0100, Pavel Tikhomirov wrote:
> > type = determine_uprobe_perf_type();
> > if (type < 0) {
> > - if (type == -ENOENT)
> > + if (type == -ENOENT) {
> > printf("[SKIP]\tUretprobe test, uprobes are not
> > available\n");
> > - return 0;
> > + return 0;
> > + }
> > + return 1;
> > }
This patch looks good and thanks for fixing up the other stuff. Except I'm not
sure if this whole < 0 scenario would be better to leave as a skip. The failure
to read the file isn't testing anything about shadow stack. So I'd leave the
existing behavior, or if you want to improve it, drop the type == -ENOENT check
and just always print SKIP and return 0.
Jiri do you recall why it only prints SKIP in the -ENOENT case?