modprobe: remove flock() because it never worked anyway
[mit.git] / tests / test-rmmod / 04flags.sh
blobfa3eea18adc33c156e65f64dd4e47582a95d9470
1 #! /bin/sh
3 mkdir -p tests/tmp/proc
5 # Old style
6 echo 'foo_bar 100 0' > tests/tmp/proc/modules
8 [ "`./rmmod -f foo_bar`" = "DELETE_MODULE: foo_bar EXCL TRUNC NONBLOCK " ]
9 [ "`./rmmod -f foo-bar`" = "DELETE_MODULE: foo_bar EXCL TRUNC NONBLOCK " ]
11 [ "`./rmmod -f /lib/modules/$MODTEST_UNAME/kernel/foo_bar.o`" = "DELETE_MODULE: foo_bar EXCL TRUNC NONBLOCK " ]
12 [ "`./rmmod -f /lib/modules/$MODTEST_UNAME/kernel/foo_bar.ko`" = "DELETE_MODULE: foo_bar EXCL TRUNC NONBLOCK " ]
13 [ "`./rmmod -f /lib/modules/$MODTEST_UNAME/kernel/foo-bar.ko`" = "DELETE_MODULE: foo_bar EXCL TRUNC NONBLOCK " ]
15 [ "`./rmmod -w foo_bar`" = "DELETE_MODULE: foo_bar EXCL " ]
16 [ "`./rmmod -w foo-bar`" = "DELETE_MODULE: foo_bar EXCL " ]
18 [ "`./rmmod -w /lib/modules/$MODTEST_UNAME/kernel/foo_bar.o`" = "DELETE_MODULE: foo_bar EXCL " ]
19 [ "`./rmmod -w /lib/modules/$MODTEST_UNAME/kernel/foo_bar.ko`" = "DELETE_MODULE: foo_bar EXCL " ]
20 [ "`./rmmod -w /lib/modules/$MODTEST_UNAME/kernel/foo-bar.ko`" = "DELETE_MODULE: foo_bar EXCL " ]
22 # Both should work on "in-use" modules.
23 echo 'foo_bar 100 1' > tests/tmp/proc/modules
25 [ "`./rmmod -f foo_bar`" = "DELETE_MODULE: foo_bar EXCL TRUNC NONBLOCK " ]
26 [ "`./rmmod -w foo_bar`" = "DELETE_MODULE: foo_bar EXCL " ]