depmod: fix tabs in help output
[module-init-tools.git] / tests / test-modprobe / 23recursive-deps.sh
blobf425e9b74c0e9a043baa2779c91f9e9b7e09fd20
1 #! /bin/sh
3 # If A depends on B and C, and B is installed, C still needs to be installed!
4 # (Bug in 3.0-pre6 & 3.0-pre7).
6 BITNESS=32
8 rm -rf tests/tmp/*
10 # Create inputs
11 MODULE_DIR=tests/tmp/lib/modules/$MODTEST_UNAME
12 mkdir -p $MODULE_DIR
13 ln tests/data/$BITNESS/normal/export_dep-$BITNESS.ko \
14 tests/data/$BITNESS/normal/noexport_dep-$BITNESS.ko \
15 tests/data/$BITNESS/normal/export_nodep-$BITNESS.ko \
16 tests/data/$BITNESS/normal/noexport_nodep-$BITNESS.ko \
17 tests/data/$BITNESS/normal/noexport_doubledep-$BITNESS.ko \
18 $MODULE_DIR
20 # Now create modules.dep
21 cat > $MODULE_DIR/modules.dep <<EOF
22 # Should handle comments.
23 noexport_doubledep-$BITNESS.ko: export_dep-$BITNESS.ko export_nodep-$BITNESS.ko
24 EOF
26 # Now, export-dep is in /sys/module (actually this can't happen, since it
27 # depends on export_nodep, but this is to test).
28 mkdir -p tests/tmp/sys/module
29 mkdir -p tests/tmp/sys/module/export_dep_$BITNESS
30 echo "live" > tests/tmp/sys/module/export_dep_$BITNESS/initstate
32 SIZE_EXPORT_NODEP=`wc -c < tests/data/$BITNESS/normal/export_nodep-$BITNESS.ko`
33 SIZE_NOEXPORT_DOUBLEDEP=`wc -c < tests/data/$BITNESS/normal/noexport_doubledep-$BITNESS.ko`
35 [ "`modprobe -v noexport_doubledep-$BITNESS 2>&1`" = "insmod /lib/modules/$MODTEST_UNAME/export_nodep-$BITNESS.ko
36 INIT_MODULE: $SIZE_EXPORT_NODEP
37 insmod /lib/modules/$MODTEST_UNAME/noexport_doubledep-$BITNESS.ko
38 INIT_MODULE: $SIZE_NOEXPORT_DOUBLEDEP " ]