Blame SOURCES/0029-Split-the-test-case-for-rescue-images-into-tests-wit.patch

16aa69
From 2f5d55122bacc0a04e069d936968324ff1c47115 Mon Sep 17 00:00:00 2001
16aa69
From: Peter Jones <pjones@redhat.com>
16aa69
Date: Tue, 17 Mar 2015 14:24:35 -0400
16aa69
Subject: [PATCH 29/41] Split the test case for rescue images into tests with
16aa69
 and without linux16.
16aa69
16aa69
Right now the test is only a linux16 variety and it isn't only run on
16aa69
x86; that'll fail.  Split it into two tests, one which has no linux16,
16aa69
and one that has it and only runs on x86.
16aa69
16aa69
Resolves: rhbz#1202876
16aa69
16aa69
Signed-off-by: Peter Jones <pjones@redhat.com>
16aa69
---
16aa69
 test.sh                  |   9 +++-
16aa69
 test/grub2.15            | 111 +++++++++++++++++++++++++++++++++++++++++
16aa69
 test/results/add/g2-1.14 |   6 +--
16aa69
 test/results/add/g2-1.15 | 126 +++++++++++++++++++++++++++++++++++++++++++++++
16aa69
 4 files changed, 248 insertions(+), 4 deletions(-)
16aa69
 create mode 100644 test/grub2.15
16aa69
 create mode 100644 test/results/add/g2-1.15
16aa69
16aa69
diff --git a/test.sh b/test.sh
16aa69
index 1d95ed3..3cfb965 100755
16aa69
--- a/test.sh
16aa69
+++ b/test.sh
16aa69
@@ -511,7 +511,7 @@ if [ "$testgrub2" == "y" ]; then
16aa69
     grub2Test grub2.5 add/g2-1.5 --add-kernel=/boot/new-kernel.img \
16aa69
         --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
16aa69
         --copy-default
16aa69
-    grub2Test grub2.14 add/g2-1.14 \
16aa69
+    grub2Test grub2.15 add/g2-1.15 \
16aa69
         --add-kernel=/boot/vmlinuz-0-rescue-5a94251776a14678911d4ae0949500f5 \
16aa69
         --initrd /boot/initramfs-0-rescue-5a94251776a14678911d4ae0949500f5.img \
16aa69
         --copy-default --title "Fedora 21 Rescue" --args=root=/fooooo \
16aa69
@@ -607,6 +607,13 @@ if [ "$testgrub2" == "y" ]; then
16aa69
         testing="GRUB2 add initrd with linux16"
16aa69
         grub2Test grub2.11 add/g2-1.11 --update-kernel=/boot/new-kernel.img \
16aa69
             --initrd=/boot/new-initrd --boot-filesystem=/boot/
16aa69
+
16aa69
+        testing="GRUB2 add rescue with linux16"
16aa69
+        grub2Test grub2.14 add/g2-1.14 \
16aa69
+            --add-kernel=/boot/vmlinuz-0-rescue-5a94251776a14678911d4ae0949500f5 \
16aa69
+            --initrd /boot/initramfs-0-rescue-5a94251776a14678911d4ae0949500f5.img \
16aa69
+            --copy-default --title "Fedora 21 Rescue" --args=root=/fooooo \
16aa69
+            --remove-kernel=wtf --boot-filesystem=/boot/
16aa69
     fi
16aa69
 fi
16aa69
 
16aa69
diff --git a/test/grub2.15 b/test/grub2.15
16aa69
new file mode 100644
16aa69
index 0000000..b7e7c16
16aa69
--- /dev/null
16aa69
+++ b/test/grub2.15
16aa69
@@ -0,0 +1,111 @@
16aa69
+#
16aa69
+# DO NOT EDIT THIS FILE
16aa69
+#
16aa69
+# It is automatically generated by grub2-mkconfig using templates
16aa69
+# from /etc/grub.d and settings from /etc/default/grub
16aa69
+#
16aa69
+
16aa69
+### BEGIN /etc/grub.d/00_header ###
16aa69
+set pager=1
16aa69
+
16aa69
+if [ -s $prefix/grubenv ]; then
16aa69
+  load_env
16aa69
+fi
16aa69
+if [ "${next_entry}" ] ; then
16aa69
+   set default="${next_entry}"
16aa69
+   set next_entry=
16aa69
+   save_env next_entry
16aa69
+   set boot_once=true
16aa69
+else
16aa69
+   set default="${saved_entry}"
16aa69
+fi
16aa69
+
16aa69
+if [ x"${feature_menuentry_id}" = xy ]; then
16aa69
+  menuentry_id_option="--id"
16aa69
+else
16aa69
+  menuentry_id_option=""
16aa69
+fi
16aa69
+
16aa69
+export menuentry_id_option
16aa69
+
16aa69
+if [ "${prev_saved_entry}" ]; then
16aa69
+  set saved_entry="${prev_saved_entry}"
16aa69
+  save_env saved_entry
16aa69
+  set prev_saved_entry=
16aa69
+  save_env prev_saved_entry
16aa69
+  set boot_once=true
16aa69
+fi
16aa69
+
16aa69
+function savedefault {
16aa69
+  if [ -z "${boot_once}" ]; then
16aa69
+    saved_entry="${chosen}"
16aa69
+    save_env saved_entry
16aa69
+  fi
16aa69
+}
16aa69
+
16aa69
+function load_video {
16aa69
+  if [ x$feature_all_video_module = xy ]; then
16aa69
+    insmod all_video
16aa69
+  else
16aa69
+    insmod efi_gop
16aa69
+    insmod efi_uga
16aa69
+    insmod ieee1275_fb
16aa69
+    insmod vbe
16aa69
+    insmod vga
16aa69
+    insmod video_bochs
16aa69
+    insmod video_cirrus
16aa69
+  fi
16aa69
+}
16aa69
+
16aa69
+terminal_output console
16aa69
+if [ x$feature_timeout_style = xy ] ; then
16aa69
+  set timeout_style=menu
16aa69
+  set timeout=5
16aa69
+# Fallback normal timeout code in case the timeout_style feature is
16aa69
+# unavailable.
16aa69
+else
16aa69
+  set timeout=5
16aa69
+fi
16aa69
+### END /etc/grub.d/00_header ###
16aa69
+
16aa69
+### BEGIN /etc/grub.d/10_linux ###
16aa69
+menuentry 'Fedora, with Linux 3.15.0-0.rc5.git2.10.fc21.x86_64' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.15.0-0.rc5.git2.10.fc21.x86_64-advanced-a14e3dcb-ade3-42f7-832f-d9f66b5ae6a3' {
16aa69
+	load_video
16aa69
+	set gfxpayload=keep
16aa69
+	insmod gzio
16aa69
+	insmod part_msdos
16aa69
+	insmod ext2
16aa69
+	set root='hd0,msdos1'
16aa69
+	if [ x$feature_platform_search_hint = xy ]; then
16aa69
+	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  6169b46f-0257-4319-b2e4-caaed2a8e06b
16aa69
+	else
16aa69
+	  search --no-floppy --fs-uuid --set=root 6169b46f-0257-4319-b2e4-caaed2a8e06b
16aa69
+	fi
16aa69
+	linux /vmlinuz-3.15.0-0.rc5.git2.10.fc21.x86_64 root=/dev/mapper/fedora_uefi-root ro  rd.lvm.lv=fedora_uefi/root rd.lvm.lv=fedora_uefi/swap rhgb quiet
16aa69
+}
16aa69
+
16aa69
+### END /etc/grub.d/10_linux ###
16aa69
+
16aa69
+### BEGIN /etc/grub.d/20_linux_xen ###
16aa69
+
16aa69
+### END /etc/grub.d/20_linux_xen ###
16aa69
+
16aa69
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
16aa69
+### END /etc/grub.d/20_ppc_terminfo ###
16aa69
+
16aa69
+### BEGIN /etc/grub.d/30_os-prober ###
16aa69
+### END /etc/grub.d/30_os-prober ###
16aa69
+
16aa69
+### BEGIN /etc/grub.d/40_custom ###
16aa69
+# This file provides an easy way to add custom menu entries.  Simply type the
16aa69
+# menu entries you want to add after this comment.  Be careful not to change
16aa69
+# the 'exec tail' line above.
16aa69
+### END /etc/grub.d/40_custom ###
16aa69
+
16aa69
+### BEGIN /etc/grub.d/41_custom ###
16aa69
+if [ -f  ${config_directory}/custom.cfg ]; then
16aa69
+  source ${config_directory}/custom.cfg
16aa69
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
16aa69
+  source $prefix/custom.cfg;
16aa69
+fi
16aa69
+### END /etc/grub.d/41_custom ###
16aa69
diff --git a/test/results/add/g2-1.14 b/test/results/add/g2-1.14
16aa69
index 0865bbc..68b2d2b 100644
16aa69
--- a/test/results/add/g2-1.14
16aa69
+++ b/test/results/add/g2-1.14
16aa69
@@ -81,8 +81,8 @@ menuentry 'Fedora 21 Rescue' --class fedora --class gnu-linux --class gnu --clas
16aa69
 	else
16aa69
 	  search --no-floppy --fs-uuid --set=root 6169b46f-0257-4319-b2e4-caaed2a8e06b
16aa69
 	fi
16aa69
-	linux16 /vmlinuz-0-rescue-5a94251776a14678911d4ae0949500f5 root=/fooooo ro  rd.lvm.lv=fedora_uefi/root rd.lvm.lv=fedora_uefi/swap rhgb quiet
16aa69
-	initrd16 /initramfs-0-rescue-5a94251776a14678911d4ae0949500f5.img
16aa69
+	linux /vmlinuz-0-rescue-5a94251776a14678911d4ae0949500f5 root=/fooooo ro  rd.lvm.lv=fedora_uefi/root rd.lvm.lv=fedora_uefi/swap rhgb quiet
16aa69
+	initrd /initramfs-0-rescue-5a94251776a14678911d4ae0949500f5.img
16aa69
 }
16aa69
 menuentry 'Fedora, with Linux 3.15.0-0.rc5.git2.10.fc21.x86_64' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.15.0-0.rc5.git2.10.fc21.x86_64-advanced-a14e3dcb-ade3-42f7-832f-d9f66b5ae6a3' {
16aa69
 	load_video
16aa69
@@ -96,7 +96,7 @@ menuentry 'Fedora, with Linux 3.15.0-0.rc5.git2.10.fc21.x86_64' --class fedora -
16aa69
 	else
16aa69
 	  search --no-floppy --fs-uuid --set=root 6169b46f-0257-4319-b2e4-caaed2a8e06b
16aa69
 	fi
16aa69
-	linux16 /vmlinuz-3.15.0-0.rc5.git2.10.fc21.x86_64 root=/dev/mapper/fedora_uefi-root ro  rd.lvm.lv=fedora_uefi/root rd.lvm.lv=fedora_uefi/swap rhgb quiet
16aa69
+	linux /vmlinuz-3.15.0-0.rc5.git2.10.fc21.x86_64 root=/dev/mapper/fedora_uefi-root ro  rd.lvm.lv=fedora_uefi/root rd.lvm.lv=fedora_uefi/swap rhgb quiet
16aa69
 }
16aa69
 
16aa69
 ### END /etc/grub.d/10_linux ###
16aa69
diff --git a/test/results/add/g2-1.15 b/test/results/add/g2-1.15
16aa69
new file mode 100644
16aa69
index 0000000..0865bbc
16aa69
--- /dev/null
16aa69
+++ b/test/results/add/g2-1.15
16aa69
@@ -0,0 +1,126 @@
16aa69
+#
16aa69
+# DO NOT EDIT THIS FILE
16aa69
+#
16aa69
+# It is automatically generated by grub2-mkconfig using templates
16aa69
+# from /etc/grub.d and settings from /etc/default/grub
16aa69
+#
16aa69
+
16aa69
+### BEGIN /etc/grub.d/00_header ###
16aa69
+set pager=1
16aa69
+
16aa69
+if [ -s $prefix/grubenv ]; then
16aa69
+  load_env
16aa69
+fi
16aa69
+if [ "${next_entry}" ] ; then
16aa69
+   set default="${next_entry}"
16aa69
+   set next_entry=
16aa69
+   save_env next_entry
16aa69
+   set boot_once=true
16aa69
+else
16aa69
+   set default="${saved_entry}"
16aa69
+fi
16aa69
+
16aa69
+if [ x"${feature_menuentry_id}" = xy ]; then
16aa69
+  menuentry_id_option="--id"
16aa69
+else
16aa69
+  menuentry_id_option=""
16aa69
+fi
16aa69
+
16aa69
+export menuentry_id_option
16aa69
+
16aa69
+if [ "${prev_saved_entry}" ]; then
16aa69
+  set saved_entry="${prev_saved_entry}"
16aa69
+  save_env saved_entry
16aa69
+  set prev_saved_entry=
16aa69
+  save_env prev_saved_entry
16aa69
+  set boot_once=true
16aa69
+fi
16aa69
+
16aa69
+function savedefault {
16aa69
+  if [ -z "${boot_once}" ]; then
16aa69
+    saved_entry="${chosen}"
16aa69
+    save_env saved_entry
16aa69
+  fi
16aa69
+}
16aa69
+
16aa69
+function load_video {
16aa69
+  if [ x$feature_all_video_module = xy ]; then
16aa69
+    insmod all_video
16aa69
+  else
16aa69
+    insmod efi_gop
16aa69
+    insmod efi_uga
16aa69
+    insmod ieee1275_fb
16aa69
+    insmod vbe
16aa69
+    insmod vga
16aa69
+    insmod video_bochs
16aa69
+    insmod video_cirrus
16aa69
+  fi
16aa69
+}
16aa69
+
16aa69
+terminal_output console
16aa69
+if [ x$feature_timeout_style = xy ] ; then
16aa69
+  set timeout_style=menu
16aa69
+  set timeout=5
16aa69
+# Fallback normal timeout code in case the timeout_style feature is
16aa69
+# unavailable.
16aa69
+else
16aa69
+  set timeout=5
16aa69
+fi
16aa69
+### END /etc/grub.d/00_header ###
16aa69
+
16aa69
+### BEGIN /etc/grub.d/10_linux ###
16aa69
+menuentry 'Fedora 21 Rescue' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.15.0-0.rc5.git2.10.fc21.x86_64-advanced-a14e3dcb-ade3-42f7-832f-d9f66b5ae6a3' {
16aa69
+	load_video
16aa69
+	set gfxpayload=keep
16aa69
+	insmod gzio
16aa69
+	insmod part_msdos
16aa69
+	insmod ext2
16aa69
+	set root='hd0,msdos1'
16aa69
+	if [ x$feature_platform_search_hint = xy ]; then
16aa69
+	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  6169b46f-0257-4319-b2e4-caaed2a8e06b
16aa69
+	else
16aa69
+	  search --no-floppy --fs-uuid --set=root 6169b46f-0257-4319-b2e4-caaed2a8e06b
16aa69
+	fi
16aa69
+	linux16 /vmlinuz-0-rescue-5a94251776a14678911d4ae0949500f5 root=/fooooo ro  rd.lvm.lv=fedora_uefi/root rd.lvm.lv=fedora_uefi/swap rhgb quiet
16aa69
+	initrd16 /initramfs-0-rescue-5a94251776a14678911d4ae0949500f5.img
16aa69
+}
16aa69
+menuentry 'Fedora, with Linux 3.15.0-0.rc5.git2.10.fc21.x86_64' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.15.0-0.rc5.git2.10.fc21.x86_64-advanced-a14e3dcb-ade3-42f7-832f-d9f66b5ae6a3' {
16aa69
+	load_video
16aa69
+	set gfxpayload=keep
16aa69
+	insmod gzio
16aa69
+	insmod part_msdos
16aa69
+	insmod ext2
16aa69
+	set root='hd0,msdos1'
16aa69
+	if [ x$feature_platform_search_hint = xy ]; then
16aa69
+	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  6169b46f-0257-4319-b2e4-caaed2a8e06b
16aa69
+	else
16aa69
+	  search --no-floppy --fs-uuid --set=root 6169b46f-0257-4319-b2e4-caaed2a8e06b
16aa69
+	fi
16aa69
+	linux16 /vmlinuz-3.15.0-0.rc5.git2.10.fc21.x86_64 root=/dev/mapper/fedora_uefi-root ro  rd.lvm.lv=fedora_uefi/root rd.lvm.lv=fedora_uefi/swap rhgb quiet
16aa69
+}
16aa69
+
16aa69
+### END /etc/grub.d/10_linux ###
16aa69
+
16aa69
+### BEGIN /etc/grub.d/20_linux_xen ###
16aa69
+
16aa69
+### END /etc/grub.d/20_linux_xen ###
16aa69
+
16aa69
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
16aa69
+### END /etc/grub.d/20_ppc_terminfo ###
16aa69
+
16aa69
+### BEGIN /etc/grub.d/30_os-prober ###
16aa69
+### END /etc/grub.d/30_os-prober ###
16aa69
+
16aa69
+### BEGIN /etc/grub.d/40_custom ###
16aa69
+# This file provides an easy way to add custom menu entries.  Simply type the
16aa69
+# menu entries you want to add after this comment.  Be careful not to change
16aa69
+# the 'exec tail' line above.
16aa69
+### END /etc/grub.d/40_custom ###
16aa69
+
16aa69
+### BEGIN /etc/grub.d/41_custom ###
16aa69
+if [ -f  ${config_directory}/custom.cfg ]; then
16aa69
+  source ${config_directory}/custom.cfg
16aa69
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
16aa69
+  source $prefix/custom.cfg;
16aa69
+fi
16aa69
+### END /etc/grub.d/41_custom ###
16aa69
-- 
16aa69
2.4.3
16aa69