mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-13 20:12:26 +00:00
14 lines
236 B
Bash
Executable File
14 lines
236 B
Bash
Executable File
#!/bin/sh
|
|
# Insert and remove a module n times to check for spurious errors / deadlocks.
|
|
set -e
|
|
mod="$1"
|
|
n="${2:-1}"
|
|
i=0
|
|
while [ $i -lt $n ]; do
|
|
echo "insmod $i"
|
|
insmod "/$mod.ko"
|
|
echo "rmmod $i"
|
|
rmmod "$mod"
|
|
i=$(($i+1))
|
|
done
|