test-modules: convert to use LkmcCliFunction

This commit is contained in:
Ciro Santilli
2019-01-22 00:00:00 +00:00
committed by Ciro Santilli 六四事件 法轮功
parent 4a92813252
commit 718941f3cf
8 changed files with 112 additions and 77 deletions

View File

@@ -1,25 +1,27 @@
#!/bin/sh
test_dir="${1:-.}"
for test in \
/anonymous_inode.sh \
/character_device.sh \
/character_device_create.sh \
/debugfs.sh \
/dep.sh \
/fops.sh \
/init_module.sh \
/ioctl.sh \
/kstrto.sh \
/mmap.sh \
/netlink.sh \
/params.sh \
/procfs.sh \
/seq_file.sh \
/seq_file_single_open.sh \
/sysfs.sh \
anonymous_inode.sh \
character_device.sh \
character_device_create.sh \
debugfs.sh \
dep.sh \
fops.sh \
init_module.sh \
ioctl.sh \
kstrto.sh \
mmap.sh \
netlink.sh \
params.sh \
procfs.sh \
seq_file.sh \
seq_file_single_open.sh \
sysfs.sh \
; do
if ! "$test"; then
echo "lkmc_test_fail: ${test}"
if ! "${test_dir}/${test}"; then
echo "Test failed: ${test}"
test_fail.sh
exit 1
fi
done
echo lkmc_test_pass
echo 'All tests passed.'

4
rootfs_overlay/test_fail.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
# Print the magic fail string that our scripts detect
# as a simulation failure.
echo lkmc_test_fail