modprobe: remove flock() because it never worked anyway
[mit.git] / tests / test-lsmod / disabled02backcompat.sh
blob2ad5e261e98c54886bb4d121a5cd8d86e8851776
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 lsmod.old.
7 [ "`./lsmod 2>&1`" = "Kernel requires old lsmod, but couldn't run ./lsmod.old: No such file or directory" ]
9 # Create one for it to find, put it in the path
10 echo '#! /bin/sh' > tests/tmp/lsmod.old
11 echo 'echo -n LSMOD.OLD' >> tests/tmp/lsmod.old
12 echo "for f; do echo -n \ \'\$f\'; done" >> tests/tmp/lsmod.old
13 chmod a+x tests/tmp/lsmod.old
14 PATH=`pwd`/tests/tmp:$PATH
16 # If explicit path given, shouldn't search path.
17 [ "`./lsmod 2>&1`" = "Kernel requires old lsmod, but couldn't run ./lsmod.old: No such file or directory" ]
19 # No args expected
20 [ "`lsmod 2>&1`" = "LSMOD.OLD" ]
22 # Args intact
23 [ "`lsmod --some-wierd-option foo 2>&1`" = "LSMOD.OLD '--some-wierd-option' 'foo'" ]