]>
Commit | Line | Data |
---|---|---|
722b7c48 GKH |
1 | From foo@baz Sat Jul 28 10:14:30 CEST 2018 |
2 | From: "Shuah Khan (Samsung OSG)" <shuah@kernel.org> | |
3 | Date: Thu, 3 May 2018 17:09:40 -0600 | |
4 | Subject: selftests: intel_pstate: return Kselftest Skip code for skipped tests | |
5 | ||
6 | From: "Shuah Khan (Samsung OSG)" <shuah@kernel.org> | |
7 | ||
8 | [ Upstream commit 5c30a038fb8ec8cdff011e6b5d5d51eb415381d4 ] | |
9 | ||
10 | When intel_pstate test is skipped because of unmet dependencies and/or | |
11 | unsupported configuration, it returns 0 which is treated as a pass | |
12 | by the Kselftest framework. This leads to false positive result even | |
13 | when the test could not be run. | |
14 | ||
15 | Change it to return kselftest skip code when a test gets skipped to | |
16 | clearly report that the test could not be run. | |
17 | ||
18 | Kselftest framework SKIP code is 4 and the framework prints appropriate | |
19 | messages to indicate that the test is skipped. | |
20 | ||
21 | Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org> | |
22 | Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> | |
23 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
24 | --- | |
25 | tools/testing/selftests/intel_pstate/run.sh | 5 ++++- | |
26 | 1 file changed, 4 insertions(+), 1 deletion(-) | |
27 | ||
28 | --- a/tools/testing/selftests/intel_pstate/run.sh | |
29 | +++ b/tools/testing/selftests/intel_pstate/run.sh | |
30 | @@ -30,9 +30,12 @@ | |
31 | ||
32 | EVALUATE_ONLY=0 | |
33 | ||
34 | +# Kselftest framework requirement - SKIP code is 4. | |
35 | +ksft_skip=4 | |
36 | + | |
37 | if ! uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ | grep -q x86; then | |
38 | echo "$0 # Skipped: Test can only run on x86 architectures." | |
39 | - exit 0 | |
40 | + exit $ksft_skip | |
41 | fi | |
42 | ||
43 | max_cpus=$(($(nproc)-1)) |