selftests: lib: fix prime_numbers module search and skip logic
authorShuah Khan (Samsung OSG) <shuah@kernel.org>
Wed, 30 May 2018 17:27:13 +0000 (11:27 -0600)
committerShuah Khan (Samsung OSG) <shuah@kernel.org>
Thu, 31 May 2018 03:32:55 +0000 (21:32 -0600)
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>
tools/testing/selftests/lib/prime_numbers.sh

index 76602d4..78e7483 100755 (executable)
@@ -5,7 +5,7 @@
 # Kselftest framework requirement - SKIP code is 4.
 ksft_skip=4
 
-if ! /sbin/modprobe -q -r prime_numbers; then
+if ! /sbin/modprobe -q -n prime_numbers; then
        echo "prime_numbers: module prime_numbers is not found [SKIP]"
        exit $ksft_skip
 fi