mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-21 08:46:49 +07:00
b26862450d
When lib test(s) is skipped because of unmet dependencies and/or unsupported configuration, it returns non-zero value hich is treated as a fail by the Kselftest framework. This leads to false negative 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>
20 lines
429 B
Bash
Executable File
20 lines
429 B
Bash
Executable File
#!/bin/sh
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
# Kselftest framework requirement - SKIP code is 4.
|
|
ksft_skip=4
|
|
|
|
# Runs bitmap infrastructure tests using test_bitmap kernel module
|
|
if ! /sbin/modprobe -q -n test_bitmap; then
|
|
echo "bitmap: module test_bitmap is not found [SKIP]"
|
|
exit $ksft_skip
|
|
fi
|
|
|
|
if /sbin/modprobe -q test_bitmap; then
|
|
/sbin/modprobe -q -r test_bitmap
|
|
echo "bitmap: ok"
|
|
else
|
|
echo "bitmap: [FAIL]"
|
|
exit 1
|
|
fi
|