]> git.pld-linux.org Git - projects/geninitrd.git/commitdiff
hack up test using actual functions
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 10 Feb 2011 11:30:35 +0000 (11:30 +0000)
committerElan Ruusamäe <glen@pld-linux.org>
Thu, 10 Feb 2011 11:30:35 +0000 (11:30 +0000)
svn-id: @12131

tests/bug-715930.sh

index dad7aae56339239b75d8ca6fb0333c00450ba859..a7ab70d8209c4a3769becc3d05fca5ea8c92a5a8 100755 (executable)
@@ -1,8 +1,22 @@
-# change the current ahci entry in .pcimap (e.g. my ICH10: 0x8086:0x3a22 to 0x8086:0xffff) and run:
+#!/bin/sh
 
-class=0106
-pcimap="/lib/modules/$(uname -r)/modules.pcimap"
-set -- $(/sbin/lspci -n | awk -vclass=$class '$2 == class":" {split($3, p, ":"); printf("0x0000%s 0x0000%s\n", p[1], p[2])}')
-awk -vvendor=$1 -vdevice=$2 '$2 == vendor && $3 == device {print $1}' $pcimap
+. ../mod-sata.sh
 
-#it returns empty string instead of "ahci"
+warn() {
+       echo "WARNING: $*" >&2
+}
+
+lspci() {
+       echo "
+03:00.0 0106: 197b:2363 (rev 02)
+03:00.1 0101: 197b:2363 (rev 02
+"
+}
+
+lspci=lspci
+pcimap=modules.pcimap-2.6.33.4-1
+
+modules=$(find_modules_by_class 0106)
+if [ -z "$modules" ]; then
+       warn "FAIL"
+fi
This page took 0.048138 seconds and 4 git commands to generate.