linux_dsm_epyc7002/tools/testing/selftests/lib/prime_numbers.sh
Shuah Khan (Samsung OSG) fa32156921 selftests: lib: fix prime_numbers module search and skip logic
prime_numbers modules search and skip logic removes the module instead
of searching for it. Fix it.

Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-05-30 21:32:55 -06:00

20 lines
469 B
Bash
Executable File

#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Checks fast/slow prime_number generation for inconsistencies
# Kselftest framework requirement - SKIP code is 4.
ksft_skip=4
if ! /sbin/modprobe -q -n prime_numbers; then
echo "prime_numbers: module prime_numbers is not found [SKIP]"
exit $ksft_skip
fi
if /sbin/modprobe -q prime_numbers selftest=65536; then
/sbin/modprobe -q -r prime_numbers
echo "prime_numbers: ok"
else
echo "prime_numbers: [FAIL]"
exit 1
fi