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

selftests: intel_pstate: return Kselftest Skip code for skipped tests

When intel_pstate test is skipped because of unmet dependencies and/or
unsupported configuration, it returns 0 which is treated as a pass
by the Kselftest framework. This leads to false positive result even
when the test could not be run.

Change it to return kselftest skip code when a test gets skipped to
clearly report that the test could not be run.

Kselftest framework SKIP code is 4 and the framework prints appropriate
messages to indicate that the test is skipped.

Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>

+4 -1
+4 -1
tools/testing/selftests/intel_pstate/run.sh
··· 30 30 31 31 EVALUATE_ONLY=0 32 32 33 + # Kselftest framework requirement - SKIP code is 4. 34 + ksft_skip=4 35 + 33 36 if ! uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ | grep -q x86; then 34 37 echo "$0 # Skipped: Test can only run on x86 architectures." 35 - exit 0 38 + exit $ksft_skip 36 39 fi 37 40 38 41 max_cpus=$(($(nproc)-1))