8 MODULE_DIR
=tests
/tmp
/lib
/modules
/$MODTEST_UNAME
10 ln tests
/data
/$BITNESS/normal
/export_nodep-
$BITNESS.ko \
11 tests
/data
/$BITNESS/normal
/noexport_dep-
$BITNESS.ko \
14 # Now create modules.dep
15 cat > $MODULE_DIR/modules.dep
<<EOF
16 noexport_dep-$BITNESS.ko: export_nodep-$BITNESS.ko
17 export_nodep-$BITNESS.ko:
21 SIZE_EXPORT_NODEP
=`wc -c < tests/data/$BITNESS/normal/export_nodep-$BITNESS.ko`
22 SIZE_NOEXPORT_DEP
=`wc -c < tests/data/$BITNESS/normal/noexport_dep-$BITNESS.ko`
25 mkdir
-p tests
/tmp
/sys
/module
27 # Check it pulls in both.
28 [ "`modprobe noexport_dep-$BITNESS 2>&1`" = "INIT_MODULE: $SIZE_EXPORT_NODEP
29 INIT_MODULE: $SIZE_NOEXPORT_DEP " ]
31 # Check it's happy if we tell it dep is already instealled
32 mkdir
-p tests
/tmp
/sys
/module
33 mkdir
-p tests
/tmp
/sys
/module
/export_nodep_
$BITNESS
34 echo "live" >tests
/tmp
/sys
/module
/export_nodep_
$BITNESS/initstate
36 [ "`modprobe noexport_dep-$BITNESS 2>&1`" = "INIT_MODULE: $SIZE_NOEXPORT_DEP " ]
38 # If there's an install command, it will be done.
39 # Clean up sysfs (so we don't think it's loaded)
42 mkdir
-p tests
/tmp
/etc
/modprobe.d
43 echo "install export_nodep-$BITNESS COMMAND" > tests
/tmp
/etc
/modprobe.d
/modprobe.conf
44 [ "`modprobe noexport_dep-$BITNESS 2>&1`" = "SYSTEM: COMMAND
45 INIT_MODULE: $SIZE_NOEXPORT_DEP " ]
47 # If it's in /sys/module, install command WONT be done.
48 mkdir
-p tests
/tmp
/sys
/module
49 mkdir
-p tests
/tmp
/sys
/module
/export_nodep_
$BITNESS
50 echo "live" >tests
/tmp
/sys
/module
/export_nodep_
$BITNESS/initstate
52 [ "`modprobe noexport_dep-$BITNESS 2>&1`" = "INIT_MODULE: $SIZE_NOEXPORT_DEP " ]
54 # Do dependencies even if install command.
55 # clean up sysfs (so we don't think it's loaded)
58 echo "install noexport_dep-$BITNESS COMMAND" > tests
/tmp
/etc
/modprobe.d
/modprobe.conf
60 [ "`modprobe noexport_dep-$BITNESS 2>&1`" = "INIT_MODULE: $SIZE_EXPORT_NODEP