SVN: geninitrd/trunk/tests/bug-715930.sh

glen glen at pld-linux.org
Thu Feb 10 12:30:35 CET 2011


Author: glen
Date: Thu Feb 10 12:30:35 2011
New Revision: 12131

Modified:
   geninitrd/trunk/tests/bug-715930.sh
Log:
hack up test using actual functions

Modified: geninitrd/trunk/tests/bug-715930.sh
==============================================================================
--- geninitrd/trunk/tests/bug-715930.sh	(original)
+++ geninitrd/trunk/tests/bug-715930.sh	Thu Feb 10 12:30:35 2011
@@ -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


More information about the pld-cvs-commit mailing list