add script for automatic module insertion testing

This commit is contained in:
ІО-23 Шмуляр Олег 2024-12-01 20:42:43 +02:00
parent 331a1ecb0b
commit f11d2bc921
Signed by: hasslesstech
GPG Key ID: 09745A46126DDD4C
2 changed files with 51 additions and 0 deletions

18
test.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/sh
if [ -z "$1" ]; then
echo "Error: no script supplied"
echo "Usage: $0 path/to/testing/script"
exit 1
fi
while read l; do
if [ -z "$l" ]; then
continue;
fi;
echo "$ $l";
$($l);
echo -e ""
done < $1

33
tests/lab5-test Normal file
View File

@ -0,0 +1,33 @@
insmod hello2.ko
insmod hello1.ko
insmod hello2.ko
rmmod hello2.ko
insmod hello2.ko msg_count=0
rmmod hello2.ko
insmod hello2.ko msg_count=1
rmmod hello2.ko
insmod hello2.ko msg_count=3
rmmod hello2.ko
insmod hello2.ko msg_count=5
rmmod hello2.ko
insmod hello2.ko msg_count=8
rmmod hello2.ko
insmod hello2.ko msg_count=10
rmmod hello2.ko
insmod hello2.ko msg_count=12
rmmod hello2.ko
insmod hello2.ko
rmmod hello1.ko
rmmod hello2.ko
rmmod hello1.ko