7 MODULE_DIR
=tests
/tmp
/lib
/modules
/$MODTEST_UNAME
11 ln tests
/data
/$BITNESS/normal
/noexport_nodep-
$BITNESS.ko
$MODULE_DIR/a.ko
12 ln -s a.ko
$MODULE_DIR/b.ko
13 ln -s a.ko
$MODULE_DIR/c.ko
14 ln -s a.ko
$MODULE_DIR/d.ko
15 ln -s a.ko
$MODULE_DIR/e.ko
16 ln -s a.ko
$MODULE_DIR/f.ko
19 cat > $MODULE_DIR/modules.dep
<< EOF
20 /lib/modules/$MODTEST_UNAME/a.ko:
21 /lib/modules/$MODTEST_UNAME/b.ko:
22 /lib/modules/$MODTEST_UNAME/c.ko:
23 /lib/modules/$MODTEST_UNAME/d.ko:
24 /lib/modules/$MODTEST_UNAME/e.ko:
25 /lib/modules/$MODTEST_UNAME/f.ko:
30 mkdir
-p tests
/tmp
/etc
/modprobe.d
31 cat > tests
/tmp
/etc
/modprobe.d
/modprobe.conf
<< EOF
34 softdep c pre: a_alias b post: d e
41 R1
=`modprobe -v c_alias 2>&1 | \
42 grep -v INIT_MODULE\: | \
43 sed -e "s/\/lib\/modules\/$MODTEST_UNAME\///g"`
44 R2
=`echo $R1` # remove newlines
45 [ "$R2" = "insmod a.ko insmod b.ko insmod c.ko insmod d.ko insmod e.ko insmod a.ko insmod f.ko" ]
49 R1
=`modprobe -v -r c_alias 2>&1 | \
50 grep -v DELETE_MODULE\: | \
51 sed -e "s/\/lib\/modules\/$MODTEST_UNAME\///g"`
52 R2
=`echo $R1` # remove newlines
53 [ "$R2" = "rmmod f.ko rmmod a.ko rmmod e.ko rmmod d.ko rmmod c.ko rmmod b.ko rmmod a.ko" ]
57 mkdir
-p tests
/tmp
/etc
/modprobe.d
58 cat > tests
/tmp
/etc
/modprobe.d
/modprobe.conf
<< EOF
64 R1
=`modprobe -v a_alias 2>&1 | cat` # shell won't assign to R1 without no-op cat.
65 # This comparison will fail if MAX_RECURSION is odd. In that case: s/b/a/g
66 [ "$R1" = "FATAL: modprobe: softdep dependency loop encountered inserting b" ]