Blame SOURCES/0355-Add-test-to-check-that-different-boot-mediums-work.patch

f96e0b
From b8845d9e7e3df55d36d9a3440a147f293feb7e81 Mon Sep 17 00:00:00 2001
f96e0b
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
f96e0b
Date: Fri, 26 Apr 2013 14:33:31 +0200
f96e0b
Subject: [PATCH 355/482] 	Add test to check that different boot mediums
f96e0b
 work.
f96e0b
f96e0b
---
f96e0b
 ChangeLog                 |  4 ++++
f96e0b
 Makefile.am               | 38 ++++++++++++++++++-------------------
f96e0b
 Makefile.util.def         | 48 +++++++++++++++++++++++++++++++++++++++++++++++
f96e0b
 tests/cdboot_test.in      | 36 +++++++++++++++++++++++++++++++++++
f96e0b
 tests/fddboot_test.in     | 48 +++++++++++++++++++++++++++++++++++++++++++++++
f96e0b
 tests/grub_cmd_date.in    |  5 ++---
f96e0b
 tests/gzcompress_test.in  | 24 ++++++++++++++++++++++++
f96e0b
 tests/hddboot_test.in     | 37 ++++++++++++++++++++++++++++++++++++
f96e0b
 tests/lzocompress_test.in | 24 ++++++++++++++++++++++++
f96e0b
 tests/netboot_test.in     | 42 +++++++++++++++++++++++++++++++++++++++++
f96e0b
 tests/partmap_test.in     |  8 ++++----
f96e0b
 tests/util/grub-shell.in  | 48 ++++++++++++++++++++++++++++++++++++++++-------
f96e0b
 tests/xzcompress_test.in  | 24 ++++++++++++++++++++++++
f96e0b
 13 files changed, 353 insertions(+), 33 deletions(-)
f96e0b
 create mode 100644 tests/cdboot_test.in
f96e0b
 create mode 100644 tests/fddboot_test.in
f96e0b
 create mode 100644 tests/gzcompress_test.in
f96e0b
 create mode 100644 tests/hddboot_test.in
f96e0b
 create mode 100644 tests/lzocompress_test.in
f96e0b
 create mode 100644 tests/netboot_test.in
f96e0b
 create mode 100644 tests/xzcompress_test.in
f96e0b
f96e0b
diff --git a/ChangeLog b/ChangeLog
f96e0b
index 6e007d5..19a1cf6 100644
f96e0b
--- a/ChangeLog
f96e0b
+++ b/ChangeLog
f96e0b
@@ -1,5 +1,9 @@
f96e0b
 2013-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
 
f96e0b
+	Add test to check that different boot mediums work.
f96e0b
+
f96e0b
+2013-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
+
f96e0b
 	* util/grub-mkrescue.in: Rename i386-ieee1275 core image due to
f96e0b
 	ofw limited ISO support.
f96e0b
 
f96e0b
diff --git a/Makefile.am b/Makefile.am
f96e0b
index 9d38405..9889023 100644
f96e0b
--- a/Makefile.am
f96e0b
+++ b/Makefile.am
f96e0b
@@ -261,70 +261,70 @@ kfreebsd-mfsroot.i386.gz: kfreebsd-mfsroot.i386.img
f96e0b
 	gzip < $< > $@
f96e0b
 
f96e0b
 bootcheck-kfreebsd-i386: kfreebsd-mfsroot.i386.gz $(GRUB_PAYLOADS_DIR)/kfreebsd.i386 $(GRUB_PAYLOADS_DIR)/kfreebsd_env.i386 $(srcdir)/grub-core/tests/boot/kfreebsd.cfg grub-shell
f96e0b
-	timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --qemu=$(QEMU32) --files=/mfsroot.gz=kfreebsd-mfsroot.i386.gz --files=/kfreebsd=$(GRUB_PAYLOADS_DIR)/kfreebsd.i386 --files=/kfreebsd_env=$(GRUB_PAYLOADS_DIR)/kfreebsd_env.i386 $(srcdir)/grub-core/tests/boot/kfreebsd.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
+	./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=$(QEMU32) --files=/mfsroot.gz=kfreebsd-mfsroot.i386.gz --files=/kfreebsd=$(GRUB_PAYLOADS_DIR)/kfreebsd.i386 --files=/kfreebsd_env=$(GRUB_PAYLOADS_DIR)/kfreebsd_env.i386 $(srcdir)/grub-core/tests/boot/kfreebsd.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
 
f96e0b
 kfreebsd-mfsroot.x86_64.gz: kfreebsd-mfsroot.x86_64.img
f96e0b
 	gzip < $< > $@
f96e0b
 
f96e0b
 bootcheck-kfreebsd-x86_64: kfreebsd-mfsroot.x86_64.gz $(GRUB_PAYLOADS_DIR)/kfreebsd.x86_64 $(GRUB_PAYLOADS_DIR)/kfreebsd_env.x86_64 $(srcdir)/grub-core/tests/boot/kfreebsd.cfg grub-shell
f96e0b
-	timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --qemu=qemu-system-x86_64 --files=/mfsroot.gz=kfreebsd-mfsroot.x86_64.gz --files=/kfreebsd=$(GRUB_PAYLOADS_DIR)/kfreebsd.x86_64 --files=/kfreebsd_env=$(GRUB_PAYLOADS_DIR)/kfreebsd_env.x86_64 $(srcdir)/grub-core/tests/boot/kfreebsd.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
+	./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=qemu-system-x86_64 --files=/mfsroot.gz=kfreebsd-mfsroot.x86_64.gz --files=/kfreebsd=$(GRUB_PAYLOADS_DIR)/kfreebsd.x86_64 --files=/kfreebsd_env=$(GRUB_PAYLOADS_DIR)/kfreebsd_env.x86_64 $(srcdir)/grub-core/tests/boot/kfreebsd.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
 
f96e0b
 knetbsd.miniroot-image.i386.gz: knetbsd.miniroot-image.i386.img
f96e0b
 	gzip < $< > $@
f96e0b
 
f96e0b
 bootcheck-knetbsd-i386: knetbsd.miniroot-image.i386.gz $(GRUB_PAYLOADS_DIR)/knetbsd.i386 $(srcdir)/grub-core/tests/boot/knetbsd.cfg grub-shell
f96e0b
-	timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --qemu=$(QEMU32) --files=/miniroot.gz=knetbsd.miniroot-image.i386.gz --files=/knetbsd=$(GRUB_PAYLOADS_DIR)/knetbsd.i386 $(srcdir)/grub-core/tests/boot/knetbsd.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
+	./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=$(QEMU32) --files=/miniroot.gz=knetbsd.miniroot-image.i386.gz --files=/knetbsd=$(GRUB_PAYLOADS_DIR)/knetbsd.i386 $(srcdir)/grub-core/tests/boot/knetbsd.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
 
f96e0b
 bootcheck-kopenbsd-i386: kopenbsd.image.i386 $(GRUB_PAYLOADS_DIR)/kopenbsd.i386 $(srcdir)/grub-core/tests/boot/kopenbsd.cfg grub-shell
f96e0b
-	timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --qemu=$(QEMU32) --files=/ramdisk=kopenbsd.image.i386 --files=/kopenbsd=$(GRUB_PAYLOADS_DIR)/kopenbsd.i386 $(srcdir)/grub-core/tests/boot/kopenbsd.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
+	./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=$(QEMU32) --files=/ramdisk=kopenbsd.image.i386 --files=/kopenbsd=$(GRUB_PAYLOADS_DIR)/kopenbsd.i386 $(srcdir)/grub-core/tests/boot/kopenbsd.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
 
f96e0b
 bootcheck-kopenbsd-x86_64: kopenbsd.image.x86_64 $(GRUB_PAYLOADS_DIR)/kopenbsd.x86_64 $(srcdir)/grub-core/tests/boot/kopenbsd.cfg grub-shell
f96e0b
-	timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --qemu=qemu-system-x86_64 --files=/ramdisk=kopenbsd.image.x86_64 --files=/kopenbsd=$(GRUB_PAYLOADS_DIR)/kopenbsd.x86_64 $(srcdir)/grub-core/tests/boot/kopenbsd.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
+	./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=qemu-system-x86_64 --files=/ramdisk=kopenbsd.image.x86_64 --files=/kopenbsd=$(GRUB_PAYLOADS_DIR)/kopenbsd.x86_64 $(srcdir)/grub-core/tests/boot/kopenbsd.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
 
f96e0b
 knetbsd.miniroot-image.x86_64.gz: knetbsd.miniroot-image.x86_64.img
f96e0b
 	gzip < $< > $@
f96e0b
 
f96e0b
 bootcheck-knetbsd-x86_64: knetbsd.miniroot-image.x86_64.gz $(GRUB_PAYLOADS_DIR)/knetbsd.x86_64 $(srcdir)/grub-core/tests/boot/knetbsd.cfg grub-shell
f96e0b
-	timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --qemu=qemu-system-x86_64 --files=/miniroot.gz=knetbsd.miniroot-image.x86_64.gz --files=/knetbsd=$(GRUB_PAYLOADS_DIR)/knetbsd.x86_64 $(srcdir)/grub-core/tests/boot/knetbsd.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
+	./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=qemu-system-x86_64 --files=/miniroot.gz=knetbsd.miniroot-image.x86_64.gz --files=/knetbsd=$(GRUB_PAYLOADS_DIR)/knetbsd.x86_64 $(srcdir)/grub-core/tests/boot/knetbsd.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
 
f96e0b
 bootcheck-linux-i386: linux-initramfs.i386 $(GRUB_PAYLOADS_DIR)/linux.i386 $(srcdir)/grub-core/tests/boot/linux.cfg grub-shell
f96e0b
-	timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --qemu=$(QEMU32) --files=/initrd=linux-initramfs.i386 --files=/linux=$(GRUB_PAYLOADS_DIR)/linux.i386 $(srcdir)/grub-core/tests/boot/linux.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
+	./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=$(QEMU32) --files=/initrd=linux-initramfs.i386 --files=/linux=$(GRUB_PAYLOADS_DIR)/linux.i386 $(srcdir)/grub-core/tests/boot/linux.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
 
f96e0b
 bootcheck-linux-x86_64: linux-initramfs.x86_64 $(GRUB_PAYLOADS_DIR)/linux.x86_64 $(srcdir)/grub-core/tests/boot/linux.cfg grub-shell
f96e0b
-	timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --qemu=qemu-system-x86_64 --files=/initrd=linux-initramfs.x86_64 --files=/linux=$(GRUB_PAYLOADS_DIR)/linux.x86_64 $(srcdir)/grub-core/tests/boot/linux.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
+	./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=qemu-system-x86_64 --files=/initrd=linux-initramfs.x86_64 --files=/linux=$(GRUB_PAYLOADS_DIR)/linux.x86_64 $(srcdir)/grub-core/tests/boot/linux.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
 
f96e0b
 bootcheck-linux-mips: linux-initramfs.mips $(GRUB_PAYLOADS_DIR)/linux.mips $(srcdir)/grub-core/tests/boot/linux.cfg grub-shell
f96e0b
-	timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --files=/initrd=linux-initramfs.mips --files=/linux=$(GRUB_PAYLOADS_DIR)/linux.mips $(srcdir)/grub-core/tests/boot/linux.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
+	./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --files=/initrd=linux-initramfs.mips --files=/linux=$(GRUB_PAYLOADS_DIR)/linux.mips $(srcdir)/grub-core/tests/boot/linux.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
 
f96e0b
 bootcheck-linux-ppc: linux-initramfs.ppc $(GRUB_PAYLOADS_DIR)/linux.ppc $(srcdir)/grub-core/tests/boot/linux.cfg grub-shell
f96e0b
-	timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --files=/initrd=linux-initramfs.ppc --files=/linux=$(GRUB_PAYLOADS_DIR)/linux.ppc $(srcdir)/grub-core/tests/boot/linux-ppc.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
+	./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --files=/initrd=linux-initramfs.ppc --files=/linux=$(GRUB_PAYLOADS_DIR)/linux.ppc $(srcdir)/grub-core/tests/boot/linux-ppc.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
 
f96e0b
 bootcheck-linux-mipsel: linux-initramfs.mipsel $(GRUB_PAYLOADS_DIR)/linux.mipsel $(srcdir)/grub-core/tests/boot/linux.cfg grub-shell
f96e0b
-	timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --files=/initrd=linux-initramfs.mipsel --files=/linux=$(GRUB_PAYLOADS_DIR)/linux.mipsel $(srcdir)/grub-core/tests/boot/linux.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
+	./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --files=/initrd=linux-initramfs.mipsel --files=/linux=$(GRUB_PAYLOADS_DIR)/linux.mipsel $(srcdir)/grub-core/tests/boot/linux.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
 
f96e0b
 bootcheck-linux-loongson: linux-initramfs.loongson $(GRUB_PAYLOADS_DIR)/linux.loongson $(srcdir)/grub-core/tests/boot/linux.cfg grub-shell
f96e0b
-	timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --files=/initrd=linux-initramfs.loongson --files=/linux=$(GRUB_PAYLOADS_DIR)/linux.loongson $(srcdir)/grub-core/tests/boot/linux.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
+	./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --files=/initrd=linux-initramfs.loongson --files=/linux=$(GRUB_PAYLOADS_DIR)/linux.loongson $(srcdir)/grub-core/tests/boot/linux.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
 
f96e0b
 bootcheck-linux16-i386: linux-initramfs.i386 $(GRUB_PAYLOADS_DIR)/linux.i386 $(srcdir)/grub-core/tests/boot/linux.cfg grub-shell
f96e0b
-	timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --qemu=$(QEMU32) --files=/initrd=linux-initramfs.i386 --files=/linux=$(GRUB_PAYLOADS_DIR)/linux.i386 $(srcdir)/grub-core/tests/boot/linux16.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
+	./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=$(QEMU32) --files=/initrd=linux-initramfs.i386 --files=/linux=$(GRUB_PAYLOADS_DIR)/linux.i386 $(srcdir)/grub-core/tests/boot/linux16.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
 
f96e0b
 bootcheck-linux16-x86_64: linux-initramfs.x86_64 $(GRUB_PAYLOADS_DIR)/linux.x86_64 $(srcdir)/grub-core/tests/boot/linux.cfg grub-shell
f96e0b
-	timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --qemu=qemu-system-x86_64 --files=/initrd=linux-initramfs.x86_64 --files=/linux=$(GRUB_PAYLOADS_DIR)/linux.x86_64 $(srcdir)/grub-core/tests/boot/linux16.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
+	./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=qemu-system-x86_64 --files=/initrd=linux-initramfs.x86_64 --files=/linux=$(GRUB_PAYLOADS_DIR)/linux.x86_64 $(srcdir)/grub-core/tests/boot/linux16.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
 
f96e0b
 bootcheck-multiboot: multiboot.elf $(srcdir)/grub-core/tests/boot/multiboot.cfg grub-shell
f96e0b
-	timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --qemu=$(QEMU32) --files=/multiboot.elf=multiboot.elf $(srcdir)/grub-core/tests/boot/multiboot.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
+	./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=$(QEMU32) --files=/multiboot.elf=multiboot.elf $(srcdir)/grub-core/tests/boot/multiboot.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
 
f96e0b
 bootcheck-multiboot2: multiboot2.elf $(srcdir)/grub-core/tests/boot/multiboot2.cfg grub-shell
f96e0b
-	timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --qemu=$(QEMU32) --files=/multiboot2.elf=multiboot2.elf $(srcdir)/grub-core/tests/boot/multiboot2.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
+	./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=$(QEMU32) --files=/multiboot2.elf=multiboot2.elf $(srcdir)/grub-core/tests/boot/multiboot2.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
 
f96e0b
 bootcheck-kfreebsd-aout: kfreebsd.aout $(srcdir)/grub-core/tests/boot/kfreebsd-aout.cfg grub-shell
f96e0b
-	timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --qemu=$(QEMU32) --files=/kfreebsd.aout=kfreebsd.aout $(srcdir)/grub-core/tests/boot/kfreebsd-aout.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
+	./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=$(QEMU32) --files=/kfreebsd.aout=kfreebsd.aout $(srcdir)/grub-core/tests/boot/kfreebsd-aout.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
 
f96e0b
 bootcheck-pc-chainloader: pc-chainloader.bin $(srcdir)/grub-core/tests/boot/pc-chainloader.cfg grub-shell
f96e0b
-	timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --qemu=$(QEMU32) --files=/pc-chainloader.bin=pc-chainloader.bin $(srcdir)/grub-core/tests/boot/pc-chainloader.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
+	./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=$(QEMU32) --files=/pc-chainloader.bin=pc-chainloader.bin $(srcdir)/grub-core/tests/boot/pc-chainloader.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
 
f96e0b
 bootcheck-ntldr: ntldr.bin $(srcdir)/grub-core/tests/boot/ntldr.cfg grub-shell
f96e0b
-	timeout -s KILL $(BOOTCHECK_TIMEOUT) ./grub-shell --qemu=$(QEMU32) --files=/ntldr.bin=ntldr.bin $(srcdir)/grub-core/tests/boot/ntldr.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
+	./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=$(QEMU32) --files=/ntldr.bin=ntldr.bin $(srcdir)/grub-core/tests/boot/ntldr.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
f96e0b
 
f96e0b
 if COND_i386_efi
f96e0b
 BOOTCHECKS = bootcheck-kfreebsd-aout bootcheck-kopenbsd-i386 bootcheck-kopenbsd-x86_64 bootcheck-multiboot bootcheck-multiboot2 bootcheck-linux-i386 bootcheck-linux-x86_64 bootcheck-knetbsd-x86_64 bootcheck-kfreebsd-x86_64 bootcheck-kfreebsd-i386
f96e0b
diff --git a/Makefile.util.def b/Makefile.util.def
f96e0b
index 4fa37bc..1b71fd0 100644
f96e0b
--- a/Makefile.util.def
f96e0b
+++ b/Makefile.util.def
f96e0b
@@ -690,6 +690,54 @@ script = {
f96e0b
 
f96e0b
 script = {
f96e0b
   testcase;
f96e0b
+  name = hddboot_test;
f96e0b
+  common = tests/hddboot_test.in;
f96e0b
+};
f96e0b
+
f96e0b
+script = {
f96e0b
+  testcase;
f96e0b
+  name = fddboot_test;
f96e0b
+  common = tests/fddboot_test.in;
f96e0b
+};
f96e0b
+
f96e0b
+script = {
f96e0b
+  testcase;
f96e0b
+  name = cdboot_test;
f96e0b
+  common = tests/cdboot_test.in;
f96e0b
+};
f96e0b
+
f96e0b
+script = {
f96e0b
+  testcase;
f96e0b
+  name = netboot_test;
f96e0b
+  common = tests/netboot_test.in;
f96e0b
+};
f96e0b
+
f96e0b
+script = {
f96e0b
+  testcase;
f96e0b
+  name = pseries_test;
f96e0b
+  common = tests/pseries_test.in;
f96e0b
+};
f96e0b
+
f96e0b
+script = {
f96e0b
+  testcase;
f96e0b
+  name = xzcompress_test;
f96e0b
+  common = tests/xzcompress_test.in;
f96e0b
+};
f96e0b
+
f96e0b
+script = {
f96e0b
+  testcase;
f96e0b
+  name = gzcompress_test;
f96e0b
+  common = tests/gzcompress_test.in;
f96e0b
+};
f96e0b
+
f96e0b
+script = {
f96e0b
+  testcase;
f96e0b
+  name = lzocompress_test;
f96e0b
+  common = tests/lzocompress_test.in;
f96e0b
+};
f96e0b
+
f96e0b
+script = {
f96e0b
+  testcase;
f96e0b
   name = grub_cmd_echo;
f96e0b
   common = tests/grub_cmd_echo.in;
f96e0b
 };
f96e0b
diff --git a/tests/cdboot_test.in b/tests/cdboot_test.in
f96e0b
new file mode 100644
f96e0b
index 0000000..d9a5fb8
f96e0b
--- /dev/null
f96e0b
+++ b/tests/cdboot_test.in
f96e0b
@@ -0,0 +1,36 @@
f96e0b
+#! /bin/sh
f96e0b
+# Copyright (C) 2013  Free Software Foundation, Inc.
f96e0b
+#
f96e0b
+# GRUB is free software: you can redistribute it and/or modify
f96e0b
+# it under the terms of the GNU General Public License as published by
f96e0b
+# the Free Software Foundation, either version 3 of the License, or
f96e0b
+# (at your option) any later version.
f96e0b
+#
f96e0b
+# GRUB is distributed in the hope that it will be useful,
f96e0b
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
f96e0b
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
f96e0b
+# GNU General Public License for more details.
f96e0b
+#
f96e0b
+# You should have received a copy of the GNU General Public License
f96e0b
+# along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
f96e0b
+
f96e0b
+set -e
f96e0b
+grubshell=@builddir@/grub-shell
f96e0b
+
f96e0b
+. "@builddir@/grub-core/modinfo.sh"
f96e0b
+
f96e0b
+case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
f96e0b
+    # Flash targets
f96e0b
+    i386-qemu | i386-coreboot | mips-qemu_mips | mipsel-qemu_mips)
f96e0b
+	exit 0;;
f96e0b
+    # FIXME: currently grub-shell uses only -kernel for loongson
f96e0b
+    mipsel-loongson)
f96e0b
+	exit 0;;
f96e0b
+    # FIXME: OFW fails to open CD-ROM
f96e0b
+    i386-ieee1275)
f96e0b
+	exit 0;;
f96e0b
+esac
f96e0b
+
f96e0b
+if [ "$(echo hello | "${grubshell}" --boot=cd)" != "Hello World" ]; then
f96e0b
+   exit 1
f96e0b
+fi
f96e0b
diff --git a/tests/fddboot_test.in b/tests/fddboot_test.in
f96e0b
new file mode 100644
f96e0b
index 0000000..7734025
f96e0b
--- /dev/null
f96e0b
+++ b/tests/fddboot_test.in
f96e0b
@@ -0,0 +1,48 @@
f96e0b
+#! /bin/sh
f96e0b
+# Copyright (C) 2013  Free Software Foundation, Inc.
f96e0b
+#
f96e0b
+# GRUB is free software: you can redistribute it and/or modify
f96e0b
+# it under the terms of the GNU General Public License as published by
f96e0b
+# the Free Software Foundation, either version 3 of the License, or
f96e0b
+# (at your option) any later version.
f96e0b
+#
f96e0b
+# GRUB is distributed in the hope that it will be useful,
f96e0b
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
f96e0b
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
f96e0b
+# GNU General Public License for more details.
f96e0b
+#
f96e0b
+# You should have received a copy of the GNU General Public License
f96e0b
+# along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
f96e0b
+
f96e0b
+set -e
f96e0b
+grubshell=@builddir@/grub-shell
f96e0b
+
f96e0b
+. "@builddir@/grub-core/modinfo.sh"
f96e0b
+
f96e0b
+case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
f96e0b
+    # Flash targets
f96e0b
+    i386-qemu | i386-coreboot | mips-qemu_mips | mipsel-qemu_mips)
f96e0b
+	exit 0;;
f96e0b
+    # FIXME: currently grub-shell uses only -kernel for loongson
f96e0b
+    mipsel-loongson)
f96e0b
+	exit 0;;
f96e0b
+    # FIXME: We don't support EFI floppy boot in grub-mkrescue
f96e0b
+    *-efi)
f96e0b
+	exit 0;;
f96e0b
+    # FIXME: no floppy support
f96e0b
+    i386-multiboot)
f96e0b
+	exit 0;;
f96e0b
+    # FIXME: QEMU firmware crashes when trying to boot from floppy
f96e0b
+    sparc64-ieee1275)
f96e0b
+	exit 0;;
f96e0b
+    # FIXME: QEMU doesn't emulate SCSI floppies
f96e0b
+    mipsel-arc | mips-arc)
f96e0b
+	exit 0;;
f96e0b
+    # powerpc doesn't boot from floppy except OldWorld Macs which we don't support anyway
f96e0b
+    powerpc-ieee1275)
f96e0b
+	exit 0;;
f96e0b
+esac
f96e0b
+
f96e0b
+if [ "$(echo hello | "${grubshell}" --boot=fd --mkrescue-arg="--compress=xz --fonts= --locales= --themes=")" != "Hello World" ]; then
f96e0b
+   exit 1
f96e0b
+fi
f96e0b
diff --git a/tests/grub_cmd_date.in b/tests/grub_cmd_date.in
f96e0b
index effc82a..0417c67 100644
f96e0b
--- a/tests/grub_cmd_date.in
f96e0b
+++ b/tests/grub_cmd_date.in
f96e0b
@@ -3,9 +3,8 @@ set -e
f96e0b
 
f96e0b
 . "@builddir@/grub-core/modinfo.sh"
f96e0b
 
f96e0b
-# OpenBIOS on sparc64 doesn't implement RTC
f96e0b
-# mipsel-arc QEMU emulated RTC doesn't play well with firmware
f96e0b
-if [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = sparc64-ieee1275 ] || [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = mipsel-arc ]; then
f96e0b
+# FIXME: OpenBIOS on sparc64 doesn't implement RTC
f96e0b
+if [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = sparc64-ieee1275 ]; then
f96e0b
     exit 0
f96e0b
 fi
f96e0b
 
f96e0b
diff --git a/tests/gzcompress_test.in b/tests/gzcompress_test.in
f96e0b
new file mode 100644
f96e0b
index 0000000..5cc352e
f96e0b
--- /dev/null
f96e0b
+++ b/tests/gzcompress_test.in
f96e0b
@@ -0,0 +1,24 @@
f96e0b
+#! /bin/sh
f96e0b
+# Copyright (C) 2013  Free Software Foundation, Inc.
f96e0b
+#
f96e0b
+# GRUB is free software: you can redistribute it and/or modify
f96e0b
+# it under the terms of the GNU General Public License as published by
f96e0b
+# the Free Software Foundation, either version 3 of the License, or
f96e0b
+# (at your option) any later version.
f96e0b
+#
f96e0b
+# GRUB is distributed in the hope that it will be useful,
f96e0b
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
f96e0b
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
f96e0b
+# GNU General Public License for more details.
f96e0b
+#
f96e0b
+# You should have received a copy of the GNU General Public License
f96e0b
+# along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
f96e0b
+
f96e0b
+set -e
f96e0b
+grubshell=@builddir@/grub-shell
f96e0b
+
f96e0b
+. "@builddir@/grub-core/modinfo.sh"
f96e0b
+
f96e0b
+if [ "$(echo hello | "${grubshell}" --mkrescue-arg=--compress=gz)" != "Hello World" ]; then
f96e0b
+   exit 1
f96e0b
+fi
f96e0b
diff --git a/tests/hddboot_test.in b/tests/hddboot_test.in
f96e0b
new file mode 100644
f96e0b
index 0000000..e76f996
f96e0b
--- /dev/null
f96e0b
+++ b/tests/hddboot_test.in
f96e0b
@@ -0,0 +1,37 @@
f96e0b
+#! /bin/sh
f96e0b
+# Copyright (C) 2013  Free Software Foundation, Inc.
f96e0b
+#
f96e0b
+# GRUB is free software: you can redistribute it and/or modify
f96e0b
+# it under the terms of the GNU General Public License as published by
f96e0b
+# the Free Software Foundation, either version 3 of the License, or
f96e0b
+# (at your option) any later version.
f96e0b
+#
f96e0b
+# GRUB is distributed in the hope that it will be useful,
f96e0b
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
f96e0b
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
f96e0b
+# GNU General Public License for more details.
f96e0b
+#
f96e0b
+# You should have received a copy of the GNU General Public License
f96e0b
+# along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
f96e0b
+
f96e0b
+set -e
f96e0b
+grubshell=@builddir@/grub-shell
f96e0b
+
f96e0b
+. "@builddir@/grub-core/modinfo.sh"
f96e0b
+
f96e0b
+case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
f96e0b
+    # Flash targets
f96e0b
+    i386-qemu | i386-coreboot | mips-qemu_mips | mipsel-qemu_mips)
f96e0b
+	exit 0;;
f96e0b
+    # FIXME: currently grub-shell uses only -kernel for loongson
f96e0b
+    mipsel-loongson)
f96e0b
+	exit 0;;
f96e0b
+    # FIXME: OVMF skips HDDs for automatic boot and has no USB support
f96e0b
+    *-efi)
f96e0b
+	exit 0;;
f96e0b
+esac
f96e0b
+
f96e0b
+if [ "$(echo hello | "${grubshell}" --boot=hd)" != "Hello World" ]; then
f96e0b
+   exit 1
f96e0b
+fi
f96e0b
+
f96e0b
diff --git a/tests/lzocompress_test.in b/tests/lzocompress_test.in
f96e0b
new file mode 100644
f96e0b
index 0000000..54428c3
f96e0b
--- /dev/null
f96e0b
+++ b/tests/lzocompress_test.in
f96e0b
@@ -0,0 +1,24 @@
f96e0b
+#! /bin/sh
f96e0b
+# Copyright (C) 2013  Free Software Foundation, Inc.
f96e0b
+#
f96e0b
+# GRUB is free software: you can redistribute it and/or modify
f96e0b
+# it under the terms of the GNU General Public License as published by
f96e0b
+# the Free Software Foundation, either version 3 of the License, or
f96e0b
+# (at your option) any later version.
f96e0b
+#
f96e0b
+# GRUB is distributed in the hope that it will be useful,
f96e0b
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
f96e0b
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
f96e0b
+# GNU General Public License for more details.
f96e0b
+#
f96e0b
+# You should have received a copy of the GNU General Public License
f96e0b
+# along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
f96e0b
+
f96e0b
+set -e
f96e0b
+grubshell=@builddir@/grub-shell
f96e0b
+
f96e0b
+. "@builddir@/grub-core/modinfo.sh"
f96e0b
+
f96e0b
+if [ "$(echo hello | "${grubshell}" --mkrescue-arg=--compress=lzo)" != "Hello World" ]; then
f96e0b
+   exit 1
f96e0b
+fi
f96e0b
diff --git a/tests/netboot_test.in b/tests/netboot_test.in
f96e0b
new file mode 100644
f96e0b
index 0000000..8e3f8c9
f96e0b
--- /dev/null
f96e0b
+++ b/tests/netboot_test.in
f96e0b
@@ -0,0 +1,42 @@
f96e0b
+#! /bin/sh
f96e0b
+# Copyright (C) 2013  Free Software Foundation, Inc.
f96e0b
+#
f96e0b
+# GRUB is free software: you can redistribute it and/or modify
f96e0b
+# it under the terms of the GNU General Public License as published by
f96e0b
+# the Free Software Foundation, either version 3 of the License, or
f96e0b
+# (at your option) any later version.
f96e0b
+#
f96e0b
+# GRUB is distributed in the hope that it will be useful,
f96e0b
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
f96e0b
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
f96e0b
+# GNU General Public License for more details.
f96e0b
+#
f96e0b
+# You should have received a copy of the GNU General Public License
f96e0b
+# along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
f96e0b
+
f96e0b
+set -e
f96e0b
+grubshell=@builddir@/grub-shell
f96e0b
+
f96e0b
+. "@builddir@/grub-core/modinfo.sh"
f96e0b
+
f96e0b
+case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
f96e0b
+    # Flash targets
f96e0b
+    i386-qemu | i386-coreboot | mips-qemu_mips | mipsel-qemu_mips)
f96e0b
+	exit 0;;
f96e0b
+    # FIXME: currently grub-shell uses only -kernel for loongson
f96e0b
+    mipsel-loongson)
f96e0b
+	exit 0;;
f96e0b
+    # FIXME: no rtl8139 support
f96e0b
+    i386-multiboot)
f96e0b
+	exit 0;;
f96e0b
+    # FIXME: We don't fully support netboot on ARC
f96e0b
+    *-arc)
f96e0b
+	exit 0;;
f96e0b
+    # FIXME: Many QEMU firmware have no netboot capability
f96e0b
+    *-efi | i386-ieee1275 | powerpc-ieee1275 | sparc64-ieee1275)
f96e0b
+	exit 0;;
f96e0b
+esac
f96e0b
+
f96e0b
+if [ "$(echo hello | "${grubshell}" --boot=net)" != "Hello World" ]; then
f96e0b
+   exit 1
f96e0b
+fi
f96e0b
diff --git a/tests/partmap_test.in b/tests/partmap_test.in
f96e0b
index ee23f7f..b222fa1 100644
f96e0b
--- a/tests/partmap_test.in
f96e0b
+++ b/tests/partmap_test.in
f96e0b
@@ -63,23 +63,23 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
f96e0b
     powerpc-ieee1275)
f96e0b
 	disk=ieee1275//pci@80000000/mac-io@4/ata-3@20000/disk@0
f96e0b
 	qemudisk=hda
f96e0b
-	# QEMU firmware has bugs which prevent it from accessing hard disk w/o recognised label.
f96e0b
+	# FIXME: QEMU firmware has bugs which prevent it from accessing hard disk w/o recognised label.
f96e0b
 	exit 0
f96e0b
 	;;
f96e0b
     sparc64-ieee1275)
f96e0b
 	disk=ieee1275//pci@1fe\,0/pci-ata@5/ide0@500/disk@0
f96e0b
 	qemudisk=hda
f96e0b
-	# QEMU firmware has bugs which prevent it from accessing hard disk w/o recognised label.
f96e0b
+	# FIXME: QEMU firmware has bugs which prevent it from accessing hard disk w/o recognised label.
f96e0b
 	exit 0
f96e0b
 	;;
f96e0b
     i386-ieee1275)
f96e0b
 	disk=ieee1275/d
f96e0b
 	qemudisk=hdb
f96e0b
-	# QEMU firmware has bugs which prevent it from accessing hard disk w/o recognised label.
f96e0b
+	# FIXME: QEMU firmware has bugs which prevent it from accessing hard disk w/o recognised label.
f96e0b
 	exit 0
f96e0b
 	;;
f96e0b
     mips-arc)
f96e0b
-	# ARC firmware has bugs which prevent it from accessing hard disk w/o dvh disklabel.
f96e0b
+	# FIXME: ARC firmware has bugs which prevent it from accessing hard disk w/o dvh disklabel.
f96e0b
 	exit 0 ;;
f96e0b
     mipsel-arc)
f96e0b
 	disk=arc/scsi0/disk0/rdisk0
f96e0b
diff --git a/tests/util/grub-shell.in b/tests/util/grub-shell.in
f96e0b
index ccea332..fc52e7b 100644
f96e0b
--- a/tests/util/grub-shell.in
f96e0b
+++ b/tests/util/grub-shell.in
f96e0b
@@ -41,11 +41,13 @@ Run GRUB script in a Qemu instance.
f96e0b
 
f96e0b
   -h, --help              print this message and exit
f96e0b
   -v, --version           print the version information and exit
f96e0b
-  --boot=[fd|hd|cd|net]       boot method for Qemu instance
f96e0b
+  --boot=[fd|hd|cd|net]   boot method for Qemu instance
f96e0b
   --modules=MODULES       pre-load specified modules MODULES
f96e0b
   --qemu=FILE             Name of qemu binary
f96e0b
   --qemu-opts=OPTIONS     extra options to pass to Qemu instance
f96e0b
   --files=FILES           add files to the image
f96e0b
+  --mkrescue-arg=ARGS     additional arguments to grub-mkrescue
f96e0b
+  --timeout=SECONDS       set timeout
f96e0b
   --trim                  trim firmware output
f96e0b
 
f96e0b
 $0 runs input GRUB script or SOURCE file in a Qemu instance and prints
f96e0b
@@ -60,6 +62,7 @@ qemuopts="${GRUB_QEMU_OPTS}"
f96e0b
 serial_port=com0
f96e0b
 serial_null=
f96e0b
 halt_cmd=halt
f96e0b
+pseries=n
f96e0b
 case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
f96e0b
     powerpc-ieee1275)
f96e0b
 	boot=cd
f96e0b
@@ -67,6 +70,7 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
f96e0b
 	console=console
f96e0b
 	serial_port=escc-ch-a
f96e0b
 	serial_null="-serial null"
f96e0b
+	netbootext=elf
f96e0b
 	;;
f96e0b
 
f96e0b
     sparc64-ieee1275)
f96e0b
@@ -139,7 +143,9 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
f96e0b
     i386-pc)
f96e0b
 	boot=cd
f96e0b
 	qemu=qemu-system-i386
f96e0b
-	console=console;;
f96e0b
+	console=console
f96e0b
+	netbootext=0
f96e0b
+	;;
f96e0b
 
f96e0b
     i386-efi)
f96e0b
 	qemu=qemu-system-i386
f96e0b
@@ -159,6 +165,8 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
f96e0b
 	console=console;;
f96e0b
 esac
f96e0b
 
f96e0b
+timeout=60
f96e0b
+
f96e0b
 # Check the arguments.
f96e0b
 for option in "$@"; do
f96e0b
     case "$option" in
f96e0b
@@ -177,11 +185,24 @@ for option in "$@"; do
f96e0b
     --files=*)
f96e0b
 	fls=`echo "$option" | sed -e 's/--files=//' -e 's/,/ /g'`
f96e0b
 	files="$files $fls" ;;
f96e0b
+    --mkrescue-arg=*)
f96e0b
+	mkr=`echo "$option" | sed -e 's/--mkrescue-arg=//' -e 's/,/ /g'`
f96e0b
+	mkrescue_args="$mkrescue_args $mkr" ;;
f96e0b
     --qemu=*)
f96e0b
 	qemu=`echo "$option" | sed -e 's/--qemu=//' -e 's/,/ /g'`;;
f96e0b
+    --pseries)
f96e0b
+	qemu=qemu-system-ppc64
f96e0b
+	serial_port=ieee1275/hvterm
f96e0b
+	serial_null=
f96e0b
+	qemuopts="$qemuopts -no-reboot"
f96e0b
+	trim=1
f96e0b
+	    ;;
f96e0b
     --qemu-opts=*)
f96e0b
         qs=`echo "$option" | sed -e 's/--qemu-opts=//'`
f96e0b
         qemuopts="$qemuopts $qs" ;;
f96e0b
+    --timeout=*)
f96e0b
+        timeout=`echo "$option" | sed -e 's/--timeout=//'`
f96e0b
+	;;
f96e0b
     --boot=*)
f96e0b
         dev=`echo "$option" | sed -e 's/--boot=//'`
f96e0b
 	if   [ "$dev" = "fd" ] ; then boot=fd;
f96e0b
@@ -260,12 +281,16 @@ echo "${halt_cmd}" >>${cfgfile}
f96e0b
 isofile=`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` || exit 1
f96e0b
 if [ x$boot != xnet ]; then
f96e0b
     pkgdatadir="@builddir@" sh "@builddir@/grub-mkrescue" "--grub-mkimage=${builddir}/grub-mkimage" "--grub-render-label=${builddir}/grub-render-label" "--output=${isofile}" "--override-directory=${builddir}/grub-core" \
f96e0b
-	--rom-directory="${rom_directory}" \
f96e0b
+	--rom-directory="${rom_directory}" ${mkrescue_args} \
f96e0b
 	"/boot/grub/grub.cfg=${cfgfile}" "/boot/grub/testcase.cfg=${source}" \
f96e0b
 	${files} >/dev/null 2>&1
f96e0b
 fi
f96e0b
 if [ x$boot = xhd ]; then
f96e0b
-    device=hda
f96e0b
+    if [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = mips-arc ]; then
f96e0b
+	device=hdb
f96e0b
+    else
f96e0b
+	device=hda
f96e0b
+    fi
f96e0b
     bootdev="-boot c"
f96e0b
 fi
f96e0b
 if [ x$boot = xcd ]; then
f96e0b
@@ -305,6 +330,15 @@ if [ x$boot = xcoreboot ]; then
f96e0b
     device=cdrom
f96e0b
 fi
f96e0b
 
f96e0b
+if [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = mipsel-arc ]; then
f96e0b
+    case "$boot" in
f96e0b
+	hd)
f96e0b
+	    bootdev="-global ds1225y.filename=$GRUB_QEMU_MAGNUM_NVRAM_DIR/disk" ;;
f96e0b
+	*)
f96e0b
+	    bootdev="-global ds1225y.filename=$GRUB_QEMU_MAGNUM_NVRAM_DIR/cdrom";;
f96e0b
+    esac
f96e0b
+fi
f96e0b
+
f96e0b
 do_trim ()
f96e0b
 {
f96e0b
     if [ $trim = 1 ]; then
f96e0b
@@ -316,12 +350,12 @@ do_trim ()
f96e0b
 
f96e0b
 if [ x$boot = xnet ]; then
f96e0b
     netdir=`mktemp -d "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` || exit 1
f96e0b
-    pkgdatadir="@builddir@" sh "@builddir@/grub-mknetdir" "--grub-mkimage=${builddir}/grub-mkimage" "--directory=${builddir}/grub-core" "--net-directory=$netdir"
f96e0b
+    pkgdatadir="@builddir@" sh "@builddir@/grub-mknetdir" "--grub-mkimage=${builddir}/grub-mkimage" "--directory=${builddir}/grub-core" "--net-directory=$netdir" ${mkrescue_args} > /dev/null
f96e0b
     cp "${cfgfile}" "$netdir/boot/grub/grub.cfg"
f96e0b
     cp "${source}" "$netdir/boot/grub/testcase.cfg"
f96e0b
-    "${qemu}" ${qemuopts} -nographic ${serial_null} -serial file:/dev/stdout -monitor file:/dev/null -boot n -net "user,tftp=$netdir,bootfile=/boot/grub/${grub_modinfo_target_cpu}-${grub_modinfo_platform}/core.0"  -net nic  | cat | tr -d "\r" | do_trim
f96e0b
+    timeout -s KILL $timeout "${qemu}" ${qemuopts} -nographic ${serial_null} -serial file:/dev/stdout -monitor file:/dev/null -boot n -net "user,tftp=$netdir,bootfile=/boot/grub/${grub_modinfo_target_cpu}-${grub_modinfo_platform}/core.$netbootext"  -net nic  | cat | tr -d "\r" | do_trim
f96e0b
 else
f96e0b
-    "${qemu}" ${qemuopts} -nographic ${serial_null} -serial file:/dev/stdout -monitor file:/dev/null -${device} ${isofile} ${bootdev} | cat | tr -d "\r" | do_trim
f96e0b
+    timeout -s KILL $timeout "${qemu}" ${qemuopts} -nographic ${serial_null} -serial file:/dev/stdout -monitor file:/dev/null -${device} ${isofile} ${bootdev} | cat | tr -d "\r" | do_trim
f96e0b
 fi
f96e0b
 rm -f "${isofile}" "${imgfile}"
f96e0b
 rm -rf "${rom_directory}"
f96e0b
diff --git a/tests/xzcompress_test.in b/tests/xzcompress_test.in
f96e0b
new file mode 100644
f96e0b
index 0000000..63f5fd1
f96e0b
--- /dev/null
f96e0b
+++ b/tests/xzcompress_test.in
f96e0b
@@ -0,0 +1,24 @@
f96e0b
+#! /bin/sh
f96e0b
+# Copyright (C) 2013  Free Software Foundation, Inc.
f96e0b
+#
f96e0b
+# GRUB is free software: you can redistribute it and/or modify
f96e0b
+# it under the terms of the GNU General Public License as published by
f96e0b
+# the Free Software Foundation, either version 3 of the License, or
f96e0b
+# (at your option) any later version.
f96e0b
+#
f96e0b
+# GRUB is distributed in the hope that it will be useful,
f96e0b
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
f96e0b
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
f96e0b
+# GNU General Public License for more details.
f96e0b
+#
f96e0b
+# You should have received a copy of the GNU General Public License
f96e0b
+# along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
f96e0b
+
f96e0b
+set -e
f96e0b
+grubshell=@builddir@/grub-shell
f96e0b
+
f96e0b
+. "@builddir@/grub-core/modinfo.sh"
f96e0b
+
f96e0b
+if [ "$(echo hello | "${grubshell}" --mkrescue-arg=--compress=xz)" != "Hello World" ]; then
f96e0b
+   exit 1
f96e0b
+fi
f96e0b
-- 
f96e0b
1.8.2.1
f96e0b