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

glen glen at pld-linux.org
Fri Feb 11 13:30:58 CET 2011


Author: glen
Date: Fri Feb 11 13:30:58 2011
New Revision: 12144

Modified:
   geninitrd/trunk/tests/bug-715930.sh
Log:
- update test

Modified: geninitrd/trunk/tests/bug-715930.sh
==============================================================================
--- geninitrd/trunk/tests/bug-715930.sh	(original)
+++ geninitrd/trunk/tests/bug-715930.sh	Fri Feb 11 13:30:58 2011
@@ -5,6 +5,12 @@
 warn() {
 	echo "WARNING: $*" >&2
 }
+debug() {
+	echo "debug: $*" >&2
+}
+modinfo() {
+	/sbin/modinfo "$@"
+}
 
 lspci() {
 	echo "
@@ -14,15 +20,28 @@
 }
 
 lspci=lspci
-pcimap=modules.pcimap-2.6.33.4-1
+kernel=2.6.33.4-1
+kernel=`uname -r`
+#pcimap=modules.pcimap-$kernel
+#pcimap=new
+pcimap="/lib/modules/$kernel/modules.pcimap"
 
 # our test succeeds if these modules get matched:
 #modules.pcimap-2.6.33.4-1:jmicron              0x0000197b 0x0000ffff 0x0000ffff 0x0000ffff 0x00010100 0x00ffff00 0x0
 #modules.pcimap-2.6.33.4-1:pata_jmicron         0x0000197b 0x0000ffff 0x0000ffff 0x0000ffff 0x00010100 0x00ffff00 0x0
 #modules.pcimap-2.6.33.4-1:ahci                 0x0000197b 0x0000ffff 0x0000ffff 0x0000ffff 0x00010601 0x00ffffff 0x0
 
-modules=$(find_modules_by_class 0106 | xargs)
-if [ "$modules" != "jmicron pata_jmicron ahci" ]; then
+load_modules=""
+find_module() {
+	load_modules="$load_modules $1"
+}
+
+find_modules_sata
+
+# trim modules
+modules=$(echo $load_modules)
+
+if [ "$modules" != "pata_jmicron ahci jmicron" ]; then
 	warn "FAIL: [$modules]"
 else
 	echo "OK: [$modules]"


More information about the pld-cvs-commit mailing list