Files
linuxkit/test/cases/020_kernel/018_kmod_5.1.x/check.sh
Rolf Neugebauer d72c928a1e tests: Add tests for the 5.1.x kernel
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-05-12 20:56:26 +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