depmod: fix tabs in help output
[module-init-tools.git] / tests / test-rmmod / 05noproc.sh
bloba03c733db204dd884df9b769422e96298db66faf
1 #! /bin/sh
3 mkdir -p tests/tmp/proc
5 # We allow this in case proc is not mounted.
6 [ "`rmmod foo_bar`" = "DELETE_MODULE: foo_bar EXCL NONBLOCK " ]
8 # We don't allow any other errors. Doesn't work if we're root.
9 if [ `id -u` -ne 0 ]; then
10 touch tests/tmp/proc/modules
11 chmod 000 tests/tmp/proc/modules
13 [ "`rmmod foo_bar 2>&1`" = "FATAL: can't open /proc/modules: Permission denied" ]
15 # But -f doesn't care
16 [ "`rmmod -f foo_bar`" = "DELETE_MODULE: foo_bar EXCL TRUNC NONBLOCK " ]