7 MODULE_DIR
=tests
/tmp
/lib
/modules
/$MODTEST_UNAME
9 ln tests
/data
/$BITNESS/normal
/noexport_nodep-
$BITNESS.ko \
12 # Now create modules.dep and modules.conf
13 echo /lib
/modules
/$MODTEST_UNAME/noexport_nodep-
$BITNESS.ko
: > $MODULE_DIR/modules.dep
15 mkdir
-p tests
/tmp
/etc
/modprobe.d
16 echo install foo modprobe noexport_nodep-
$BITNESS > tests
/tmp
/etc
/modprobe.d
/modprobe.conf
17 echo install foo modprobe bar
> tests
/tmp
/etc
/modprobe2.conf
18 echo install bar
echo DOING BAR
>> tests
/tmp
/etc
/modprobe2.conf
20 SIZE_NOEXPORT_NODEP
=`wc -c < tests/data/$BITNESS/normal/noexport_nodep-$BITNESS.ko`
22 # Test normal args, then in env.
23 [ "`modprobe -v noexport_nodep-$BITNESS 2>&1`" = "insmod /lib/modules/$MODTEST_UNAME/noexport_nodep-$BITNESS.ko
24 INIT_MODULE: $SIZE_NOEXPORT_NODEP " ]
25 [ "`MODPROBE_OPTIONS=-v modprobe noexport_nodep-$BITNESS 2>&1`" = "insmod /lib/modules/$MODTEST_UNAME/noexport_nodep-$BITNESS.ko
26 INIT_MODULE: $SIZE_NOEXPORT_NODEP " ]
28 [ "`modprobe -q noexport_nodep-$BITNESS 2>&1`" = "INIT_MODULE: $SIZE_NOEXPORT_NODEP " ]
29 [ "`MODPROBE_OPTIONS=-q modprobe noexport_nodep-$BITNESS 2>&1`" = "INIT_MODULE: $SIZE_NOEXPORT_NODEP " ]
31 [ "`modprobe -n noexport_nodep-$BITNESS 2>&1`" = "" ]
32 [ "`MODPROBE_OPTIONS=-n modprobe noexport_nodep-$BITNESS 2>&1`" = "" ]
34 [ "`modprobe -n -v noexport_nodep-$BITNESS 2>&1`" = "insmod /lib/modules/$MODTEST_UNAME/noexport_nodep-$BITNESS.ko " ]
35 [ "`MODPROBE_OPTIONS="-n -v" modprobe noexport_nodep-$BITNESS 2>&1`" = "insmod /lib/modules/$MODTEST_UNAME/noexport_nodep-$BITNESS.ko " ]
37 # Test argument inheritence.
39 export MODTEST_DO_SYSTEM
41 [ "`modprobe -v foo 2>&1`" = "install modprobe noexport_nodep-$BITNESS
42 insmod /lib/modules/$MODTEST_UNAME/noexport_nodep-$BITNESS.ko
43 INIT_MODULE: $SIZE_NOEXPORT_NODEP " ]
44 [ "`MODPROBE_OPTIONS=-v modprobe foo 2>&1`" = "install modprobe noexport_nodep-$BITNESS
45 insmod /lib/modules/$MODTEST_UNAME/noexport_nodep-$BITNESS.ko
46 INIT_MODULE: $SIZE_NOEXPORT_NODEP " ]
48 [ "`modprobe -C /etc/modprobe2.conf foo 2>&1`" = "DOING BAR" ]
49 [ "`MODPROBE_OPTIONS='-C /etc/modprobe2.conf' modprobe foo 2>&1`" = "DOING BAR" ]
51 [ "`modprobe -C /etc/modprobe2.conf -v foo 2>&1`" = "install modprobe bar
52 install echo DOING BAR
54 [ "`MODPROBE_OPTIONS='-C /etc/modprobe2.conf' modprobe -v foo 2>&1`" = "install modprobe bar
55 install echo DOING BAR