SVN: geninitrd/trunk/tests: initramfs_switchroot.sh partitions

glen glen at pld-linux.org
Fri Mar 30 16:16:25 CEST 2012


Author: glen
Date: Fri Mar 30 16:16:24 2012
New Revision: 12528

Added:
   geninitrd/trunk/tests/partitions
Modified:
   geninitrd/trunk/tests/initramfs_switchroot.sh
Log:
supply /proc/partitions dump

Modified: geninitrd/trunk/tests/initramfs_switchroot.sh
==============================================================================
--- geninitrd/trunk/tests/initramfs_switchroot.sh	(original)
+++ geninitrd/trunk/tests/initramfs_switchroot.sh	Fri Mar 30 16:16:24 2012
@@ -2,6 +2,7 @@
 # test for initrd_gen_initramfs_switchroot parsing
 
 . ./setup-test.sh
+proc=${proc:-/proc}
 flags=$-
 
 mount() {
@@ -41,7 +42,7 @@
 					printf("device=/dev/%s; maj=%s; min=%s;\n", partition, maj, min);
 				}
 			}
-			' /proc/partitions
+			' $proc/partitions
 		)"
 		if [ "$device" != '/dev/no_partition_found' -a ! -b $device ]; then
 			mknod $device b $maj $min
@@ -62,28 +63,30 @@
 #	echo "init=$init"
 }
 
+proc=.
+
 # We support passing root as hda3 /dev/hda3 0303 0x0303 and 303
-ROOT=hda3
+ROOT=sda3
 runtest <<'EOF'
-mount -t -r /dev/hda3 /newroot
+mount -t -r /dev/sda3 /newroot
 EOF
 
-ROOT=/dev/hda3
+ROOT=/dev/sda3
 runtest <<'EOF'
-mount -t -r /dev/hda3 /newroot
+mount -t -r /dev/sda3 /newroot
 EOF
 
-ROOT=0303
+ROOT=0803
 runtest <<'EOF'
 mount -t -r /dev/sda3 /newroot
 EOF
 
-ROOT=0x0303
+ROOT=0x0803
 runtest <<'EOF'
 mount -t -r /dev/sda3 /newroot
 EOF
 
-ROOT=303
+ROOT=803
 runtest <<'EOF'
 mount -t -r /dev/sda3 /newroot
 EOF

Added: geninitrd/trunk/tests/partitions
==============================================================================
--- (empty file)
+++ geninitrd/trunk/tests/partitions	Fri Mar 30 16:16:24 2012
@@ -0,0 +1,29 @@
+major minor  #blocks  name
+
+   8        0  488386584 sda
+   8        1      40131 sda1
+   8        2    8008402 sda2
+   8        3  480335467 sda3
+   8       16  488386584 sdb
+   8       17      40131 sdb1
+   8       18    8008402 sdb2
+   8       19  480335467 sdb3
+   8       32  732574584 sdc
+   8       33      40131 sdc1
+   8       34    8008402 sdc2
+   8       35  480335467 sdc3
+   8       36  244188000 sdc4
+   9        2  480335360 md2
+ 253        0   22020096 dm-0
+ 253        1   54525952 dm-1
+ 253        2  187695104 dm-2
+ 253        3  146800640 dm-3
+ 253        4   31457280 dm-4
+ 253        5  732574583 dm-5
+ 253        6      40131 dm-6
+ 253        7    8008402 dm-7
+ 253        8  480335467 dm-8
+ 253        9  244188000 dm-9
+   9        0      40064 md0
+   9        1    8008320 md1
+   9        3  480335360 md3


More information about the pld-cvs-commit mailing list