mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-27 20:14:27 +01:00
test-modules: convert to use LkmcCliFunction
This commit is contained in:
committed by
Ciro Santilli 六四事件 法轮功
parent
4a92813252
commit
718941f3cf
@@ -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
4
rootfs_overlay/test_fail.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
# Print the magic fail string that our scripts detect
|
||||
# as a simulation failure.
|
||||
echo lkmc_test_fail
|
||||
Reference in New Issue
Block a user