1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
3# Checks fast/slow prime_number generation for inconsistencies
4
5# Kselftest framework requirement - SKIP code is 4.
6ksft_skip=4
7
8if ! /sbin/modprobe -q -n prime_numbers; then
9	echo "prime_numbers: module prime_numbers is not found [SKIP]"
10	exit $ksft_skip
11fi
12
13if /sbin/modprobe -q prime_numbers selftest=65536; then
14	/sbin/modprobe -q -r prime_numbers
15	echo "prime_numbers: ok"
16else
17	echo "prime_numbers: [FAIL]"
18	exit 1
19fi
20