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" ]
20 [ "`lsmod 2>&1`" = "LSMOD.OLD" ]
23 [ "`lsmod --some-wierd-option foo 2>&1`" = "LSMOD.OLD '--some-wierd-option' 'foo'" ]