2 # Complex tests of generation of 32-bit and 64-bit modules.dep
10 for ENDIAN
in -le -be; do
11 for BITNESS
in 32 64; do
16 MODULE_DIR
=tests
/tmp
/lib
/modules
/$MODTEST_UNAME
18 ln tests
/data
/$BITNESS$ENDIAN/complex
/complex_a-
$BITNESS.ko \
19 tests
/data
/$BITNESS$ENDIAN/complex
/complex_b-
$BITNESS.ko \
20 tests
/data
/$BITNESS$ENDIAN/complex
/complex_c-
$BITNESS.ko \
21 tests
/data
/$BITNESS$ENDIAN/complex
/complex_d-
$BITNESS.ko \
22 tests
/data
/$BITNESS$ENDIAN/complex
/complex_e-
$BITNESS.ko \
26 [ "`depmod 2>&1`" = "" ]
28 # Check results: expect 5 lines
29 [ `grep -vc '^#' < $MODULE_DIR/modules.dep` = 5 ]
31 # Could be a: c d b e or A: d c b e.
32 [ "`grep -w complex_a-$BITNESS.ko: $MODULE_DIR/modules.dep`" = "complex_a-$BITNESS.ko: complex_c-$BITNESS.ko complex_d-$BITNESS.ko complex_b-$BITNESS.ko complex_e-$BITNESS.ko" ] ||
[ "`grep -w complex_a-$BITNESS.ko: $MODULE_DIR/modules.dep`" = "complex_a-$BITNESS.ko: complex_d-$BITNESS.ko complex_c-$BITNESS.ko complex_b-$BITNESS.ko complex_e-$BITNESS.ko" ]
34 [ "`grep -w complex_b-$BITNESS.ko: $MODULE_DIR/modules.dep`" = "complex_b-$BITNESS.ko: complex_e-$BITNESS.ko" ]
36 [ "`grep -w complex_c-$BITNESS.ko: $MODULE_DIR/modules.dep`" = "complex_c-$BITNESS.ko: complex_b-$BITNESS.ko complex_e-$BITNESS.ko" ]
38 [ "`grep -w complex_d-$BITNESS.ko: $MODULE_DIR/modules.dep`" = "complex_d-$BITNESS.ko: complex_b-$BITNESS.ko complex_e-$BITNESS.ko" ]
40 [ "`grep -w complex_e-$BITNESS.ko: $MODULE_DIR/modules.dep`" = "complex_e-$BITNESS.ko:" ]
42 mv $MODULE_DIR/modules.dep
$MODULE_DIR/modules.dep.old
43 mv $MODULE_DIR/modules.symbols
$MODULE_DIR/modules.symbols.old
46 [ "`depmod -a`" = "" ]
47 diff -u $MODULE_DIR/modules.dep.old
$MODULE_DIR/modules.dep
48 mv $MODULE_DIR/modules.dep
$MODULE_DIR/modules.dep.old
50 [ "`depmod -A`" = "" ]
51 diff -u $MODULE_DIR/modules.dep.old
$MODULE_DIR/modules.dep
52 mv $MODULE_DIR/modules.dep
$MODULE_DIR/modules.dep.old
54 [ "`depmod -e -A`" = "" ]
55 diff -u $MODULE_DIR/modules.dep.old
$MODULE_DIR/modules.dep
56 mv $MODULE_DIR/modules.dep
$MODULE_DIR/modules.dep.old
58 [ "`depmod -e -A $MODTEST_VERSION`" = "" ]
59 diff -u $MODULE_DIR/modules.dep.old
$MODULE_DIR/modules.dep
60 mv $MODULE_DIR/modules.dep
$MODULE_DIR/modules.dep.old
62 # Combined should form stdout versions.
63 grep -vh '^#' $MODULE_DIR/modules.dep.old
$MODULE_DIR/modules.symbols.old
> $MODULE_DIR/modules.all.old
66 depmod
-n |
grep -v '^#' > $MODULE_DIR/modules.all
67 diff -u $MODULE_DIR/modules.all.old
$MODULE_DIR/modules.all
68 mv $MODULE_DIR/modules.all
$MODULE_DIR/modules.all.old
70 depmod
-a -n |
grep -v '^#' > $MODULE_DIR/modules.all
71 diff -u $MODULE_DIR/modules.all.old
$MODULE_DIR/modules.all
72 mv $MODULE_DIR/modules.all
$MODULE_DIR/modules.all.old
74 depmod
-n -a $MODTEST_VERSION |
grep -v '^#' > $MODULE_DIR/modules.all
75 diff -u $MODULE_DIR/modules.all.old
$MODULE_DIR/modules.all
76 mv $MODULE_DIR/modules.all
$MODULE_DIR/modules.all.old
78 depmod
-e -n -A $MODTEST_VERSION |
grep -v '^#' > $MODULE_DIR/modules.all
79 diff -u $MODULE_DIR/modules.all.old
$MODULE_DIR/modules.all
80 mv $MODULE_DIR/modules.all
$MODULE_DIR/modules.all.old