diff options
author | Geoff Levand <geoff@infradead.org> | 2012-03-18 22:19:49 -0700 |
---|---|---|
committer | Geoff Levand <geoff@infradead.org> | 2012-03-18 22:19:49 -0700 |
commit | 8bd85461621fb0ff18059305a6c1aecdbc18016c (patch) | |
tree | ef74fc1a811fc1c14797b0a2ab0735d37475e0dd /test/parser/data | |
parent | d40cc2cc3f7c78a766c7ab26aa0cb73ae17534c0 (diff) | |
download | talos-petitboot-8bd85461621fb0ff18059305a6c1aecdbc18016c.tar.gz talos-petitboot-8bd85461621fb0ff18059305a6c1aecdbc18016c.zip |
Parser test cleanup
Major cleanup of parser tests.
* Change test data directory layout to ease test automation.
* Remove some unneeded files.
* Re-write test wraper script, rename to run-parser-tests.
* Rework for autotools.
Signed-off-by: Geoff Levand <geoff@infradead.org>
Diffstat (limited to 'test/parser/data')
20 files changed, 262 insertions, 0 deletions
diff --git a/test/parser/data/kboot-01/etc/kboot.conf b/test/parser/data/kboot-01/etc/kboot.conf new file mode 100644 index 0000000..591c51b --- /dev/null +++ b/test/parser/data/kboot-01/etc/kboot.conf @@ -0,0 +1,9 @@ +# Ubuntu feisty kboot.conf +message=/etc/kboot.msg +timeout=300 +default=live +live='/casper/vmlinux initrd=/casper/initrd.gz file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash --' +live_nosplash='/casper/vmlinux initrd=/casper/initrd.gz file=/cdrom/preseed/ubuntu.seed boot=casper quiet --' +driverupdates='/casper/vmlinux initrd=/casper/initrd.gz file=/cdrom/preseed/ubuntu.seed boot=casper debian-installer/driver-update=true quiet splash --' +check='/casper/vmlinux initrd=/casper/initrd.gz boot=casper integrity-check quiet splash --' + diff --git a/test/parser/data/kboot-01/expected-output b/test/parser/data/kboot-01/expected-output new file mode 100644 index 0000000..bace9f7 --- /dev/null +++ b/test/parser/data/kboot-01/expected-output @@ -0,0 +1,24 @@ +[dev 0] id: /dev/ps3da1 +[dev 0] name: (null) +[dev 0] description: (null) +[dev 0] boot_image: /usr/share/petitboot/artwork/hdd.png +[opt 0] name: live +[opt 0] description: /casper/vmlinux root=/dev/ram0 initrd=/casper/initrd.gz file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash -- +[opt 0] boot_image: devices/parser-tests/001/ps3da1/casper/vmlinux +[opt 0] initrd: devices/parser-tests/001/ps3da1/casper/initrd.gz +[opt 0] boot_args: root=/dev/ram0 initrd=/casper/initrd.gz file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash -- +[opt 1] name: live_nosplash +[opt 1] description: /casper/vmlinux root=/dev/ram0 initrd=/casper/initrd.gz file=/cdrom/preseed/ubuntu.seed boot=casper quiet -- +[opt 1] boot_image: devices/parser-tests/001/ps3da1/casper/vmlinux +[opt 1] initrd: devices/parser-tests/001/ps3da1/casper/initrd.gz +[opt 1] boot_args: root=/dev/ram0 initrd=/casper/initrd.gz file=/cdrom/preseed/ubuntu.seed boot=casper quiet -- +[opt 2] name: driverupdates +[opt 2] description: /casper/vmlinux root=/dev/ram0 initrd=/casper/initrd.gz file=/cdrom/preseed/ubuntu.seed boot=casper debian-installer/driver-update=true quiet splash -- +[opt 2] boot_image: devices/parser-tests/001/ps3da1/casper/vmlinux +[opt 2] initrd: devices/parser-tests/001/ps3da1/casper/initrd.gz +[opt 2] boot_args: root=/dev/ram0 initrd=/casper/initrd.gz file=/cdrom/preseed/ubuntu.seed boot=casper debian-installer/driver-update=true quiet splash -- +[opt 3] name: check +[opt 3] description: /casper/vmlinux root=/dev/ram0 initrd=/casper/initrd.gz boot=casper integrity-check quiet splash -- +[opt 3] boot_image: devices/parser-tests/001/ps3da1/casper/vmlinux +[opt 3] initrd: devices/parser-tests/001/ps3da1/casper/initrd.gz +[opt 3] boot_args: root=/dev/ram0 initrd=/casper/initrd.gz boot=casper integrity-check quiet splash -- diff --git a/test/parser/data/kboot-02/etc/kboot.conf b/test/parser/data/kboot-02/etc/kboot.conf new file mode 100644 index 0000000..a7bb199 --- /dev/null +++ b/test/parser/data/kboot-02/etc/kboot.conf @@ -0,0 +1,4 @@ +# test remapping sda to ps3da, when mounted from a ps3da device + +test='/dev/sda1:/vmlinux' + diff --git a/test/parser/data/kboot-02/expected-output b/test/parser/data/kboot-02/expected-output new file mode 100644 index 0000000..4f60310 --- /dev/null +++ b/test/parser/data/kboot-02/expected-output @@ -0,0 +1,9 @@ +[dev 0] id: /dev/ps3da1 +[dev 0] name: (null) +[dev 0] description: (null) +[dev 0] boot_image: /usr/share/petitboot/artwork/hdd.png +[opt 0] name: test +[opt 0] description: /dev/sda1:/vmlinux +[opt 0] boot_image: devices/parser-tests/003/ps3da1/vmlinux +[opt 0] initrd: (null) +[opt 0] boot_args: (null) diff --git a/test/parser/data/kboot-03/etc/kboot.conf b/test/parser/data/kboot-03/etc/kboot.conf new file mode 100644 index 0000000..9755f77 --- /dev/null +++ b/test/parser/data/kboot-03/etc/kboot.conf @@ -0,0 +1,4 @@ +# test remapping sda to ps3da, when mounted from a plain sd device + +test='/dev/sda1:/vmlinux' + diff --git a/test/parser/data/kboot-03/expected-output b/test/parser/data/kboot-03/expected-output new file mode 100644 index 0000000..76a90a2 --- /dev/null +++ b/test/parser/data/kboot-03/expected-output @@ -0,0 +1,9 @@ +[dev 0] id: /dev/sda1 +[dev 0] name: (null) +[dev 0] description: (null) +[dev 0] boot_image: /usr/share/petitboot/artwork/hdd.png +[opt 0] name: test +[opt 0] description: /dev/sda1:/vmlinux +[opt 0] boot_image: devices/parser-tests/004/sda1/vmlinux +[opt 0] initrd: (null) +[opt 0] boot_args: (null) diff --git a/test/parser/data/kboot-04/etc/kboot.conf b/test/parser/data/kboot-04/etc/kboot.conf new file mode 100644 index 0000000..72b7db8 --- /dev/null +++ b/test/parser/data/kboot-04/etc/kboot.conf @@ -0,0 +1,6 @@ + +# test for LABEL= and UUID= lookups + +test_uuid='UUID=meep:/vmlinux' +test_label='LABEL=meep:/vmlinux' + diff --git a/test/parser/data/kboot-04/expected-output b/test/parser/data/kboot-04/expected-output new file mode 100644 index 0000000..bfaccc8 --- /dev/null +++ b/test/parser/data/kboot-04/expected-output @@ -0,0 +1,14 @@ +[dev 0] id: /dev/ps3da1 +[dev 0] name: (null) +[dev 0] description: (null) +[dev 0] boot_image: /usr/share/petitboot/artwork/hdd.png +[opt 0] name: test_uuid +[opt 0] description: UUID=meep:/vmlinux +[opt 0] boot_image: devices/parser-tests/005/disk/by-uuid/meep/vmlinux +[opt 0] initrd: (null) +[opt 0] boot_args: (null) +[opt 1] name: test_label +[opt 1] description: LABEL=meep:/vmlinux +[opt 1] boot_image: devices/parser-tests/005/disk/by-label/meep/vmlinux +[opt 1] initrd: (null) +[opt 1] boot_args: (null) diff --git a/test/parser/data/kboot-05/etc/kboot.conf b/test/parser/data/kboot-05/etc/kboot.conf new file mode 100644 index 0000000..4a986c0 --- /dev/null +++ b/test/parser/data/kboot-05/etc/kboot.conf @@ -0,0 +1,12 @@ +# kboot.conf for ydl + +default=ydl +timeout=10 +root=/dev/sda1 +ydl='/dev/sda1:/vmlinux-2.6.22-0.ydl.rc4 initrd=/dev/sda1:/initrd-2.6.22-0.ydl.rc4.img root=LABEL=/ init=/sbin/init video=ps3fb:mode:3 rhgb' +ydl480i='/dev/sda1:/vmlinux-2.6.22-0.ydl.rc4 initrd=/dev/sda1:/initrd-2.6.22-0.ydl.rc4.img root=LABEL=/ init=/sbin/init video=ps3fb:mode:1 rhgb' +ydl1080i='/dev/sda1:/vmlinux-2.6.22-0.ydl.rc4 initrd=/dev/sda1:/initrd-2.6.22-0.ydl.rc4.img root=LABEL=/ init=/sbin/init video=ps3fb:mode:4 rhgb' +ydltext='/dev/sda1:/vmlinux-2.6.22-0.ydl.rc4 initrd=/dev/sda1:/initrd-2.6.22-0.ydl.rc4.img root=LABEL=/ init=/sbin/init 3' + + + diff --git a/test/parser/data/kboot-05/expected-output b/test/parser/data/kboot-05/expected-output new file mode 100644 index 0000000..45d99a1 --- /dev/null +++ b/test/parser/data/kboot-05/expected-output @@ -0,0 +1,24 @@ +[dev 0] id: /dev/ps3da1 +[dev 0] name: (null) +[dev 0] description: (null) +[dev 0] boot_image: /usr/share/petitboot/artwork/hdd.png +[opt 0] name: ydl +[opt 0] description: /dev/sda1:/vmlinux-2.6.22-0.ydl.rc4 root=LABEL=/ initrd=/dev/sda1:/initrd-2.6.22-0.ydl.rc4.img init=/sbin/init video=ps3fb:mode:3 rhgb +[opt 0] boot_image: devices/parser-tests/101/ps3da1/vmlinux-2.6.22-0.ydl.rc4 +[opt 0] initrd: devices/parser-tests/101/ps3da1/initrd-2.6.22-0.ydl.rc4.img +[opt 0] boot_args: root=LABEL=/ initrd=/dev/sda1:/initrd-2.6.22-0.ydl.rc4.img init=/sbin/init video=ps3fb:mode:3 rhgb +[opt 1] name: ydl480i +[opt 1] description: /dev/sda1:/vmlinux-2.6.22-0.ydl.rc4 root=LABEL=/ initrd=/dev/sda1:/initrd-2.6.22-0.ydl.rc4.img init=/sbin/init video=ps3fb:mode:1 rhgb +[opt 1] boot_image: devices/parser-tests/101/ps3da1/vmlinux-2.6.22-0.ydl.rc4 +[opt 1] initrd: devices/parser-tests/101/ps3da1/initrd-2.6.22-0.ydl.rc4.img +[opt 1] boot_args: root=LABEL=/ initrd=/dev/sda1:/initrd-2.6.22-0.ydl.rc4.img init=/sbin/init video=ps3fb:mode:1 rhgb +[opt 2] name: ydl1080i +[opt 2] description: /dev/sda1:/vmlinux-2.6.22-0.ydl.rc4 root=LABEL=/ initrd=/dev/sda1:/initrd-2.6.22-0.ydl.rc4.img init=/sbin/init video=ps3fb:mode:4 rhgb +[opt 2] boot_image: devices/parser-tests/101/ps3da1/vmlinux-2.6.22-0.ydl.rc4 +[opt 2] initrd: devices/parser-tests/101/ps3da1/initrd-2.6.22-0.ydl.rc4.img +[opt 2] boot_args: root=LABEL=/ initrd=/dev/sda1:/initrd-2.6.22-0.ydl.rc4.img init=/sbin/init video=ps3fb:mode:4 rhgb +[opt 3] name: ydltext +[opt 3] description: /dev/sda1:/vmlinux-2.6.22-0.ydl.rc4 root=LABEL=/ initrd=/dev/sda1:/initrd-2.6.22-0.ydl.rc4.img init=/sbin/init 3 +[opt 3] boot_image: devices/parser-tests/101/ps3da1/vmlinux-2.6.22-0.ydl.rc4 +[opt 3] initrd: devices/parser-tests/101/ps3da1/initrd-2.6.22-0.ydl.rc4.img +[opt 3] boot_args: root=LABEL=/ initrd=/dev/sda1:/initrd-2.6.22-0.ydl.rc4.img init=/sbin/init 3 diff --git a/test/parser/data/kboot-06/etc/kboot.conf b/test/parser/data/kboot-06/etc/kboot.conf new file mode 100644 index 0000000..591c51b --- /dev/null +++ b/test/parser/data/kboot-06/etc/kboot.conf @@ -0,0 +1,9 @@ +# Ubuntu feisty kboot.conf +message=/etc/kboot.msg +timeout=300 +default=live +live='/casper/vmlinux initrd=/casper/initrd.gz file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash --' +live_nosplash='/casper/vmlinux initrd=/casper/initrd.gz file=/cdrom/preseed/ubuntu.seed boot=casper quiet --' +driverupdates='/casper/vmlinux initrd=/casper/initrd.gz file=/cdrom/preseed/ubuntu.seed boot=casper debian-installer/driver-update=true quiet splash --' +check='/casper/vmlinux initrd=/casper/initrd.gz boot=casper integrity-check quiet splash --' + diff --git a/test/parser/data/kboot-06/expected-output b/test/parser/data/kboot-06/expected-output new file mode 100644 index 0000000..cc0d096 --- /dev/null +++ b/test/parser/data/kboot-06/expected-output @@ -0,0 +1,24 @@ +[dev 0] id: /dev/ps3da1 +[dev 0] name: (null) +[dev 0] description: (null) +[dev 0] boot_image: /usr/share/petitboot/artwork/hdd.png +[opt 0] name: live +[opt 0] description: /casper/vmlinux root=/dev/ram0 initrd=/casper/initrd.gz file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash -- +[opt 0] boot_image: devices/parser-tests/102/ps3da1/casper/vmlinux +[opt 0] initrd: devices/parser-tests/102/ps3da1/casper/initrd.gz +[opt 0] boot_args: root=/dev/ram0 initrd=/casper/initrd.gz file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash -- +[opt 1] name: live_nosplash +[opt 1] description: /casper/vmlinux root=/dev/ram0 initrd=/casper/initrd.gz file=/cdrom/preseed/ubuntu.seed boot=casper quiet -- +[opt 1] boot_image: devices/parser-tests/102/ps3da1/casper/vmlinux +[opt 1] initrd: devices/parser-tests/102/ps3da1/casper/initrd.gz +[opt 1] boot_args: root=/dev/ram0 initrd=/casper/initrd.gz file=/cdrom/preseed/ubuntu.seed boot=casper quiet -- +[opt 2] name: driverupdates +[opt 2] description: /casper/vmlinux root=/dev/ram0 initrd=/casper/initrd.gz file=/cdrom/preseed/ubuntu.seed boot=casper debian-installer/driver-update=true quiet splash -- +[opt 2] boot_image: devices/parser-tests/102/ps3da1/casper/vmlinux +[opt 2] initrd: devices/parser-tests/102/ps3da1/casper/initrd.gz +[opt 2] boot_args: root=/dev/ram0 initrd=/casper/initrd.gz file=/cdrom/preseed/ubuntu.seed boot=casper debian-installer/driver-update=true quiet splash -- +[opt 3] name: check +[opt 3] description: /casper/vmlinux root=/dev/ram0 initrd=/casper/initrd.gz boot=casper integrity-check quiet splash -- +[opt 3] boot_image: devices/parser-tests/102/ps3da1/casper/vmlinux +[opt 3] initrd: devices/parser-tests/102/ps3da1/casper/initrd.gz +[opt 3] boot_args: root=/dev/ram0 initrd=/casper/initrd.gz boot=casper integrity-check quiet splash -- diff --git a/test/parser/data/kboot-07/etc/kboot.conf b/test/parser/data/kboot-07/etc/kboot.conf new file mode 100644 index 0000000..3f8f15c --- /dev/null +++ b/test/parser/data/kboot-07/etc/kboot.conf @@ -0,0 +1,7 @@ +default=tftp_nfs_1080p +timeout=120 + +tftp='tftp://192.168.0.5/fire/boot/vmlinux.strip root=/dev/nfs rw ip=dhcp video=1080p' +nfs='nfs://192.168.0.5/fire/boot/vmlinux.strip root=/dev/nfs rw ip=dhcp video=1080p fbcon=rotate:3' +http_nfs='http://192.168.0.5/ice/boot/vmlinux.strip nfs://192.168.0.5/ice/boot/initrd root=/dev/nfs' + diff --git a/test/parser/data/yaboot-01/etc/yaboot.conf b/test/parser/data/yaboot-01/etc/yaboot.conf new file mode 100644 index 0000000..f13b1b3 --- /dev/null +++ b/test/parser/data/yaboot-01/etc/yaboot.conf @@ -0,0 +1,8 @@ +init-message = "\nWelcome to the 64-bit Yellow Dog Linux 5.0 installer!\nHit <TAB> for boot options.\n\n" +timeout=6000 +default=linux + +image=/ppc/ppc64/vmlinux + label=linux + initrd=/ppc/ppc64/ramdisk.image.gz + read-only diff --git a/test/parser/data/yaboot-01/expected-output b/test/parser/data/yaboot-01/expected-output new file mode 100644 index 0000000..304f15c --- /dev/null +++ b/test/parser/data/yaboot-01/expected-output @@ -0,0 +1,9 @@ +[dev 0] id: /dev/ps3da1 +[dev 0] name: (null) +[dev 0] description: +[dev 0] boot_image: /usr/share/petitboot/artwork/hdd.png +[opt 0] name: linux +[opt 0] description: (null) +[opt 0] boot_image: devices/parser-tests/002/ps3da1/ppc/ppc64/vmlinux +[opt 0] initrd: devices/parser-tests/002/ps3da1/ppc/ppc64/ramdisk.image.gz +[opt 0] boot_args: ro diff --git a/test/parser/data/yaboot-02/etc/yaboot.conf b/test/parser/data/yaboot-02/etc/yaboot.conf new file mode 100644 index 0000000..8f44792 --- /dev/null +++ b/test/parser/data/yaboot-02/etc/yaboot.conf @@ -0,0 +1,27 @@ +# yaboot.conf generated by anaconda + +boot=/dev/ps3da +init-message="Welcome to Fedora!\nHit <TAB> for boot options" + +partition=1 +timeout=80 +install=/usr/lib/yaboot/yaboot +enablecdboot +enableofboot +enablenetboot +nonvram +mntpoint=/boot/yaboot +usemount + +image=/boot/vmlinuz-2.6.25-1.fc9.ppc64 + label=2.6.25-1.fc9.pp + read-only + initrd=/boot/initrd-2.6.25-1.fc9.ppc64.img + append="root=UUID=0f1335f2-eaba-4495-8eee-29229bb8ba03" + +image=/boot/vmlinuz-2.6.25-0.234.rc9.git1.fc9.ppc64 + label=linux + read-only + initrd=/boot/initrd-2.6.25-0.234.rc9.git1.fc9.ppc64.img + append="root=UUID=0f1335f2-eaba-4495-8eee-29229bb8ba03" + diff --git a/test/parser/data/yaboot-03/etc/yaboot.conf b/test/parser/data/yaboot-03/etc/yaboot.conf new file mode 100644 index 0000000..56d7062 --- /dev/null +++ b/test/parser/data/yaboot-03/etc/yaboot.conf @@ -0,0 +1,22 @@ +# yaboot.conf generated by anaconda + +boot=/dev/ps3da +init-message="Welcome to Fedora!\nHit <TAB> for boot options" + +partition=1 +timeout=80 +install=/usr/lib/yaboot/yaboot +delay=5 +enablecdboot +enableofboot +enablenetboot +nonvram +mntpoint=/boot/yaboot +usemount + +image=/boot/vmlinuz-2.6.27.5-117.fc10.ppc64 + label=linux + read-only + initrd=/boot/initrd-2.6.27.5-117.fc10.ppc64.img + append="rhgb quiet root=UUID=ebb54ca2-aa3e-4f67-b1d4-184cdc5d0638" + diff --git a/test/parser/data/yaboot-04/etc/yaboot.conf b/test/parser/data/yaboot-04/etc/yaboot.conf new file mode 100644 index 0000000..7537646 --- /dev/null +++ b/test/parser/data/yaboot-04/etc/yaboot.conf @@ -0,0 +1,10 @@ + +image=111 + read-only + label=linux1 + label = linux2 + append="abc1" + append='abc2' + # read-only + # label=linux3 + # label = linux4 diff --git a/test/parser/data/yaboot-05/etc/yaboot.conf b/test/parser/data/yaboot-05/etc/yaboot.conf new file mode 100644 index 0000000..fd46206 --- /dev/null +++ b/test/parser/data/yaboot-05/etc/yaboot.conf @@ -0,0 +1,6 @@ +# yaboot.conf generated by anaconda +# from a failed fedora install + +boot=/dev/sda2 +init-message="Welcome to Fedora!\nHit <TAB> for boot options" + diff --git a/test/parser/data/yaboot-06/etc/yaboot.conf b/test/parser/data/yaboot-06/etc/yaboot.conf new file mode 100644 index 0000000..57a2f0d --- /dev/null +++ b/test/parser/data/yaboot-06/etc/yaboot.conf @@ -0,0 +1,25 @@ +# from openSUSE + +message=yaboot.txt + +image[32bit]=inst32 + label=install + append="quiet sysrq=1 insmod=sym53c8xx insmod=ipr " +image[32bit]=inst32 + label=slp + append="quiet sysrq=1 install=slp " +image[32bit]=inst32 + label=rescue + append="quiet sysrq=1 rescue=1 " + + +image[64bit]=inst64 + label=install + append="quiet sysrq=1 insmod=sym53c8xx insmod=ipr " +image[64bit]=inst64 + label=slp + append="quiet sysrq=1 install=slp " +image[64bit]=inst64 + label=rescue + append="quiet sysrq=1 rescue=1 " + |