depmod: fix tabs in help output
[module-init-tools.git] / tests / test-rmmod / 06multi.sh
blob8762effb86730da8d1d13b33e4c5a36301a71ee6
1 #! /bin/sh
3 mkdir -p tests/tmp/proc
5 # Old style
6 echo 'foo 100 0' > tests/tmp/proc/modules
7 echo 'bar 100 0' >> tests/tmp/proc/modules
9 [ "`rmmod foo bar`" = "DELETE_MODULE: foo EXCL NONBLOCK
10 DELETE_MODULE: bar EXCL NONBLOCK " ]
12 [ "`rmmod -f foo bar`" = "DELETE_MODULE: foo EXCL TRUNC NONBLOCK
13 DELETE_MODULE: bar EXCL TRUNC NONBLOCK " ]
15 [ "`rmmod -w foo bar`" = "DELETE_MODULE: foo EXCL
16 DELETE_MODULE: bar EXCL " ]
18 # First examine stdout (mixing them gives unpredictable results)
19 [ "`rmmod foo bar baz 2>/dev/null`" = "DELETE_MODULE: foo EXCL NONBLOCK
20 DELETE_MODULE: bar EXCL NONBLOCK " ]
21 [ "`rmmod baz foo bar 2>/dev/null`" = "DELETE_MODULE: foo EXCL NONBLOCK
22 DELETE_MODULE: bar EXCL NONBLOCK " ]
24 # Now examine stderr.
25 [ "`rmmod foo bar baz 2>&1 >/dev/null`" = "ERROR: Module baz does not exist in /proc/modules" ]
26 [ "`rmmod baz foo bar 2>&1 >/dev/null`" = "ERROR: Module baz does not exist in /proc/modules" ]