31 lines · bash
1#!/bin/sh2# SPDX-License-Identifier: GPL-2.03# Runs static keys kernel module tests4 5# Kselftest framework requirement - SKIP code is 4.6ksft_skip=47 8if ! /sbin/modprobe -q -n test_static_key_base; then9 echo "static_keys: module test_static_key_base is not found [SKIP]"10 exit $ksft_skip11fi12 13if ! /sbin/modprobe -q -n test_static_keys; then14 echo "static_keys: module test_static_keys is not found [SKIP]"15 exit $ksft_skip16fi17 18if /sbin/modprobe -q test_static_key_base; then19 if /sbin/modprobe -q test_static_keys; then20 echo "static_keys: ok"21 /sbin/modprobe -q -r test_static_keys22 /sbin/modprobe -q -r test_static_key_base23 else24 echo "static_keys: [FAIL]"25 /sbin/modprobe -q -r test_static_key_base26 fi27else28 echo "static_keys: [FAIL]"29 exit 130fi31