diff --git a/.ci/build-n-run.sh b/.ci/build-n-run.sh index 4d9dc63..8fb5ec1 100755 --- a/.ci/build-n-run.sh +++ b/.ci/build-n-run.sh @@ -7,24 +7,24 @@ function build_example() function list_mod() { - #following list will contain all file names which are not specified in file non-working. - echo `ls examples/*.ko | awk -F "[/|.]" '{print $2}' | grep -vFxf .ci/non-working` + # Filter out the modules specified in non-working + ls examples/*.ko | awk -F "[/|.]" '{print $2}' | grep -vFxf .ci/non-working } -#test module 2 times function run_mod() { - ( sudo insmod "examples/$1.ko" && sudo rmmod "$1" ) || exit 1; - ( sudo insmod "examples/$1.ko" && sudo rmmod "$1" ) || exit 1; + # insert/remove twice to ensure resource allocations + ( sudo insmod "examples/$1.ko" && sudo rmmod "$1" ) || exit 1 + ( sudo insmod "examples/$1.ko" && sudo rmmod "$1" ) || exit 1 } function run_examples() { for module in $(list_mod); do - echo "$module" + echo "Running $module" run_mod "$module" done } build_example -run_examples \ No newline at end of file +run_examples