On Thu, 2026-03-19 at 17:38 +0100, Pavel Tikhomirov wrote: > Adding original author to CC: Rick Edgecombe <[email protected]>. > > Maybe he has some insight on why we have this SKIP / return 1 inconsistency. > > On 3/1/26 02:47, Aleksei Oladko wrote: > > test_shadow_stack prints a message indicating that the test is > > skipped in some cases, but still returns 1. This causes the test > > to be reported as failed instead of skipped. > > > > Return KSFT_SKIP in the skip path so the result is reported > > correctly. > > Should we also return KSFT_SKIP in other 3 SKIP paths, which currently return > 0? > I guess that means that those skips are currently reported as success, right?
Oh, yea I think the first skip, "Could not enable Shadow stack", should return 0, but the rest of them should succeed if shadow stack gets enabled, so they are more indicative of kernel issues. The "[SKIP]" message is wrong for those. If you want to leave the error code as 1 for them, I can send a patch to correct the message. But please feel welcome to fix the message part up too. Also, "Could not re-enable Shadow stack" is a prelude to a crash. The test can't return from main if shadow stack is enabled because the shadow stack won't match. Functionally it makes no difference because it will crash, but it is a sign that there is something wrong with the kernel. So having 1 there will have the code make more sense.

