[PATCH 4/9] v2.1 add tests for btrfs support

Gene Czarcinski gczarcinski at ec.rr.com
Mon Sep 15 12:50:47 UTC 2014


The tests performed are:
- add kernel with /boot on btrfs subvol (15)
- update kernel/add initrd with /boot on btrfs subvol (16)
- add kernel and initrd with /boot on btrfs subvol (19)
- add kernel with rootfs on btrfs subvol and /boot a directory (17)
- update kernel/add initrd with rootfs on btrfs subvol and
  /boot a directory (18)
- add kernel and initrd with rootfs on btrfs subvol and /boot
  a directory (20)
---
 test.sh                  |  34 +++++++++++
 test/grub2.15            | 126 +++++++++++++++++++++++++++++++++++++++++
 test/grub2.16            | 140 +++++++++++++++++++++++++++++++++++++++++++++
 test/grub2.17            | 128 +++++++++++++++++++++++++++++++++++++++++
 test/grub2.18            | 143 ++++++++++++++++++++++++++++++++++++++++++++++
 test/grub2.19            | 126 +++++++++++++++++++++++++++++++++++++++++
 test/grub2.20            | 128 +++++++++++++++++++++++++++++++++++++++++
 test/results/add/g2-1.15 | 140 +++++++++++++++++++++++++++++++++++++++++++++
 test/results/add/g2-1.16 | 141 ++++++++++++++++++++++++++++++++++++++++++++++
 test/results/add/g2-1.17 | 143 ++++++++++++++++++++++++++++++++++++++++++++++
 test/results/add/g2-1.18 | 144 +++++++++++++++++++++++++++++++++++++++++++++++
 test/results/add/g2-1.19 | 141 ++++++++++++++++++++++++++++++++++++++++++++++
 test/results/add/g2-1.20 | 144 +++++++++++++++++++++++++++++++++++++++++++++++
 13 files changed, 1678 insertions(+)
 create mode 100644 test/grub2.15
 create mode 100644 test/grub2.16
 create mode 100644 test/grub2.17
 create mode 100644 test/grub2.18
 create mode 100644 test/grub2.19
 create mode 100644 test/grub2.20
 create mode 100644 test/results/add/g2-1.15
 create mode 100644 test/results/add/g2-1.16
 create mode 100644 test/results/add/g2-1.17
 create mode 100644 test/results/add/g2-1.18
 create mode 100644 test/results/add/g2-1.19
 create mode 100644 test/results/add/g2-1.20

diff --git a/test.sh b/test.sh
index 864a8ce..d98368b 100755
--- a/test.sh
+++ b/test.sh
@@ -619,6 +619,40 @@ if [ "$testgrub2" == "y" ]; then
         testing="GRUB2 add initrd with linux16"
         grub2Test grub2.11 add/g2-1.11 --update-kernel=/boot/new-kernel.img \
             --initrd=/boot/new-initrd --boot-filesystem=/boot/
+
+        testing="GRUB2 add kernel with boot on btrfs subvol"
+        grub2Test grub2.15 add/g2-1.15 --add-kernel=/boot/new-kernel.img \
+            --title='title' \
+            --boot-filesystem=/boot/ \
+            --copy-default
+
+        testing="GRUB2 add initrd with boot on btrfs subvol"
+        grub2Test grub2.16 add/g2-1.16 --update-kernel=/boot/new-kernel.img \
+            --initrd=/boot/new-initrd --boot-filesystem=/boot/
+
+        testing="GRUB2 add kernel with rootfs on btrfs subvol and boot directory"
+        grub2Test grub2.17 add/g2-1.17 --add-kernel=/boot/new-kernel.img \
+            --title='title' \
+            --boot-filesystem= \
+            --copy-default
+
+        testing="GRUB2 add initrd with rootfs on btrfs subvol and boot directory"
+        grub2Test grub2.18 add/g2-1.18 --update-kernel=/boot/new-kernel.img \
+            --initrd=/boot/new-initrd --boot-filesystem=
+
+        testing="GRUB2 add kernel and initrd with boot on btrfs subvol"
+        grub2Test grub2.19 add/g2-1.19 --add-kernel=/boot/new-kernel.img \
+            --title='title' \
+            --initrd=/boot/new-initrd \
+            --boot-filesystem=/boot/ \
+            --copy-default
+
+        testing="GRUB2 add kernel and initrd with rootfs on btrfs subvol and boot directory"
+        grub2Test grub2.20 add/g2-1.20 --add-kernel=/boot/new-kernel.img \
+            --title='title' \
+            --initrd=/boot/new-initrd \
+            --boot-filesystem= \
+            --copy-default
     fi
 fi
 
diff --git a/test/grub2.15 b/test/grub2.15
new file mode 100644
index 0000000..23b75fa
--- /dev/null
+++ b/test/grub2.15
@@ -0,0 +1,126 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically generated by grub2-mkconfig using templates
+# from /etc/grub.d and settings from /etc/default/grub
+#
+
+### BEGIN /etc/grub.d/00_header ###
+set pager=1
+
+if [ -s $prefix/grubenv ]; then
+  load_env
+fi
+if [ "${next_entry}" ] ; then
+   set default="${next_entry}"
+   set next_entry=
+   save_env next_entry
+   set boot_once=true
+else
+   set default="${saved_entry}"
+fi
+
+if [ x"${feature_menuentry_id}" = xy ]; then
+  menuentry_id_option="--id"
+else
+  menuentry_id_option=""
+fi
+
+export menuentry_id_option
+
+if [ "${prev_saved_entry}" ]; then
+  set saved_entry="${prev_saved_entry}"
+  save_env saved_entry
+  set prev_saved_entry=
+  save_env prev_saved_entry
+  set boot_once=true
+fi
+
+function savedefault {
+  if [ -z "${boot_once}" ]; then
+    saved_entry="${chosen}"
+    save_env saved_entry
+  fi
+}
+
+function load_video {
+  if [ x$feature_all_video_module = xy ]; then
+    insmod all_video
+  else
+    insmod efi_gop
+    insmod efi_uga
+    insmod ieee1275_fb
+    insmod vbe
+    insmod vga
+    insmod video_bochs
+    insmod video_cirrus
+  fi
+}
+
+terminal_output console
+if [ x$feature_timeout_style = xy ] ; then
+  set timeout_style=menu
+  set timeout=15
+# Fallback normal timeout code in case the timeout_style feature is
+# unavailable.
+else
+  set timeout=15
+fi
+### END /etc/grub.d/00_header ###
+
+### BEGIN /etc/grub.d/10_linux ###
+menuentry 'Fedora, with Linux 3.15.0-0.rc7.git2.1.fc21.x86_64' --class gnu-linux --class gnu --class os {
+	load_video
+	set gfxpayload=keep
+	insmod gzio
+	insmod part_msdos
+	insmod btrfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1bab15a4-93ce-4373-8d7d-b77f907fd0c6
+	else
+	  search --no-floppy --fs-uuid --set=root 1bab15a4-93ce-4373-8d7d-b77f907fd0c6
+	fi
+	linux16 /boot6/vmlinuz-3.15.0-0.rc7.git2.1.fc21.x86_64 root=UUID=1bab15a4-93ce-4373-8d7d-b77f907fd0c6 ro rootflags=subvol=root6 rhgb quiet
+	initrd16 /boot6/initramfs-3.15.0-0.rc7.git2.1.fc21.x86_64.img
+}
+menuentry 'Fedora, with Linux 0-rescue-81378818f7a24478b496ebef90e1dd69' --class gnu-linux --class gnu --class os {
+	load_video
+	insmod gzio
+	insmod part_msdos
+	insmod btrfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1bab15a4-93ce-4373-8d7d-b77f907fd0c6
+	else
+	  search --no-floppy --fs-uuid --set=root 1bab15a4-93ce-4373-8d7d-b77f907fd0c6
+	fi
+	linux16 /boot6/vmlinuz-0-rescue-81378818f7a24478b496ebef90e1dd69 root=UUID=1bab15a4-93ce-4373-8d7d-b77f907fd0c6 ro rootflags=subvol=root6 rhgb quiet
+	initrd16 /boot6/initramfs-0-rescue-81378818f7a24478b496ebef90e1dd69.img
+}
+
+### END /etc/grub.d/10_linux ###
+
+### BEGIN /etc/grub.d/20_linux_xen ###
+
+### END /etc/grub.d/20_linux_xen ###
+
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
+### END /etc/grub.d/20_ppc_terminfo ###
+
+### BEGIN /etc/grub.d/30_os-prober ###
+### END /etc/grub.d/30_os-prober ###
+
+### BEGIN /etc/grub.d/40_custom ###
+# This file provides an easy way to add custom menu entries.  Simply type the
+# menu entries you want to add after this comment.  Be careful not to change
+# the 'exec tail' line above.
+### END /etc/grub.d/40_custom ###
+
+### BEGIN /etc/grub.d/41_custom ###
+if [ -f  ${config_directory}/custom.cfg ]; then
+  source ${config_directory}/custom.cfg
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
+  source $prefix/custom.cfg;
+fi
+### END /etc/grub.d/41_custom ###
diff --git a/test/grub2.16 b/test/grub2.16
new file mode 100644
index 0000000..579c2f6
--- /dev/null
+++ b/test/grub2.16
@@ -0,0 +1,140 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically generated by grub2-mkconfig using templates
+# from /etc/grub.d and settings from /etc/default/grub
+#
+
+### BEGIN /etc/grub.d/00_header ###
+set pager=1
+
+if [ -s $prefix/grubenv ]; then
+  load_env
+fi
+if [ "${next_entry}" ] ; then
+   set default="${next_entry}"
+   set next_entry=
+   save_env next_entry
+   set boot_once=true
+else
+   set default="${saved_entry}"
+fi
+
+if [ x"${feature_menuentry_id}" = xy ]; then
+  menuentry_id_option="--id"
+else
+  menuentry_id_option=""
+fi
+
+export menuentry_id_option
+
+if [ "${prev_saved_entry}" ]; then
+  set saved_entry="${prev_saved_entry}"
+  save_env saved_entry
+  set prev_saved_entry=
+  save_env prev_saved_entry
+  set boot_once=true
+fi
+
+function savedefault {
+  if [ -z "${boot_once}" ]; then
+    saved_entry="${chosen}"
+    save_env saved_entry
+  fi
+}
+
+function load_video {
+  if [ x$feature_all_video_module = xy ]; then
+    insmod all_video
+  else
+    insmod efi_gop
+    insmod efi_uga
+    insmod ieee1275_fb
+    insmod vbe
+    insmod vga
+    insmod video_bochs
+    insmod video_cirrus
+  fi
+}
+
+terminal_output console
+if [ x$feature_timeout_style = xy ] ; then
+  set timeout_style=menu
+  set timeout=15
+# Fallback normal timeout code in case the timeout_style feature is
+# unavailable.
+else
+  set timeout=15
+fi
+### END /etc/grub.d/00_header ###
+
+### BEGIN /etc/grub.d/10_linux ###
+menuentry 'title' --class gnu-linux --class gnu --class os {
+	load_video
+	set gfxpayload=keep
+	insmod gzio
+	insmod part_msdos
+	insmod btrfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1bab15a4-93ce-4373-8d7d-b77f907fd0c6
+	else
+	  search --no-floppy --fs-uuid --set=root 1bab15a4-93ce-4373-8d7d-b77f907fd0c6
+	fi
+	linux16 /boot6/new-kernel.img root=UUID=1bab15a4-93ce-4373-8d7d-b77f907fd0c6 ro rootflags=subvol=root6 rhgb quiet
+}
+menuentry 'Fedora, with Linux 3.15.0-0.rc7.git2.1.fc21.x86_64' --class gnu-linux --class gnu --class os {
+	load_video
+	set gfxpayload=keep
+	insmod gzio
+	insmod part_msdos
+	insmod btrfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1bab15a4-93ce-4373-8d7d-b77f907fd0c6
+	else
+	  search --no-floppy --fs-uuid --set=root 1bab15a4-93ce-4373-8d7d-b77f907fd0c6
+	fi
+	linux16 /boot6/vmlinuz-3.15.0-0.rc7.git2.1.fc21.x86_64 root=UUID=1bab15a4-93ce-4373-8d7d-b77f907fd0c6 ro rootflags=subvol=root6 rhgb quiet
+	initrd16 /boot6/initramfs-3.15.0-0.rc7.git2.1.fc21.x86_64.img
+}
+menuentry 'Fedora, with Linux 0-rescue-81378818f7a24478b496ebef90e1dd69' --class gnu-linux --class gnu --class os {
+	load_video
+	insmod gzio
+	insmod part_msdos
+	insmod btrfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1bab15a4-93ce-4373-8d7d-b77f907fd0c6
+	else
+	  search --no-floppy --fs-uuid --set=root 1bab15a4-93ce-4373-8d7d-b77f907fd0c6
+	fi
+	linux16 /boot6/vmlinuz-0-rescue-81378818f7a24478b496ebef90e1dd69 root=UUID=1bab15a4-93ce-4373-8d7d-b77f907fd0c6 ro rootflags=subvol=root6 rhgb quiet
+	initrd16 /boot6/initramfs-0-rescue-81378818f7a24478b496ebef90e1dd69.img
+}
+
+### END /etc/grub.d/10_linux ###
+
+### BEGIN /etc/grub.d/20_linux_xen ###
+
+### END /etc/grub.d/20_linux_xen ###
+
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
+### END /etc/grub.d/20_ppc_terminfo ###
+
+### BEGIN /etc/grub.d/30_os-prober ###
+### END /etc/grub.d/30_os-prober ###
+
+### BEGIN /etc/grub.d/40_custom ###
+# This file provides an easy way to add custom menu entries.  Simply type the
+# menu entries you want to add after this comment.  Be careful not to change
+# the 'exec tail' line above.
+### END /etc/grub.d/40_custom ###
+
+### BEGIN /etc/grub.d/41_custom ###
+if [ -f  ${config_directory}/custom.cfg ]; then
+  source ${config_directory}/custom.cfg
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
+  source $prefix/custom.cfg;
+fi
+### END /etc/grub.d/41_custom ###
diff --git a/test/grub2.17 b/test/grub2.17
new file mode 100644
index 0000000..9466bc3
--- /dev/null
+++ b/test/grub2.17
@@ -0,0 +1,128 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically generated by grub2-mkconfig using templates
+# from /etc/grub.d and settings from /etc/default/grub
+#
+
+### BEGIN /etc/grub.d/00_header ###
+set pager=1
+
+if [ -s $prefix/grubenv ]; then
+  load_env
+fi
+if [ "${next_entry}" ] ; then
+   set default="${next_entry}"
+   set next_entry=
+   save_env next_entry
+   set boot_once=true
+else
+   set default="${saved_entry}"
+fi
+
+if [ x"${feature_menuentry_id}" = xy ]; then
+  menuentry_id_option="--id"
+else
+  menuentry_id_option=""
+fi
+
+export menuentry_id_option
+
+if [ "${prev_saved_entry}" ]; then
+  set saved_entry="${prev_saved_entry}"
+  save_env saved_entry
+  set prev_saved_entry=
+  save_env prev_saved_entry
+  set boot_once=true
+fi
+
+function savedefault {
+  if [ -z "${boot_once}" ]; then
+    saved_entry="${chosen}"
+    save_env saved_entry
+  fi
+}
+
+function load_video {
+  if [ x$feature_all_video_module = xy ]; then
+    insmod all_video
+  else
+    insmod efi_gop
+    insmod efi_uga
+    insmod ieee1275_fb
+    insmod vbe
+    insmod vga
+    insmod video_bochs
+    insmod video_cirrus
+  fi
+}
+
+terminal_output console
+if [ x$feature_timeout_style = xy ] ; then
+  set timeout_style=menu
+  set timeout=15
+# Fallback normal timeout code in case the timeout_style feature is
+# unavailable.
+else
+  set timeout=15
+fi
+### END /etc/grub.d/00_header ###
+
+### BEGIN /etc/grub.d/10_linux ###
+menuentry 'Fedora, with Linux 3.15.0-0.rc7.git2.1.fc21.x86_64' --class gnu-linux --class gnu --class os {
+	load_video
+	set gfxpayload=keep
+	insmod gzio
+	insmod part_msdos
+	insmod part_msdos
+	insmod btrfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  --hint='hd1,msdos3'  54c6abc2-b1e7-4987-aa73-c79927be69eb
+	else
+	  search --no-floppy --fs-uuid --set=root 54c6abc2-b1e7-4987-aa73-c79927be69eb
+	fi
+	linux16 /root4/boot/vmlinuz-3.15.0-0.rc7.git2.1.fc21.x86_64 root=UUID=54c6abc2-b1e7-4987-aa73-c79927be69eb ro rootflags=subvol=root4 rhgb quiet
+	initrd16 /root4/boot/initramfs-3.15.0-0.rc7.git2.1.fc21.x86_64.img
+}
+menuentry 'Fedora, with Linux 0-rescue-20e7024f4e9c4b70b1042b91acd434c6' --class gnu-linux --class gnu --class os {
+	load_video
+	insmod gzio
+	insmod part_msdos
+	insmod part_msdos
+	insmod btrfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  --hint='hd1,msdos3'  54c6abc2-b1e7-4987-aa73-c79927be69eb
+	else
+	  search --no-floppy --fs-uuid --set=root 54c6abc2-b1e7-4987-aa73-c79927be69eb
+	fi
+	linux16 /root4/boot/vmlinuz-0-rescue-20e7024f4e9c4b70b1042b91acd434c6 root=UUID=54c6abc2-b1e7-4987-aa73-c79927be69eb ro rootflags=subvol=root4 rhgb quiet
+	initrd16 /root4/boot/initramfs-0-rescue-20e7024f4e9c4b70b1042b91acd434c6.img
+}
+
+### END /etc/grub.d/10_linux ###
+
+### BEGIN /etc/grub.d/20_linux_xen ###
+
+### END /etc/grub.d/20_linux_xen ###
+
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
+### END /etc/grub.d/20_ppc_terminfo ###
+
+### BEGIN /etc/grub.d/30_os-prober ###
+###
+
+### BEGIN /etc/grub.d/40_custom ###
+# This file provides an easy way to add custom menu entries.  Simply type the
+# menu entries you want to add after this comment.  Be careful not to change
+# the 'exec tail' line above.
+### END /etc/grub.d/40_custom ###
+
+### BEGIN /etc/grub.d/41_custom ###
+if [ -f  ${config_directory}/custom.cfg ]; then
+  source ${config_directory}/custom.cfg
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
+  source $prefix/custom.cfg;
+fi
+### END /etc/grub.d/41_custom ###
diff --git a/test/grub2.18 b/test/grub2.18
new file mode 100644
index 0000000..5cb240f
--- /dev/null
+++ b/test/grub2.18
@@ -0,0 +1,143 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically generated by grub2-mkconfig using templates
+# from /etc/grub.d and settings from /etc/default/grub
+#
+
+### BEGIN /etc/grub.d/00_header ###
+set pager=1
+
+if [ -s $prefix/grubenv ]; then
+  load_env
+fi
+if [ "${next_entry}" ] ; then
+   set default="${next_entry}"
+   set next_entry=
+   save_env next_entry
+   set boot_once=true
+else
+   set default="${saved_entry}"
+fi
+
+if [ x"${feature_menuentry_id}" = xy ]; then
+  menuentry_id_option="--id"
+else
+  menuentry_id_option=""
+fi
+
+export menuentry_id_option
+
+if [ "${prev_saved_entry}" ]; then
+  set saved_entry="${prev_saved_entry}"
+  save_env saved_entry
+  set prev_saved_entry=
+  save_env prev_saved_entry
+  set boot_once=true
+fi
+
+function savedefault {
+  if [ -z "${boot_once}" ]; then
+    saved_entry="${chosen}"
+    save_env saved_entry
+  fi
+}
+
+function load_video {
+  if [ x$feature_all_video_module = xy ]; then
+    insmod all_video
+  else
+    insmod efi_gop
+    insmod efi_uga
+    insmod ieee1275_fb
+    insmod vbe
+    insmod vga
+    insmod video_bochs
+    insmod video_cirrus
+  fi
+}
+
+terminal_output console
+if [ x$feature_timeout_style = xy ] ; then
+  set timeout_style=menu
+  set timeout=15
+# Fallback normal timeout code in case the timeout_style feature is
+# unavailable.
+else
+  set timeout=15
+fi
+### END /etc/grub.d/00_header ###
+
+### BEGIN /etc/grub.d/10_linux ###
+menuentry 'title' --class gnu-linux --class gnu --class os {
+	load_video
+	set gfxpayload=keep
+	insmod gzio
+	insmod part_msdos
+	insmod part_msdos
+	insmod btrfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  --hint='hd1,msdos3'  54c6abc2-b1e7-4987-aa73-c79927be69eb
+	else
+	  search --no-floppy --fs-uuid --set=root 54c6abc2-b1e7-4987-aa73-c79927be69eb
+	fi
+	linux16 /root4/boot/new-kernel.img root=UUID=54c6abc2-b1e7-4987-aa73-c79927be69eb ro rootflags=subvol=root4 rhgb quiet
+}
+menuentry 'Fedora, with Linux 3.15.0-0.rc7.git2.1.fc21.x86_64' --class gnu-linux --class gnu --class os {
+	load_video
+	set gfxpayload=keep
+	insmod gzio
+	insmod part_msdos
+	insmod part_msdos
+	insmod btrfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  --hint='hd1,msdos3'  54c6abc2-b1e7-4987-aa73-c79927be69eb
+	else
+	  search --no-floppy --fs-uuid --set=root 54c6abc2-b1e7-4987-aa73-c79927be69eb
+	fi
+	linux16 /root4/boot/vmlinuz-3.15.0-0.rc7.git2.1.fc21.x86_64 root=UUID=54c6abc2-b1e7-4987-aa73-c79927be69eb ro rootflags=subvol=root4 rhgb quiet
+	initrd16 /root4/boot/initramfs-3.15.0-0.rc7.git2.1.fc21.x86_64.img
+}
+menuentry 'Fedora, with Linux 0-rescue-20e7024f4e9c4b70b1042b91acd434c6' --class gnu-linux --class gnu --class os {
+	load_video
+	insmod gzio
+	insmod part_msdos
+	insmod part_msdos
+	insmod btrfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  --hint='hd1,msdos3'  54c6abc2-b1e7-4987-aa73-c79927be69eb
+	else
+	  search --no-floppy --fs-uuid --set=root 54c6abc2-b1e7-4987-aa73-c79927be69eb
+	fi
+	linux16 /root4/boot/vmlinuz-0-rescue-20e7024f4e9c4b70b1042b91acd434c6 root=UUID=54c6abc2-b1e7-4987-aa73-c79927be69eb ro rootflags=subvol=root4 rhgb quiet
+	initrd16 /root4/boot/initramfs-0-rescue-20e7024f4e9c4b70b1042b91acd434c6.img
+}
+
+### END /etc/grub.d/10_linux ###
+
+### BEGIN /etc/grub.d/20_linux_xen ###
+
+### END /etc/grub.d/20_linux_xen ###
+
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
+### END /etc/grub.d/20_ppc_terminfo ###
+
+### BEGIN /etc/grub.d/30_os-prober ###
+###
+
+### BEGIN /etc/grub.d/40_custom ###
+# This file provides an easy way to add custom menu entries.  Simply type the
+# menu entries you want to add after this comment.  Be careful not to change
+# the 'exec tail' line above.
+### END /etc/grub.d/40_custom ###
+
+### BEGIN /etc/grub.d/41_custom ###
+if [ -f  ${config_directory}/custom.cfg ]; then
+  source ${config_directory}/custom.cfg
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
+  source $prefix/custom.cfg;
+fi
+### END /etc/grub.d/41_custom ###
diff --git a/test/grub2.19 b/test/grub2.19
new file mode 100644
index 0000000..23b75fa
--- /dev/null
+++ b/test/grub2.19
@@ -0,0 +1,126 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically generated by grub2-mkconfig using templates
+# from /etc/grub.d and settings from /etc/default/grub
+#
+
+### BEGIN /etc/grub.d/00_header ###
+set pager=1
+
+if [ -s $prefix/grubenv ]; then
+  load_env
+fi
+if [ "${next_entry}" ] ; then
+   set default="${next_entry}"
+   set next_entry=
+   save_env next_entry
+   set boot_once=true
+else
+   set default="${saved_entry}"
+fi
+
+if [ x"${feature_menuentry_id}" = xy ]; then
+  menuentry_id_option="--id"
+else
+  menuentry_id_option=""
+fi
+
+export menuentry_id_option
+
+if [ "${prev_saved_entry}" ]; then
+  set saved_entry="${prev_saved_entry}"
+  save_env saved_entry
+  set prev_saved_entry=
+  save_env prev_saved_entry
+  set boot_once=true
+fi
+
+function savedefault {
+  if [ -z "${boot_once}" ]; then
+    saved_entry="${chosen}"
+    save_env saved_entry
+  fi
+}
+
+function load_video {
+  if [ x$feature_all_video_module = xy ]; then
+    insmod all_video
+  else
+    insmod efi_gop
+    insmod efi_uga
+    insmod ieee1275_fb
+    insmod vbe
+    insmod vga
+    insmod video_bochs
+    insmod video_cirrus
+  fi
+}
+
+terminal_output console
+if [ x$feature_timeout_style = xy ] ; then
+  set timeout_style=menu
+  set timeout=15
+# Fallback normal timeout code in case the timeout_style feature is
+# unavailable.
+else
+  set timeout=15
+fi
+### END /etc/grub.d/00_header ###
+
+### BEGIN /etc/grub.d/10_linux ###
+menuentry 'Fedora, with Linux 3.15.0-0.rc7.git2.1.fc21.x86_64' --class gnu-linux --class gnu --class os {
+	load_video
+	set gfxpayload=keep
+	insmod gzio
+	insmod part_msdos
+	insmod btrfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1bab15a4-93ce-4373-8d7d-b77f907fd0c6
+	else
+	  search --no-floppy --fs-uuid --set=root 1bab15a4-93ce-4373-8d7d-b77f907fd0c6
+	fi
+	linux16 /boot6/vmlinuz-3.15.0-0.rc7.git2.1.fc21.x86_64 root=UUID=1bab15a4-93ce-4373-8d7d-b77f907fd0c6 ro rootflags=subvol=root6 rhgb quiet
+	initrd16 /boot6/initramfs-3.15.0-0.rc7.git2.1.fc21.x86_64.img
+}
+menuentry 'Fedora, with Linux 0-rescue-81378818f7a24478b496ebef90e1dd69' --class gnu-linux --class gnu --class os {
+	load_video
+	insmod gzio
+	insmod part_msdos
+	insmod btrfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1bab15a4-93ce-4373-8d7d-b77f907fd0c6
+	else
+	  search --no-floppy --fs-uuid --set=root 1bab15a4-93ce-4373-8d7d-b77f907fd0c6
+	fi
+	linux16 /boot6/vmlinuz-0-rescue-81378818f7a24478b496ebef90e1dd69 root=UUID=1bab15a4-93ce-4373-8d7d-b77f907fd0c6 ro rootflags=subvol=root6 rhgb quiet
+	initrd16 /boot6/initramfs-0-rescue-81378818f7a24478b496ebef90e1dd69.img
+}
+
+### END /etc/grub.d/10_linux ###
+
+### BEGIN /etc/grub.d/20_linux_xen ###
+
+### END /etc/grub.d/20_linux_xen ###
+
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
+### END /etc/grub.d/20_ppc_terminfo ###
+
+### BEGIN /etc/grub.d/30_os-prober ###
+### END /etc/grub.d/30_os-prober ###
+
+### BEGIN /etc/grub.d/40_custom ###
+# This file provides an easy way to add custom menu entries.  Simply type the
+# menu entries you want to add after this comment.  Be careful not to change
+# the 'exec tail' line above.
+### END /etc/grub.d/40_custom ###
+
+### BEGIN /etc/grub.d/41_custom ###
+if [ -f  ${config_directory}/custom.cfg ]; then
+  source ${config_directory}/custom.cfg
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
+  source $prefix/custom.cfg;
+fi
+### END /etc/grub.d/41_custom ###
diff --git a/test/grub2.20 b/test/grub2.20
new file mode 100644
index 0000000..9466bc3
--- /dev/null
+++ b/test/grub2.20
@@ -0,0 +1,128 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically generated by grub2-mkconfig using templates
+# from /etc/grub.d and settings from /etc/default/grub
+#
+
+### BEGIN /etc/grub.d/00_header ###
+set pager=1
+
+if [ -s $prefix/grubenv ]; then
+  load_env
+fi
+if [ "${next_entry}" ] ; then
+   set default="${next_entry}"
+   set next_entry=
+   save_env next_entry
+   set boot_once=true
+else
+   set default="${saved_entry}"
+fi
+
+if [ x"${feature_menuentry_id}" = xy ]; then
+  menuentry_id_option="--id"
+else
+  menuentry_id_option=""
+fi
+
+export menuentry_id_option
+
+if [ "${prev_saved_entry}" ]; then
+  set saved_entry="${prev_saved_entry}"
+  save_env saved_entry
+  set prev_saved_entry=
+  save_env prev_saved_entry
+  set boot_once=true
+fi
+
+function savedefault {
+  if [ -z "${boot_once}" ]; then
+    saved_entry="${chosen}"
+    save_env saved_entry
+  fi
+}
+
+function load_video {
+  if [ x$feature_all_video_module = xy ]; then
+    insmod all_video
+  else
+    insmod efi_gop
+    insmod efi_uga
+    insmod ieee1275_fb
+    insmod vbe
+    insmod vga
+    insmod video_bochs
+    insmod video_cirrus
+  fi
+}
+
+terminal_output console
+if [ x$feature_timeout_style = xy ] ; then
+  set timeout_style=menu
+  set timeout=15
+# Fallback normal timeout code in case the timeout_style feature is
+# unavailable.
+else
+  set timeout=15
+fi
+### END /etc/grub.d/00_header ###
+
+### BEGIN /etc/grub.d/10_linux ###
+menuentry 'Fedora, with Linux 3.15.0-0.rc7.git2.1.fc21.x86_64' --class gnu-linux --class gnu --class os {
+	load_video
+	set gfxpayload=keep
+	insmod gzio
+	insmod part_msdos
+	insmod part_msdos
+	insmod btrfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  --hint='hd1,msdos3'  54c6abc2-b1e7-4987-aa73-c79927be69eb
+	else
+	  search --no-floppy --fs-uuid --set=root 54c6abc2-b1e7-4987-aa73-c79927be69eb
+	fi
+	linux16 /root4/boot/vmlinuz-3.15.0-0.rc7.git2.1.fc21.x86_64 root=UUID=54c6abc2-b1e7-4987-aa73-c79927be69eb ro rootflags=subvol=root4 rhgb quiet
+	initrd16 /root4/boot/initramfs-3.15.0-0.rc7.git2.1.fc21.x86_64.img
+}
+menuentry 'Fedora, with Linux 0-rescue-20e7024f4e9c4b70b1042b91acd434c6' --class gnu-linux --class gnu --class os {
+	load_video
+	insmod gzio
+	insmod part_msdos
+	insmod part_msdos
+	insmod btrfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  --hint='hd1,msdos3'  54c6abc2-b1e7-4987-aa73-c79927be69eb
+	else
+	  search --no-floppy --fs-uuid --set=root 54c6abc2-b1e7-4987-aa73-c79927be69eb
+	fi
+	linux16 /root4/boot/vmlinuz-0-rescue-20e7024f4e9c4b70b1042b91acd434c6 root=UUID=54c6abc2-b1e7-4987-aa73-c79927be69eb ro rootflags=subvol=root4 rhgb quiet
+	initrd16 /root4/boot/initramfs-0-rescue-20e7024f4e9c4b70b1042b91acd434c6.img
+}
+
+### END /etc/grub.d/10_linux ###
+
+### BEGIN /etc/grub.d/20_linux_xen ###
+
+### END /etc/grub.d/20_linux_xen ###
+
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
+### END /etc/grub.d/20_ppc_terminfo ###
+
+### BEGIN /etc/grub.d/30_os-prober ###
+###
+
+### BEGIN /etc/grub.d/40_custom ###
+# This file provides an easy way to add custom menu entries.  Simply type the
+# menu entries you want to add after this comment.  Be careful not to change
+# the 'exec tail' line above.
+### END /etc/grub.d/40_custom ###
+
+### BEGIN /etc/grub.d/41_custom ###
+if [ -f  ${config_directory}/custom.cfg ]; then
+  source ${config_directory}/custom.cfg
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
+  source $prefix/custom.cfg;
+fi
+### END /etc/grub.d/41_custom ###
diff --git a/test/results/add/g2-1.15 b/test/results/add/g2-1.15
new file mode 100644
index 0000000..579c2f6
--- /dev/null
+++ b/test/results/add/g2-1.15
@@ -0,0 +1,140 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically generated by grub2-mkconfig using templates
+# from /etc/grub.d and settings from /etc/default/grub
+#
+
+### BEGIN /etc/grub.d/00_header ###
+set pager=1
+
+if [ -s $prefix/grubenv ]; then
+  load_env
+fi
+if [ "${next_entry}" ] ; then
+   set default="${next_entry}"
+   set next_entry=
+   save_env next_entry
+   set boot_once=true
+else
+   set default="${saved_entry}"
+fi
+
+if [ x"${feature_menuentry_id}" = xy ]; then
+  menuentry_id_option="--id"
+else
+  menuentry_id_option=""
+fi
+
+export menuentry_id_option
+
+if [ "${prev_saved_entry}" ]; then
+  set saved_entry="${prev_saved_entry}"
+  save_env saved_entry
+  set prev_saved_entry=
+  save_env prev_saved_entry
+  set boot_once=true
+fi
+
+function savedefault {
+  if [ -z "${boot_once}" ]; then
+    saved_entry="${chosen}"
+    save_env saved_entry
+  fi
+}
+
+function load_video {
+  if [ x$feature_all_video_module = xy ]; then
+    insmod all_video
+  else
+    insmod efi_gop
+    insmod efi_uga
+    insmod ieee1275_fb
+    insmod vbe
+    insmod vga
+    insmod video_bochs
+    insmod video_cirrus
+  fi
+}
+
+terminal_output console
+if [ x$feature_timeout_style = xy ] ; then
+  set timeout_style=menu
+  set timeout=15
+# Fallback normal timeout code in case the timeout_style feature is
+# unavailable.
+else
+  set timeout=15
+fi
+### END /etc/grub.d/00_header ###
+
+### BEGIN /etc/grub.d/10_linux ###
+menuentry 'title' --class gnu-linux --class gnu --class os {
+	load_video
+	set gfxpayload=keep
+	insmod gzio
+	insmod part_msdos
+	insmod btrfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1bab15a4-93ce-4373-8d7d-b77f907fd0c6
+	else
+	  search --no-floppy --fs-uuid --set=root 1bab15a4-93ce-4373-8d7d-b77f907fd0c6
+	fi
+	linux16 /boot6/new-kernel.img root=UUID=1bab15a4-93ce-4373-8d7d-b77f907fd0c6 ro rootflags=subvol=root6 rhgb quiet
+}
+menuentry 'Fedora, with Linux 3.15.0-0.rc7.git2.1.fc21.x86_64' --class gnu-linux --class gnu --class os {
+	load_video
+	set gfxpayload=keep
+	insmod gzio
+	insmod part_msdos
+	insmod btrfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1bab15a4-93ce-4373-8d7d-b77f907fd0c6
+	else
+	  search --no-floppy --fs-uuid --set=root 1bab15a4-93ce-4373-8d7d-b77f907fd0c6
+	fi
+	linux16 /boot6/vmlinuz-3.15.0-0.rc7.git2.1.fc21.x86_64 root=UUID=1bab15a4-93ce-4373-8d7d-b77f907fd0c6 ro rootflags=subvol=root6 rhgb quiet
+	initrd16 /boot6/initramfs-3.15.0-0.rc7.git2.1.fc21.x86_64.img
+}
+menuentry 'Fedora, with Linux 0-rescue-81378818f7a24478b496ebef90e1dd69' --class gnu-linux --class gnu --class os {
+	load_video
+	insmod gzio
+	insmod part_msdos
+	insmod btrfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1bab15a4-93ce-4373-8d7d-b77f907fd0c6
+	else
+	  search --no-floppy --fs-uuid --set=root 1bab15a4-93ce-4373-8d7d-b77f907fd0c6
+	fi
+	linux16 /boot6/vmlinuz-0-rescue-81378818f7a24478b496ebef90e1dd69 root=UUID=1bab15a4-93ce-4373-8d7d-b77f907fd0c6 ro rootflags=subvol=root6 rhgb quiet
+	initrd16 /boot6/initramfs-0-rescue-81378818f7a24478b496ebef90e1dd69.img
+}
+
+### END /etc/grub.d/10_linux ###
+
+### BEGIN /etc/grub.d/20_linux_xen ###
+
+### END /etc/grub.d/20_linux_xen ###
+
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
+### END /etc/grub.d/20_ppc_terminfo ###
+
+### BEGIN /etc/grub.d/30_os-prober ###
+### END /etc/grub.d/30_os-prober ###
+
+### BEGIN /etc/grub.d/40_custom ###
+# This file provides an easy way to add custom menu entries.  Simply type the
+# menu entries you want to add after this comment.  Be careful not to change
+# the 'exec tail' line above.
+### END /etc/grub.d/40_custom ###
+
+### BEGIN /etc/grub.d/41_custom ###
+if [ -f  ${config_directory}/custom.cfg ]; then
+  source ${config_directory}/custom.cfg
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
+  source $prefix/custom.cfg;
+fi
+### END /etc/grub.d/41_custom ###
diff --git a/test/results/add/g2-1.16 b/test/results/add/g2-1.16
new file mode 100644
index 0000000..c0dded9
--- /dev/null
+++ b/test/results/add/g2-1.16
@@ -0,0 +1,141 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically generated by grub2-mkconfig using templates
+# from /etc/grub.d and settings from /etc/default/grub
+#
+
+### BEGIN /etc/grub.d/00_header ###
+set pager=1
+
+if [ -s $prefix/grubenv ]; then
+  load_env
+fi
+if [ "${next_entry}" ] ; then
+   set default="${next_entry}"
+   set next_entry=
+   save_env next_entry
+   set boot_once=true
+else
+   set default="${saved_entry}"
+fi
+
+if [ x"${feature_menuentry_id}" = xy ]; then
+  menuentry_id_option="--id"
+else
+  menuentry_id_option=""
+fi
+
+export menuentry_id_option
+
+if [ "${prev_saved_entry}" ]; then
+  set saved_entry="${prev_saved_entry}"
+  save_env saved_entry
+  set prev_saved_entry=
+  save_env prev_saved_entry
+  set boot_once=true
+fi
+
+function savedefault {
+  if [ -z "${boot_once}" ]; then
+    saved_entry="${chosen}"
+    save_env saved_entry
+  fi
+}
+
+function load_video {
+  if [ x$feature_all_video_module = xy ]; then
+    insmod all_video
+  else
+    insmod efi_gop
+    insmod efi_uga
+    insmod ieee1275_fb
+    insmod vbe
+    insmod vga
+    insmod video_bochs
+    insmod video_cirrus
+  fi
+}
+
+terminal_output console
+if [ x$feature_timeout_style = xy ] ; then
+  set timeout_style=menu
+  set timeout=15
+# Fallback normal timeout code in case the timeout_style feature is
+# unavailable.
+else
+  set timeout=15
+fi
+### END /etc/grub.d/00_header ###
+
+### BEGIN /etc/grub.d/10_linux ###
+menuentry 'title' --class gnu-linux --class gnu --class os {
+	load_video
+	set gfxpayload=keep
+	insmod gzio
+	insmod part_msdos
+	insmod btrfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1bab15a4-93ce-4373-8d7d-b77f907fd0c6
+	else
+	  search --no-floppy --fs-uuid --set=root 1bab15a4-93ce-4373-8d7d-b77f907fd0c6
+	fi
+	linux16 /boot6/new-kernel.img root=UUID=1bab15a4-93ce-4373-8d7d-b77f907fd0c6 ro rootflags=subvol=root6 rhgb quiet
+	initrd16 /boot6/new-initrd
+}
+menuentry 'Fedora, with Linux 3.15.0-0.rc7.git2.1.fc21.x86_64' --class gnu-linux --class gnu --class os {
+	load_video
+	set gfxpayload=keep
+	insmod gzio
+	insmod part_msdos
+	insmod btrfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1bab15a4-93ce-4373-8d7d-b77f907fd0c6
+	else
+	  search --no-floppy --fs-uuid --set=root 1bab15a4-93ce-4373-8d7d-b77f907fd0c6
+	fi
+	linux16 /boot6/vmlinuz-3.15.0-0.rc7.git2.1.fc21.x86_64 root=UUID=1bab15a4-93ce-4373-8d7d-b77f907fd0c6 ro rootflags=subvol=root6 rhgb quiet
+	initrd16 /boot6/initramfs-3.15.0-0.rc7.git2.1.fc21.x86_64.img
+}
+menuentry 'Fedora, with Linux 0-rescue-81378818f7a24478b496ebef90e1dd69' --class gnu-linux --class gnu --class os {
+	load_video
+	insmod gzio
+	insmod part_msdos
+	insmod btrfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1bab15a4-93ce-4373-8d7d-b77f907fd0c6
+	else
+	  search --no-floppy --fs-uuid --set=root 1bab15a4-93ce-4373-8d7d-b77f907fd0c6
+	fi
+	linux16 /boot6/vmlinuz-0-rescue-81378818f7a24478b496ebef90e1dd69 root=UUID=1bab15a4-93ce-4373-8d7d-b77f907fd0c6 ro rootflags=subvol=root6 rhgb quiet
+	initrd16 /boot6/initramfs-0-rescue-81378818f7a24478b496ebef90e1dd69.img
+}
+
+### END /etc/grub.d/10_linux ###
+
+### BEGIN /etc/grub.d/20_linux_xen ###
+
+### END /etc/grub.d/20_linux_xen ###
+
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
+### END /etc/grub.d/20_ppc_terminfo ###
+
+### BEGIN /etc/grub.d/30_os-prober ###
+### END /etc/grub.d/30_os-prober ###
+
+### BEGIN /etc/grub.d/40_custom ###
+# This file provides an easy way to add custom menu entries.  Simply type the
+# menu entries you want to add after this comment.  Be careful not to change
+# the 'exec tail' line above.
+### END /etc/grub.d/40_custom ###
+
+### BEGIN /etc/grub.d/41_custom ###
+if [ -f  ${config_directory}/custom.cfg ]; then
+  source ${config_directory}/custom.cfg
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
+  source $prefix/custom.cfg;
+fi
+### END /etc/grub.d/41_custom ###
diff --git a/test/results/add/g2-1.17 b/test/results/add/g2-1.17
new file mode 100644
index 0000000..5cb240f
--- /dev/null
+++ b/test/results/add/g2-1.17
@@ -0,0 +1,143 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically generated by grub2-mkconfig using templates
+# from /etc/grub.d and settings from /etc/default/grub
+#
+
+### BEGIN /etc/grub.d/00_header ###
+set pager=1
+
+if [ -s $prefix/grubenv ]; then
+  load_env
+fi
+if [ "${next_entry}" ] ; then
+   set default="${next_entry}"
+   set next_entry=
+   save_env next_entry
+   set boot_once=true
+else
+   set default="${saved_entry}"
+fi
+
+if [ x"${feature_menuentry_id}" = xy ]; then
+  menuentry_id_option="--id"
+else
+  menuentry_id_option=""
+fi
+
+export menuentry_id_option
+
+if [ "${prev_saved_entry}" ]; then
+  set saved_entry="${prev_saved_entry}"
+  save_env saved_entry
+  set prev_saved_entry=
+  save_env prev_saved_entry
+  set boot_once=true
+fi
+
+function savedefault {
+  if [ -z "${boot_once}" ]; then
+    saved_entry="${chosen}"
+    save_env saved_entry
+  fi
+}
+
+function load_video {
+  if [ x$feature_all_video_module = xy ]; then
+    insmod all_video
+  else
+    insmod efi_gop
+    insmod efi_uga
+    insmod ieee1275_fb
+    insmod vbe
+    insmod vga
+    insmod video_bochs
+    insmod video_cirrus
+  fi
+}
+
+terminal_output console
+if [ x$feature_timeout_style = xy ] ; then
+  set timeout_style=menu
+  set timeout=15
+# Fallback normal timeout code in case the timeout_style feature is
+# unavailable.
+else
+  set timeout=15
+fi
+### END /etc/grub.d/00_header ###
+
+### BEGIN /etc/grub.d/10_linux ###
+menuentry 'title' --class gnu-linux --class gnu --class os {
+	load_video
+	set gfxpayload=keep
+	insmod gzio
+	insmod part_msdos
+	insmod part_msdos
+	insmod btrfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  --hint='hd1,msdos3'  54c6abc2-b1e7-4987-aa73-c79927be69eb
+	else
+	  search --no-floppy --fs-uuid --set=root 54c6abc2-b1e7-4987-aa73-c79927be69eb
+	fi
+	linux16 /root4/boot/new-kernel.img root=UUID=54c6abc2-b1e7-4987-aa73-c79927be69eb ro rootflags=subvol=root4 rhgb quiet
+}
+menuentry 'Fedora, with Linux 3.15.0-0.rc7.git2.1.fc21.x86_64' --class gnu-linux --class gnu --class os {
+	load_video
+	set gfxpayload=keep
+	insmod gzio
+	insmod part_msdos
+	insmod part_msdos
+	insmod btrfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  --hint='hd1,msdos3'  54c6abc2-b1e7-4987-aa73-c79927be69eb
+	else
+	  search --no-floppy --fs-uuid --set=root 54c6abc2-b1e7-4987-aa73-c79927be69eb
+	fi
+	linux16 /root4/boot/vmlinuz-3.15.0-0.rc7.git2.1.fc21.x86_64 root=UUID=54c6abc2-b1e7-4987-aa73-c79927be69eb ro rootflags=subvol=root4 rhgb quiet
+	initrd16 /root4/boot/initramfs-3.15.0-0.rc7.git2.1.fc21.x86_64.img
+}
+menuentry 'Fedora, with Linux 0-rescue-20e7024f4e9c4b70b1042b91acd434c6' --class gnu-linux --class gnu --class os {
+	load_video
+	insmod gzio
+	insmod part_msdos
+	insmod part_msdos
+	insmod btrfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  --hint='hd1,msdos3'  54c6abc2-b1e7-4987-aa73-c79927be69eb
+	else
+	  search --no-floppy --fs-uuid --set=root 54c6abc2-b1e7-4987-aa73-c79927be69eb
+	fi
+	linux16 /root4/boot/vmlinuz-0-rescue-20e7024f4e9c4b70b1042b91acd434c6 root=UUID=54c6abc2-b1e7-4987-aa73-c79927be69eb ro rootflags=subvol=root4 rhgb quiet
+	initrd16 /root4/boot/initramfs-0-rescue-20e7024f4e9c4b70b1042b91acd434c6.img
+}
+
+### END /etc/grub.d/10_linux ###
+
+### BEGIN /etc/grub.d/20_linux_xen ###
+
+### END /etc/grub.d/20_linux_xen ###
+
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
+### END /etc/grub.d/20_ppc_terminfo ###
+
+### BEGIN /etc/grub.d/30_os-prober ###
+###
+
+### BEGIN /etc/grub.d/40_custom ###
+# This file provides an easy way to add custom menu entries.  Simply type the
+# menu entries you want to add after this comment.  Be careful not to change
+# the 'exec tail' line above.
+### END /etc/grub.d/40_custom ###
+
+### BEGIN /etc/grub.d/41_custom ###
+if [ -f  ${config_directory}/custom.cfg ]; then
+  source ${config_directory}/custom.cfg
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
+  source $prefix/custom.cfg;
+fi
+### END /etc/grub.d/41_custom ###
diff --git a/test/results/add/g2-1.18 b/test/results/add/g2-1.18
new file mode 100644
index 0000000..c3e87cf
--- /dev/null
+++ b/test/results/add/g2-1.18
@@ -0,0 +1,144 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically generated by grub2-mkconfig using templates
+# from /etc/grub.d and settings from /etc/default/grub
+#
+
+### BEGIN /etc/grub.d/00_header ###
+set pager=1
+
+if [ -s $prefix/grubenv ]; then
+  load_env
+fi
+if [ "${next_entry}" ] ; then
+   set default="${next_entry}"
+   set next_entry=
+   save_env next_entry
+   set boot_once=true
+else
+   set default="${saved_entry}"
+fi
+
+if [ x"${feature_menuentry_id}" = xy ]; then
+  menuentry_id_option="--id"
+else
+  menuentry_id_option=""
+fi
+
+export menuentry_id_option
+
+if [ "${prev_saved_entry}" ]; then
+  set saved_entry="${prev_saved_entry}"
+  save_env saved_entry
+  set prev_saved_entry=
+  save_env prev_saved_entry
+  set boot_once=true
+fi
+
+function savedefault {
+  if [ -z "${boot_once}" ]; then
+    saved_entry="${chosen}"
+    save_env saved_entry
+  fi
+}
+
+function load_video {
+  if [ x$feature_all_video_module = xy ]; then
+    insmod all_video
+  else
+    insmod efi_gop
+    insmod efi_uga
+    insmod ieee1275_fb
+    insmod vbe
+    insmod vga
+    insmod video_bochs
+    insmod video_cirrus
+  fi
+}
+
+terminal_output console
+if [ x$feature_timeout_style = xy ] ; then
+  set timeout_style=menu
+  set timeout=15
+# Fallback normal timeout code in case the timeout_style feature is
+# unavailable.
+else
+  set timeout=15
+fi
+### END /etc/grub.d/00_header ###
+
+### BEGIN /etc/grub.d/10_linux ###
+menuentry 'title' --class gnu-linux --class gnu --class os {
+	load_video
+	set gfxpayload=keep
+	insmod gzio
+	insmod part_msdos
+	insmod part_msdos
+	insmod btrfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  --hint='hd1,msdos3'  54c6abc2-b1e7-4987-aa73-c79927be69eb
+	else
+	  search --no-floppy --fs-uuid --set=root 54c6abc2-b1e7-4987-aa73-c79927be69eb
+	fi
+	linux16 /root4/boot/new-kernel.img root=UUID=54c6abc2-b1e7-4987-aa73-c79927be69eb ro rootflags=subvol=root4 rhgb quiet
+	initrd16 /root4/boot/new-initrd
+}
+menuentry 'Fedora, with Linux 3.15.0-0.rc7.git2.1.fc21.x86_64' --class gnu-linux --class gnu --class os {
+	load_video
+	set gfxpayload=keep
+	insmod gzio
+	insmod part_msdos
+	insmod part_msdos
+	insmod btrfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  --hint='hd1,msdos3'  54c6abc2-b1e7-4987-aa73-c79927be69eb
+	else
+	  search --no-floppy --fs-uuid --set=root 54c6abc2-b1e7-4987-aa73-c79927be69eb
+	fi
+	linux16 /root4/boot/vmlinuz-3.15.0-0.rc7.git2.1.fc21.x86_64 root=UUID=54c6abc2-b1e7-4987-aa73-c79927be69eb ro rootflags=subvol=root4 rhgb quiet
+	initrd16 /root4/boot/initramfs-3.15.0-0.rc7.git2.1.fc21.x86_64.img
+}
+menuentry 'Fedora, with Linux 0-rescue-20e7024f4e9c4b70b1042b91acd434c6' --class gnu-linux --class gnu --class os {
+	load_video
+	insmod gzio
+	insmod part_msdos
+	insmod part_msdos
+	insmod btrfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  --hint='hd1,msdos3'  54c6abc2-b1e7-4987-aa73-c79927be69eb
+	else
+	  search --no-floppy --fs-uuid --set=root 54c6abc2-b1e7-4987-aa73-c79927be69eb
+	fi
+	linux16 /root4/boot/vmlinuz-0-rescue-20e7024f4e9c4b70b1042b91acd434c6 root=UUID=54c6abc2-b1e7-4987-aa73-c79927be69eb ro rootflags=subvol=root4 rhgb quiet
+	initrd16 /root4/boot/initramfs-0-rescue-20e7024f4e9c4b70b1042b91acd434c6.img
+}
+
+### END /etc/grub.d/10_linux ###
+
+### BEGIN /etc/grub.d/20_linux_xen ###
+
+### END /etc/grub.d/20_linux_xen ###
+
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
+### END /etc/grub.d/20_ppc_terminfo ###
+
+### BEGIN /etc/grub.d/30_os-prober ###
+###
+
+### BEGIN /etc/grub.d/40_custom ###
+# This file provides an easy way to add custom menu entries.  Simply type the
+# menu entries you want to add after this comment.  Be careful not to change
+# the 'exec tail' line above.
+### END /etc/grub.d/40_custom ###
+
+### BEGIN /etc/grub.d/41_custom ###
+if [ -f  ${config_directory}/custom.cfg ]; then
+  source ${config_directory}/custom.cfg
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
+  source $prefix/custom.cfg;
+fi
+### END /etc/grub.d/41_custom ###
diff --git a/test/results/add/g2-1.19 b/test/results/add/g2-1.19
new file mode 100644
index 0000000..c0dded9
--- /dev/null
+++ b/test/results/add/g2-1.19
@@ -0,0 +1,141 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically generated by grub2-mkconfig using templates
+# from /etc/grub.d and settings from /etc/default/grub
+#
+
+### BEGIN /etc/grub.d/00_header ###
+set pager=1
+
+if [ -s $prefix/grubenv ]; then
+  load_env
+fi
+if [ "${next_entry}" ] ; then
+   set default="${next_entry}"
+   set next_entry=
+   save_env next_entry
+   set boot_once=true
+else
+   set default="${saved_entry}"
+fi
+
+if [ x"${feature_menuentry_id}" = xy ]; then
+  menuentry_id_option="--id"
+else
+  menuentry_id_option=""
+fi
+
+export menuentry_id_option
+
+if [ "${prev_saved_entry}" ]; then
+  set saved_entry="${prev_saved_entry}"
+  save_env saved_entry
+  set prev_saved_entry=
+  save_env prev_saved_entry
+  set boot_once=true
+fi
+
+function savedefault {
+  if [ -z "${boot_once}" ]; then
+    saved_entry="${chosen}"
+    save_env saved_entry
+  fi
+}
+
+function load_video {
+  if [ x$feature_all_video_module = xy ]; then
+    insmod all_video
+  else
+    insmod efi_gop
+    insmod efi_uga
+    insmod ieee1275_fb
+    insmod vbe
+    insmod vga
+    insmod video_bochs
+    insmod video_cirrus
+  fi
+}
+
+terminal_output console
+if [ x$feature_timeout_style = xy ] ; then
+  set timeout_style=menu
+  set timeout=15
+# Fallback normal timeout code in case the timeout_style feature is
+# unavailable.
+else
+  set timeout=15
+fi
+### END /etc/grub.d/00_header ###
+
+### BEGIN /etc/grub.d/10_linux ###
+menuentry 'title' --class gnu-linux --class gnu --class os {
+	load_video
+	set gfxpayload=keep
+	insmod gzio
+	insmod part_msdos
+	insmod btrfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1bab15a4-93ce-4373-8d7d-b77f907fd0c6
+	else
+	  search --no-floppy --fs-uuid --set=root 1bab15a4-93ce-4373-8d7d-b77f907fd0c6
+	fi
+	linux16 /boot6/new-kernel.img root=UUID=1bab15a4-93ce-4373-8d7d-b77f907fd0c6 ro rootflags=subvol=root6 rhgb quiet
+	initrd16 /boot6/new-initrd
+}
+menuentry 'Fedora, with Linux 3.15.0-0.rc7.git2.1.fc21.x86_64' --class gnu-linux --class gnu --class os {
+	load_video
+	set gfxpayload=keep
+	insmod gzio
+	insmod part_msdos
+	insmod btrfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1bab15a4-93ce-4373-8d7d-b77f907fd0c6
+	else
+	  search --no-floppy --fs-uuid --set=root 1bab15a4-93ce-4373-8d7d-b77f907fd0c6
+	fi
+	linux16 /boot6/vmlinuz-3.15.0-0.rc7.git2.1.fc21.x86_64 root=UUID=1bab15a4-93ce-4373-8d7d-b77f907fd0c6 ro rootflags=subvol=root6 rhgb quiet
+	initrd16 /boot6/initramfs-3.15.0-0.rc7.git2.1.fc21.x86_64.img
+}
+menuentry 'Fedora, with Linux 0-rescue-81378818f7a24478b496ebef90e1dd69' --class gnu-linux --class gnu --class os {
+	load_video
+	insmod gzio
+	insmod part_msdos
+	insmod btrfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1bab15a4-93ce-4373-8d7d-b77f907fd0c6
+	else
+	  search --no-floppy --fs-uuid --set=root 1bab15a4-93ce-4373-8d7d-b77f907fd0c6
+	fi
+	linux16 /boot6/vmlinuz-0-rescue-81378818f7a24478b496ebef90e1dd69 root=UUID=1bab15a4-93ce-4373-8d7d-b77f907fd0c6 ro rootflags=subvol=root6 rhgb quiet
+	initrd16 /boot6/initramfs-0-rescue-81378818f7a24478b496ebef90e1dd69.img
+}
+
+### END /etc/grub.d/10_linux ###
+
+### BEGIN /etc/grub.d/20_linux_xen ###
+
+### END /etc/grub.d/20_linux_xen ###
+
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
+### END /etc/grub.d/20_ppc_terminfo ###
+
+### BEGIN /etc/grub.d/30_os-prober ###
+### END /etc/grub.d/30_os-prober ###
+
+### BEGIN /etc/grub.d/40_custom ###
+# This file provides an easy way to add custom menu entries.  Simply type the
+# menu entries you want to add after this comment.  Be careful not to change
+# the 'exec tail' line above.
+### END /etc/grub.d/40_custom ###
+
+### BEGIN /etc/grub.d/41_custom ###
+if [ -f  ${config_directory}/custom.cfg ]; then
+  source ${config_directory}/custom.cfg
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
+  source $prefix/custom.cfg;
+fi
+### END /etc/grub.d/41_custom ###
diff --git a/test/results/add/g2-1.20 b/test/results/add/g2-1.20
new file mode 100644
index 0000000..c3e87cf
--- /dev/null
+++ b/test/results/add/g2-1.20
@@ -0,0 +1,144 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically generated by grub2-mkconfig using templates
+# from /etc/grub.d and settings from /etc/default/grub
+#
+
+### BEGIN /etc/grub.d/00_header ###
+set pager=1
+
+if [ -s $prefix/grubenv ]; then
+  load_env
+fi
+if [ "${next_entry}" ] ; then
+   set default="${next_entry}"
+   set next_entry=
+   save_env next_entry
+   set boot_once=true
+else
+   set default="${saved_entry}"
+fi
+
+if [ x"${feature_menuentry_id}" = xy ]; then
+  menuentry_id_option="--id"
+else
+  menuentry_id_option=""
+fi
+
+export menuentry_id_option
+
+if [ "${prev_saved_entry}" ]; then
+  set saved_entry="${prev_saved_entry}"
+  save_env saved_entry
+  set prev_saved_entry=
+  save_env prev_saved_entry
+  set boot_once=true
+fi
+
+function savedefault {
+  if [ -z "${boot_once}" ]; then
+    saved_entry="${chosen}"
+    save_env saved_entry
+  fi
+}
+
+function load_video {
+  if [ x$feature_all_video_module = xy ]; then
+    insmod all_video
+  else
+    insmod efi_gop
+    insmod efi_uga
+    insmod ieee1275_fb
+    insmod vbe
+    insmod vga
+    insmod video_bochs
+    insmod video_cirrus
+  fi
+}
+
+terminal_output console
+if [ x$feature_timeout_style = xy ] ; then
+  set timeout_style=menu
+  set timeout=15
+# Fallback normal timeout code in case the timeout_style feature is
+# unavailable.
+else
+  set timeout=15
+fi
+### END /etc/grub.d/00_header ###
+
+### BEGIN /etc/grub.d/10_linux ###
+menuentry 'title' --class gnu-linux --class gnu --class os {
+	load_video
+	set gfxpayload=keep
+	insmod gzio
+	insmod part_msdos
+	insmod part_msdos
+	insmod btrfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  --hint='hd1,msdos3'  54c6abc2-b1e7-4987-aa73-c79927be69eb
+	else
+	  search --no-floppy --fs-uuid --set=root 54c6abc2-b1e7-4987-aa73-c79927be69eb
+	fi
+	linux16 /root4/boot/new-kernel.img root=UUID=54c6abc2-b1e7-4987-aa73-c79927be69eb ro rootflags=subvol=root4 rhgb quiet
+	initrd16 /root4/boot/new-initrd
+}
+menuentry 'Fedora, with Linux 3.15.0-0.rc7.git2.1.fc21.x86_64' --class gnu-linux --class gnu --class os {
+	load_video
+	set gfxpayload=keep
+	insmod gzio
+	insmod part_msdos
+	insmod part_msdos
+	insmod btrfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  --hint='hd1,msdos3'  54c6abc2-b1e7-4987-aa73-c79927be69eb
+	else
+	  search --no-floppy --fs-uuid --set=root 54c6abc2-b1e7-4987-aa73-c79927be69eb
+	fi
+	linux16 /root4/boot/vmlinuz-3.15.0-0.rc7.git2.1.fc21.x86_64 root=UUID=54c6abc2-b1e7-4987-aa73-c79927be69eb ro rootflags=subvol=root4 rhgb quiet
+	initrd16 /root4/boot/initramfs-3.15.0-0.rc7.git2.1.fc21.x86_64.img
+}
+menuentry 'Fedora, with Linux 0-rescue-20e7024f4e9c4b70b1042b91acd434c6' --class gnu-linux --class gnu --class os {
+	load_video
+	insmod gzio
+	insmod part_msdos
+	insmod part_msdos
+	insmod btrfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  --hint='hd1,msdos3'  54c6abc2-b1e7-4987-aa73-c79927be69eb
+	else
+	  search --no-floppy --fs-uuid --set=root 54c6abc2-b1e7-4987-aa73-c79927be69eb
+	fi
+	linux16 /root4/boot/vmlinuz-0-rescue-20e7024f4e9c4b70b1042b91acd434c6 root=UUID=54c6abc2-b1e7-4987-aa73-c79927be69eb ro rootflags=subvol=root4 rhgb quiet
+	initrd16 /root4/boot/initramfs-0-rescue-20e7024f4e9c4b70b1042b91acd434c6.img
+}
+
+### END /etc/grub.d/10_linux ###
+
+### BEGIN /etc/grub.d/20_linux_xen ###
+
+### END /etc/grub.d/20_linux_xen ###
+
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
+### END /etc/grub.d/20_ppc_terminfo ###
+
+### BEGIN /etc/grub.d/30_os-prober ###
+###
+
+### BEGIN /etc/grub.d/40_custom ###
+# This file provides an easy way to add custom menu entries.  Simply type the
+# menu entries you want to add after this comment.  Be careful not to change
+# the 'exec tail' line above.
+### END /etc/grub.d/40_custom ###
+
+### BEGIN /etc/grub.d/41_custom ###
+if [ -f  ${config_directory}/custom.cfg ]; then
+  source ${config_directory}/custom.cfg
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
+  source $prefix/custom.cfg;
+fi
+### END /etc/grub.d/41_custom ###
-- 
1.9.3



More information about the anaconda-patches mailing list