release: bump release to v3.7-pre3
[mit.git] / tests / test-rmmod / disabled01backcompat.sh
blobbfebad1bd8c1b89ca3675afa51900fc34e16fa67
1 #! /bin/sh
3 MODTEST_DO_CREATE_MODULE=1
4 export MODTEST_DO_CREATE_MODULE
6 # Should fail to run (sys_create_module succeeds), not find rmmod.old.
7 [ "`./rmmod 2>&1`" = "Kernel requires old rmmod, but couldn't run ./rmmod.old: No such file or directory" ]
9 # Create one for it to find, put it in the path
10 echo '#! /bin/sh' > tests/tmp/rmmod.old
11 echo 'echo -n RMMOD.OLD' >> tests/tmp/rmmod.old
12 echo "for f; do echo -n \ \'\$f\'; done" >> tests/tmp/rmmod.old
13 chmod a+x tests/tmp/rmmod.old
14 PATH=`pwd`/tests/tmp:$PATH
16 # If explicit path given, shouldn't search path.
17 [ "`./rmmod 2>&1`" = "Kernel requires old rmmod, but couldn't run ./rmmod.old: No such file or directory" ]
19 # No args expected
20 [ "`rmmod 2>&1`" = "RMMOD.OLD" ]
22 # Args intact
23 [ "`rmmod --some-wierd-option foo 2>&1`" = "RMMOD.OLD '--some-wierd-option' 'foo'" ]