modprobe: remove flock() because it never worked anyway
[mit.git] / tests / test-lsmod / 04newstyle.sh
blob47486971878298250bc00856e9645bd3f5557c04
1 #! /bin/sh
3 mkdir -p tests/tmp/proc
5 # new style has dependencies like: "name size usecount [dep],[dep] [other]"
6 echo 'foo 100 0 -' > tests/tmp/proc/modules
7 echo 'bar 101 1 -' >> tests/tmp/proc/modules
8 echo 'baz 102 1 baz_dep,' >> tests/tmp/proc/modules
9 echo 'bazz 2147483648 2147483648 bazz_dep,bazz_dep2,' >> tests/tmp/proc/modules
10 echo 'fuzz 104 1 fuzz_dep,[permenant],' >> tests/tmp/proc/modules
11 echo 'fuzzy 105 1 fuzzy_dep,[permenant],[unsafe],' >> tests/tmp/proc/modules
12 echo 'fuzzier 106 0 [permenant],[unsafe],' >> tests/tmp/proc/modules
13 echo 'newstyle 107 0 - unknownfield' >> tests/tmp/proc/modules
14 echo 'newstyle2 108 0 newstyle2_dep, unknownfield unknownfield2' >> tests/tmp/proc/modules
16 # This should be true
17 [ "`./lsmod`" = "Module Size Used by
18 foo 100 0
19 bar 101 1
20 baz 102 1 baz_dep
21 bazz 2147483648 2147483648 bazz_dep,bazz_dep2
22 fuzz 104 1 fuzz_dep,[permenant]
23 fuzzy 105 1 fuzzy_dep,[permenant],[unsafe]
24 fuzzier 106 0 [permenant],[unsafe]
25 newstyle 107 0
26 newstyle2 108 0 newstyle2_dep" ]