Files
linuxkit/test/cases/020_kernel/115_kmod_5.12.x/check.sh
Rolf Neugebauer f4afb12454 tests: Add tests for 5.12.x kernel
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2021-07-04 11:16:45 +01:00

16 lines
314 B
Bash
Executable File

#!/bin/sh
function failed {
printf "Kernel module test suite FAILED\n"
/sbin/poweroff -f
}
uname -a
modinfo hello_world.ko || failed
insmod hello_world.ko || failed
[ -n "$(dmesg | grep -o 'Hello LinuxKit')" ] || failed
rmmod hello_world || failed
printf "Kernel module test suite PASSED\n"
/sbin/poweroff -f