Lines Matching +full:modules +full:- +full:2
3 [ -f testing.sh ] && . testing.sh
7 # Android keeps its modules (if any) on the vendor partition.
9 [ -d /vendor/lib/modules ] && MODULE_ROOT="/vendor"
11 if [[ ! -e /proc/modules || ! -d $MODULE_ROOT/lib/modules ]]; then
12 echo "$SHOWSKIP: modinfo (no modules)"
13 return 2>/dev/null
17 testcmd "missing" "missing 2>&1" "modinfo: missing: not found\n" "" ""
19 # Find some modules to work with.
20 MODULE_PATH1=$(find $MODULE_ROOT/lib/modules/ -name *.ko | head -1 2>/dev/null)
21 MODULE1=$(basename -s .ko $MODULE_PATH1)
22 MODULE_PATH2=$(find $MODULE_ROOT/lib/modules/ -name *.ko | head -2 | tail -1 2>/dev/null)
23 MODULE2=$(basename -s .ko $MODULE_PATH2)
24 DASH_MODULE=$(basename -s .ko \
25 $(find $MODULE_ROOT/lib/modules -name *-*.ko | tail -1 2>/dev/null))
26 BAR_MODULE=$(basename -s .ko \
27 $(find $MODULE_ROOT/lib/modules -name *_*.ko | tail -1 2>/dev/null))
35 skipnot [ -n "$DASH_MODULE" ]
36 testing "treats - and _ as equivalent" "modinfo $DASH_MODULE > dash-dash &&
37 modinfo ${DASH_MODULE/-/_} > dash-bar && diff -u dash-dash dash-bar" "" "" ""
38 skipnot [ -n "$BAR_MODULE" ]
39 testing "treats _ and - as equivalent" "modinfo $BAR_MODULE > bar-bar &&
40 modinfo ${BAR_MODULE/_/-} > bar-dash && diff -u bar-bar bar-dash" "" "" ""
42 # Output of -F filename should be an absolute path to the module.
45 testing "-F filename gets absolute path" "modinfo -F filename $MODULE1" \
49 testing "supports multiple modules" "modinfo -F filename $MODULE1 $MODULE2" \