mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-25 19:21:35 +01:00
Motivation: userland is getting several new subdirectories, it would be too insane to just dump all of that in the guest root filesystem. To alleviate the cd pain, .profile puts user inside /lkmc by default.
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
|