]> git.pld-linux.org Git - projects/geninitrd.git/blob - tests/bug-715930.sh
supply /proc/partitions dump
[projects/geninitrd.git] / tests / bug-715930.sh
1 #!/bin/sh
2
3 . ../mod-sata.sh
4
5 warn() {
6         echo "WARNING: $*" >&2
7 }
8 debug() {
9         echo "debug: $*" >&2
10 }
11 modinfo() {
12         /sbin/modinfo "$@"
13 }
14
15 lspci() {
16         echo "
17 03:00.0 0106: 197b:2363 (rev 02)
18 03:00.1 0101: 197b:2363 (rev 02
19 "
20 }
21
22 lspci=lspci
23 kernel=2.6.33.4-1
24 kernel=`uname -r`
25 #pcimap=modules.pcimap-$kernel
26 #pcimap=new
27 pcimap="/lib/modules/$kernel/modules.pcimap"
28
29 # our test succeeds if these modules get matched:
30 #modules.pcimap-2.6.33.4-1:jmicron              0x0000197b 0x0000ffff 0x0000ffff 0x0000ffff 0x00010100 0x00ffff00 0x0
31 #modules.pcimap-2.6.33.4-1:pata_jmicron         0x0000197b 0x0000ffff 0x0000ffff 0x0000ffff 0x00010100 0x00ffff00 0x0
32 #modules.pcimap-2.6.33.4-1:ahci                 0x0000197b 0x0000ffff 0x0000ffff 0x0000ffff 0x00010601 0x00ffffff 0x0
33
34 load_modules=""
35 find_module() {
36         load_modules="$load_modules $1"
37 }
38
39 find_modules_sata
40
41 # trim modules
42 modules=$(echo $load_modules)
43
44 if [ "$modules" != "pata_jmicron ahci jmicron" ]; then
45         warn "FAIL: [$modules]"
46 else
47         echo "OK: [$modules]"
48 fi
This page took 0.037537 seconds and 3 git commands to generate.