]> Git Repo - J-linux.git/blob - tools/testing/selftests/static_keys/test_static_keys.sh
Merge tag 'amd-drm-next-6.5-2023-06-09' of https://gitlab.freedesktop.org/agd5f/linux...
[J-linux.git] / tools / testing / selftests / static_keys / test_static_keys.sh
1 #!/bin/sh
2 # SPDX-License-Identifier: GPL-2.0
3 # Runs static keys kernel module tests
4
5 # Kselftest framework requirement - SKIP code is 4.
6 ksft_skip=4
7
8 if ! /sbin/modprobe -q -n test_static_key_base; then
9         echo "static_key: module test_static_key_base is not found [SKIP]"
10         exit $ksft_skip
11 fi
12
13 if ! /sbin/modprobe -q -n test_static_keys; then
14         echo "static_key: module test_static_keys is not found [SKIP]"
15         exit $ksft_skip
16 fi
17
18 if /sbin/modprobe -q test_static_key_base; then
19         if /sbin/modprobe -q test_static_keys; then
20                 echo "static_key: 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
26         fi
27 else
28         echo "static_key: [FAIL]"
29         exit 1
30 fi
This page took 0.030755 seconds and 4 git commands to generate.