summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/lib/prime_numbers.sh
blob: da4cbcd766f5bc83c4ef5a4085e073d668daa4af (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
# Checks fast/slow prime_number generation for inconsistencies

if ! /sbin/modprobe -q -r prime_numbers; then
	echo "prime_numbers: [SKIP]"
	exit 77
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