[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH 10/11] Add tests for --set-default-index feature



Signed-off-by: Cleber Rosa <crosa redhat com>
---
 test/grub.13                        |   21 +++++++++
 test/results/setdefaultindex/g.13.0 |   21 +++++++++
 test/results/setdefaultindex/g.13.1 |   21 +++++++++
 test/results/setdefaultindex/g.13.9 |   20 ++++++++
 test/results/setdefaultindex/g2.1.0 |   84 +++++++++++++++++++++++++++++++++++
 test/results/setdefaultindex/g2.1.1 |   84 +++++++++++++++++++++++++++++++++++
 test/results/setdefaultindex/g2.1.9 |   83 ++++++++++++++++++++++++++++++++++
 7 files changed, 334 insertions(+), 0 deletions(-)
 create mode 100644 test/grub.13
 create mode 100644 test/results/setdefaultindex/g.13.0
 create mode 100644 test/results/setdefaultindex/g.13.1
 create mode 100644 test/results/setdefaultindex/g.13.9
 create mode 100644 test/results/setdefaultindex/g2.1.0
 create mode 100644 test/results/setdefaultindex/g2.1.1
 create mode 100644 test/results/setdefaultindex/g2.1.9

diff --git a/test/grub.13 b/test/grub.13
new file mode 100644
index 0000000..1ae82a8
--- /dev/null
+++ b/test/grub.13
@@ -0,0 +1,21 @@
+# grub.conf generated by anaconda
+#
+# Note that you do not have to rerun grub after making changes to this file
+# NOTICE:  You have a /boot partition.  This means that
+#          all kernel and initrd paths are relative to /boot/, eg.
+#          root (hd0,0)
+#          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
+#          initrd /initrd-version.img
+#boot=/dev/vda
+default=0
+timeout=5
+splashimage=(hd0,0)/grub/splash.xpm.gz
+hiddenmenu
+title Red Hat Enterprise Linux Server (2.6.18-308.1.1.el5)
+	root (hd0,0)
+	kernel /vmlinuz-2.6.18-308.1.1.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
+	initrd /initrd-2.6.18-308.1.1.el5.img
+title Red Hat Enterprise Linux Server (2.6.18-238.el5)
+	root (hd0,0)
+	kernel /vmlinuz-2.6.18-238.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
+	initrd /initrd-2.6.18-238.el5.img
diff --git a/test/results/setdefaultindex/g.13.0 b/test/results/setdefaultindex/g.13.0
new file mode 100644
index 0000000..1ae82a8
--- /dev/null
+++ b/test/results/setdefaultindex/g.13.0
@@ -0,0 +1,21 @@
+# grub.conf generated by anaconda
+#
+# Note that you do not have to rerun grub after making changes to this file
+# NOTICE:  You have a /boot partition.  This means that
+#          all kernel and initrd paths are relative to /boot/, eg.
+#          root (hd0,0)
+#          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
+#          initrd /initrd-version.img
+#boot=/dev/vda
+default=0
+timeout=5
+splashimage=(hd0,0)/grub/splash.xpm.gz
+hiddenmenu
+title Red Hat Enterprise Linux Server (2.6.18-308.1.1.el5)
+	root (hd0,0)
+	kernel /vmlinuz-2.6.18-308.1.1.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
+	initrd /initrd-2.6.18-308.1.1.el5.img
+title Red Hat Enterprise Linux Server (2.6.18-238.el5)
+	root (hd0,0)
+	kernel /vmlinuz-2.6.18-238.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
+	initrd /initrd-2.6.18-238.el5.img
diff --git a/test/results/setdefaultindex/g.13.1 b/test/results/setdefaultindex/g.13.1
new file mode 100644
index 0000000..c0db036
--- /dev/null
+++ b/test/results/setdefaultindex/g.13.1
@@ -0,0 +1,21 @@
+# grub.conf generated by anaconda
+#
+# Note that you do not have to rerun grub after making changes to this file
+# NOTICE:  You have a /boot partition.  This means that
+#          all kernel and initrd paths are relative to /boot/, eg.
+#          root (hd0,0)
+#          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
+#          initrd /initrd-version.img
+#boot=/dev/vda
+default=1
+timeout=5
+splashimage=(hd0,0)/grub/splash.xpm.gz
+hiddenmenu
+title Red Hat Enterprise Linux Server (2.6.18-308.1.1.el5)
+	root (hd0,0)
+	kernel /vmlinuz-2.6.18-308.1.1.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
+	initrd /initrd-2.6.18-308.1.1.el5.img
+title Red Hat Enterprise Linux Server (2.6.18-238.el5)
+	root (hd0,0)
+	kernel /vmlinuz-2.6.18-238.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
+	initrd /initrd-2.6.18-238.el5.img
diff --git a/test/results/setdefaultindex/g.13.9 b/test/results/setdefaultindex/g.13.9
new file mode 100644
index 0000000..74299b6
--- /dev/null
+++ b/test/results/setdefaultindex/g.13.9
@@ -0,0 +1,20 @@
+# grub.conf generated by anaconda
+#
+# Note that you do not have to rerun grub after making changes to this file
+# NOTICE:  You have a /boot partition.  This means that
+#          all kernel and initrd paths are relative to /boot/, eg.
+#          root (hd0,0)
+#          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
+#          initrd /initrd-version.img
+#boot=/dev/vda
+timeout=5
+splashimage=(hd0,0)/grub/splash.xpm.gz
+hiddenmenu
+title Red Hat Enterprise Linux Server (2.6.18-308.1.1.el5)
+	root (hd0,0)
+	kernel /vmlinuz-2.6.18-308.1.1.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
+	initrd /initrd-2.6.18-308.1.1.el5.img
+title Red Hat Enterprise Linux Server (2.6.18-238.el5)
+	root (hd0,0)
+	kernel /vmlinuz-2.6.18-238.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
+	initrd /initrd-2.6.18-238.el5.img
diff --git a/test/results/setdefaultindex/g2.1.0 b/test/results/setdefaultindex/g2.1.0
new file mode 100644
index 0000000..fcf053a
--- /dev/null
+++ b/test/results/setdefaultindex/g2.1.0
@@ -0,0 +1,84 @@
+#
+# 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 ###
+if [ -s $prefix/grubenv ]; then
+  load_env
+fi
+set default="0"
+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 {
+  insmod vbe
+  insmod vga
+  insmod video_bochs
+  insmod video_cirrus
+}
+
+set timeout=5
+### END /etc/grub.d/00_header ###
+
+### BEGIN /etc/grub.d/10_linux ###
+menuentry 'Linux, with Fedora 2.6.38.8-32.fc15.x86_64' --class gnu-linux --class gnu --class os {
+	load_video
+	set gfxpayload=keep
+	insmod part_msdos
+	insmod ext2
+	set root='(hd0,msdos1)'
+	search --no-floppy --fs-uuid --set=root df0170c9-7d05-415c-bbd1-d4d503ba0eed
+	echo	'Loading Fedora 2.6.38.8-32.fc15.x86_64 ...'
+	linux	/vmlinuz-2.6.38.8-32.fc15.x86_64 root=/dev/mapper/vg_pjones5-lv_root ro quiet rhgb
+	echo	'Loading initial ramdisk ...'
+	initrd	/initramfs-2.6.38.8-32.fc15.x86_64.img
+}
+menuentry 'Linux, with Linux 2.6.38.2-9.fc15.x86_64' --class gnu-linux --class gnu --class os {
+	load_video
+	set gfxpayload=keep
+	insmod part_msdos
+	insmod ext2
+	set root='(hd0,msdos1)'
+	search --no-floppy --fs-uuid --set=root df0170c9-7d05-415c-bbd1-d4d503ba0eed
+	echo	'Loading Linux 2.6.38.2-9.fc15.x86_64 ...'
+	linux	/vmlinuz-2.6.38.2-9.fc15.x86_64 root=/dev/mapper/vg_pjones5-lv_root ro quiet rhgb
+	echo	'Loading initial ramdisk ...'
+	initrd	/initramfs-2.6.38.2-9.fc15.x86_64.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/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  $prefix/custom.cfg ]; then
+  source $prefix/custom.cfg;
+fi
+### END /etc/grub.d/41_custom ###
+
+### BEGIN /etc/grub.d/90_persistent ###
+### END /etc/grub.d/90_persistent ###
diff --git a/test/results/setdefaultindex/g2.1.1 b/test/results/setdefaultindex/g2.1.1
new file mode 100644
index 0000000..aaa8e77
--- /dev/null
+++ b/test/results/setdefaultindex/g2.1.1
@@ -0,0 +1,84 @@
+#
+# 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 ###
+if [ -s $prefix/grubenv ]; then
+  load_env
+fi
+set default="1"
+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 {
+  insmod vbe
+  insmod vga
+  insmod video_bochs
+  insmod video_cirrus
+}
+
+set timeout=5
+### END /etc/grub.d/00_header ###
+
+### BEGIN /etc/grub.d/10_linux ###
+menuentry 'Linux, with Fedora 2.6.38.8-32.fc15.x86_64' --class gnu-linux --class gnu --class os {
+	load_video
+	set gfxpayload=keep
+	insmod part_msdos
+	insmod ext2
+	set root='(hd0,msdos1)'
+	search --no-floppy --fs-uuid --set=root df0170c9-7d05-415c-bbd1-d4d503ba0eed
+	echo	'Loading Fedora 2.6.38.8-32.fc15.x86_64 ...'
+	linux	/vmlinuz-2.6.38.8-32.fc15.x86_64 root=/dev/mapper/vg_pjones5-lv_root ro quiet rhgb
+	echo	'Loading initial ramdisk ...'
+	initrd	/initramfs-2.6.38.8-32.fc15.x86_64.img
+}
+menuentry 'Linux, with Linux 2.6.38.2-9.fc15.x86_64' --class gnu-linux --class gnu --class os {
+	load_video
+	set gfxpayload=keep
+	insmod part_msdos
+	insmod ext2
+	set root='(hd0,msdos1)'
+	search --no-floppy --fs-uuid --set=root df0170c9-7d05-415c-bbd1-d4d503ba0eed
+	echo	'Loading Linux 2.6.38.2-9.fc15.x86_64 ...'
+	linux	/vmlinuz-2.6.38.2-9.fc15.x86_64 root=/dev/mapper/vg_pjones5-lv_root ro quiet rhgb
+	echo	'Loading initial ramdisk ...'
+	initrd	/initramfs-2.6.38.2-9.fc15.x86_64.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/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  $prefix/custom.cfg ]; then
+  source $prefix/custom.cfg;
+fi
+### END /etc/grub.d/41_custom ###
+
+### BEGIN /etc/grub.d/90_persistent ###
+### END /etc/grub.d/90_persistent ###
diff --git a/test/results/setdefaultindex/g2.1.9 b/test/results/setdefaultindex/g2.1.9
new file mode 100644
index 0000000..5b68102
--- /dev/null
+++ b/test/results/setdefaultindex/g2.1.9
@@ -0,0 +1,83 @@
+#
+# 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 ###
+if [ -s $prefix/grubenv ]; then
+  load_env
+fi
+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 {
+  insmod vbe
+  insmod vga
+  insmod video_bochs
+  insmod video_cirrus
+}
+
+set timeout=5
+### END /etc/grub.d/00_header ###
+
+### BEGIN /etc/grub.d/10_linux ###
+menuentry 'Linux, with Fedora 2.6.38.8-32.fc15.x86_64' --class gnu-linux --class gnu --class os {
+	load_video
+	set gfxpayload=keep
+	insmod part_msdos
+	insmod ext2
+	set root='(hd0,msdos1)'
+	search --no-floppy --fs-uuid --set=root df0170c9-7d05-415c-bbd1-d4d503ba0eed
+	echo	'Loading Fedora 2.6.38.8-32.fc15.x86_64 ...'
+	linux	/vmlinuz-2.6.38.8-32.fc15.x86_64 root=/dev/mapper/vg_pjones5-lv_root ro quiet rhgb
+	echo	'Loading initial ramdisk ...'
+	initrd	/initramfs-2.6.38.8-32.fc15.x86_64.img
+}
+menuentry 'Linux, with Linux 2.6.38.2-9.fc15.x86_64' --class gnu-linux --class gnu --class os {
+	load_video
+	set gfxpayload=keep
+	insmod part_msdos
+	insmod ext2
+	set root='(hd0,msdos1)'
+	search --no-floppy --fs-uuid --set=root df0170c9-7d05-415c-bbd1-d4d503ba0eed
+	echo	'Loading Linux 2.6.38.2-9.fc15.x86_64 ...'
+	linux	/vmlinuz-2.6.38.2-9.fc15.x86_64 root=/dev/mapper/vg_pjones5-lv_root ro quiet rhgb
+	echo	'Loading initial ramdisk ...'
+	initrd	/initramfs-2.6.38.2-9.fc15.x86_64.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/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  $prefix/custom.cfg ]; then
+  source $prefix/custom.cfg;
+fi
+### END /etc/grub.d/41_custom ###
+
+### BEGIN /etc/grub.d/90_persistent ###
+### END /etc/grub.d/90_persistent ###
-- 
1.7.6.5


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]