2 # modprobe -r supports multiple module names now.
9 MODULE_DIR
=tests
/tmp
/lib
/modules
/$MODTEST_UNAME
11 ln tests
/data
/$BITNESS/normal
/export_dep-
$BITNESS.ko \
12 tests
/data
/$BITNESS/normal
/noexport_dep-
$BITNESS.ko \
13 tests
/data
/$BITNESS/normal
/export_nodep-
$BITNESS.ko \
14 tests
/data
/$BITNESS/normal
/noexport_nodep-
$BITNESS.ko \
15 tests
/data
/$BITNESS/normal
/noexport_doubledep-
$BITNESS.ko \
18 # Now create modules.dep
19 cat > $MODULE_DIR/modules.dep
<<EOF
20 # Should handle comments.
21 noexport_nodep-$BITNESS.ko:
22 noexport_doubledep-$BITNESS.ko: export_dep-$BITNESS.ko export_nodep-$BITNESS.ko
23 noexport_dep-$BITNESS.ko: export_nodep-$BITNESS.ko
24 export_nodep-$BITNESS.ko:
25 export_dep-$BITNESS.ko: export_nodep-$BITNESS.ko
28 # Now make a fake /sys/module structure for the test
29 mkdir
-p tests
/tmp
/sys
/module
30 mkdir
-p tests
/tmp
/sys
/module
/noexport_nodep_
$BITNESS
31 mkdir
-p tests
/tmp
/sys
/module
/noexport_dep_
$BITNESS
32 mkdir
-p tests
/tmp
/sys
/module
/export_nodep_
$BITNESS
33 mkdir
-p tests
/tmp
/sys
/module
/export_dep_
$BITNESS
34 mkdir
-p tests
/tmp
/sys
/module
/noexport_doubledep_
$BITNESS
35 echo live
> tests
/tmp
/sys
/module
/noexport_nodep_
$BITNESS/initstate
36 echo live
> tests
/tmp
/sys
/module
/noexport_dep_
$BITNESS/initstate
37 echo live
> tests
/tmp
/sys
/module
/export_nodep_
$BITNESS/initstate
38 echo live
> tests
/tmp
/sys
/module
/export_dep_
$BITNESS/initstate
39 echo live
> tests
/tmp
/sys
/module
/noexport_doubledep_
$BITNESS/initstate
42 [ "`modprobe -r noexport_nodep-$BITNESS export_nodep-$BITNESS 2>&1`" = "DELETE_MODULE: noexport_nodep_$BITNESS EXCL
43 DELETE_MODULE: export_nodep_$BITNESS EXCL " ]