Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / tools / testing / selftests / static_keys / test_static_keys.sh
blob3b0f17b81ac2d4c73dd5a00bf1170f5ddce0b192
1 #!/bin/sh
2 # SPDX-License-Identifier: GPL-2.0
3 # Runs static keys kernel module tests
5 # Kselftest framework requirement - SKIP code is 4.
6 ksft_skip=4
8 if ! /sbin/modprobe -q -n test_static_key_base; then
9 echo "static_keys: module test_static_key_base is not found [SKIP]"
10 exit $ksft_skip
13 if ! /sbin/modprobe -q -n test_static_keys; then
14 echo "static_keys: module test_static_keys is not found [SKIP]"
15 exit $ksft_skip
18 if /sbin/modprobe -q test_static_key_base; then
19 if /sbin/modprobe -q test_static_keys; then
20 echo "static_keys: ok"
21 /sbin/modprobe -q -r test_static_keys
22 /sbin/modprobe -q -r test_static_key_base
23 else
24 echo "static_keys: [FAIL]"
25 /sbin/modprobe -q -r test_static_key_base
27 else
28 echo "static_keys: [FAIL]"
29 exit 1