--- trunk/mkinitrd-magellan/grubby/test.sh 2007/09/01 22:45:15 532
+++ trunk/grubby/test.sh 2012/07/02 13:18:33 1861
@@ -1,132 +1,206 @@
#!/bin/bash
+#
+# test.sh -- grubby regression tests
+#
+# Copyright 2007-2008 Red Hat, Inc. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+
+if [ -n "$TOPDIR" ]; then
+ LD_LIBRARY_PATH="$TOPDIR/nash:$TOPDIR/bdevid:/usr/lib:/lib"
+ export LD_LIBRARY_PATH
+fi
-ARCH=$(uname -m)
-
-elilotest=""
-lilotest=""
-grubtest=""
-zipltest=""
-yaboottest=""
-
-case "$ARCH" in
- i?86)
- lilotest="yes"
- grubtest="yes"
- ;;
- x86_64)
- lilotest="yes"
- grubtest="yes"
- ;;
- ppc*)
- yaboottest="yes"
- ;;
- s390*)
- zipltest="yes"
- ;;
- *)
- echo "Not running any tests for $ARCH"
- exit 0
-esac
-
-export MALLOC_CHECK_=2
-
-RESULT=0
-
-oneTest () {
- mode=$1
- cfg=test/$2
- correct=test/results/$3
- shift; shift; shift
- ./grubby $mode --bad-image-okay -c $cfg -o - "$@" | cmp $correct > /dev/null
-
- if [ $? != 0 ]; then
+#----------------------------------------------------------------------
+# Global vars
+#----------------------------------------------------------------------
+
+cmd=${0##*/}
+opt_bootloader=*
+opt_verbose=false
+read -d '' usage < /dev/null; then
+ (( pass++ ))
+ if $opt_verbose; then
+ echo -------------------------------------------------------------
+ echo -n "PASS: "
+ printf "%q " "${runme[@]}"; echo
+ "${runme[@]}" | diff -U30 "$cfg" -
+ echo
+ fi
+ else
+ (( fail++ ))
echo -------------------------------------------------------------
- echo FAILURE: $cfg $correct "$@"
- echo -n ./grubby $mode --bad-image-okay -c $cfg -o -
- for arg in "$@"; do
- echo -n " \"$arg\""
- done
- echo ""
- ./grubby $mode --bad-image-okay -c $cfg -o - "$@" | diff -u $correct -;
- RESULT=1
+ echo -n "FAIL: "
+ printf "%q " "${runme[@]}"; echo
+ "${runme[@]}" | diff -U30 "$correct" -
+ echo
fi
}
-liloTest() {
- if [ -z "$lilotest" ]; then echo "skipping LILO test" ; return; fi
- oneTest --lilo "$@"
-}
-
-eliloTest() {
- if [ -z "$elilotest" ]; then echo "skipping ELILO test" ; return; fi
- oneTest --elilo "$@"
-}
-
-grubTest() {
- if [ -z "$grubtest" ]; then echo "skipping GRUB test" ; return; fi
- oneTest --grub "$@"
-}
-
-yabootTest() {
- if [ -z "$yaboottest" ]; then echo "skipping YABOOT test" ; return; fi
- oneTest --yaboot "$@"
-}
-
-ziplTest() {
- if [ -z "$zipltest" ]; then echo "skipping Z/IPL test" ; return; fi
- oneTest --zipl "$@"
+# Test feature that display some information, checking that output instead of
+# the generated configuration file
+oneDisplayTest() {
+ typeset mode=$1 cfg=test/$2 correct=test/results/$3
+ shift 3
+ local BIO="--bad-image-okay"
+ if [ "$1" == "--bad-image-bad" ]; then
+ BIO=""
+ shift
+ fi
+
+ echo "$testing ... $mode $cfg $correct"
+ runme=( ./grubby "$mode" $BIO -c "$cfg" "$@" )
+ if "${runme[@]}" 2>&1 | cmp "$correct" > /dev/null; then
+ (( pass++ ))
+ if $opt_verbose; then
+ echo -------------------------------------------------------------
+ echo -n "PASS: "
+ printf "%q " "${runme[@]}"; echo
+ "${runme[@]}" 2>&1 | diff -U30 "$cfg" -
+ echo
+ fi
+ else
+ (( fail++ ))
+ echo -------------------------------------------------------------
+ echo -n "FAIL: "
+ printf "%q " "${runme[@]}"; echo
+ "${runme[@]}" 2>&1 | diff -U30 "$correct" -
+ echo
+ fi
}
-echo "Parse/write comparison..."
-for n in $(cd test; echo grub.[0-9]*); do
- grubTest $n ../$n --remove-kernel 1234
+# generate convenience functions
+for b in $(./grubby --help | \
+ sed -n 's/^.*--\([^ ]*\) *configure \1 bootloader$/\1/p'); do
+ eval "${b}Test() { [[ \"$b\" == \$opt_bootloader ]] && oneTest --$b \"\$@\"; }"
+ eval "${b}DisplayTest() { [[ \"$b\" == \$opt_bootloader ]] && oneDisplayTest --$b \"\$@\"; }"
done
-for n in $(cd test; echo lilo.[0-9]*); do
- liloTest $n ../$n --remove-kernel 1234
+#----------------------------------------------------------------------
+# Main
+#----------------------------------------------------------------------
+
+# Use /usr/bin/getopt which supports GNU-style long options
+args=$(getopt -o b:hv --long bootloader,help,verbose -n "$cmd" -- "$@") || exit
+eval set -- "$args"
+while true; do
+ case $1 in
+ -b|--bootloader) opt_bootloader=$2; shift 2 ;;
+ -h|--help) echo "$usage"; exit 0 ;;
+ -v|--verbose) opt_verbose=true; shift ;;
+ --) shift; break ;;
+ *) echo "failed to process cmdline args" >&2; exit 1 ;;
+ esac
done
-echo "Permission preservation..."
-cp test/grub.1 grub-test
-chmod 0614 grub-test
-touch -t 200301010101.00 grub-test
-time=$(ls -l grub-test | awk '{ print $6 " " $7 " "$8}')
-perm=$(ls -l grub-test | awk '{print $1}')
-./grubby --grub --add-kernel bar --title title -c grub-test
-newtime=$(ls -l grub-test | awk '{ print $6 " " $7 " "$8}')
-newperm=$(ls -l grub-test | awk '{print $1}')
-if [ "$time" == "$newtime" -o "$perm" != "$newperm" ]; then
- echo " failed ($perm $newperm)";
+export MALLOC_CHECK_=2
+if [ -n "${RANDOM}" ]; then
+ export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))
+else
+ export MALLOC_PERTURB_=1
fi
-rm -f grub-test
-cp test/lilo.1 lilo-test
-chmod 0614 lilo-test
-touch -t 200301010101.00 lilo-test
-time=$(ls -l lilo-test | awk '{ print $6 " " $7 " "$8}')
-perm=$(ls -l lilo-test | awk '{print $1}')
-./grubby --lilo --add-kernel bar --title title -c lilo-test
-newtime=$(ls -l lilo-test | awk '{ print $6 " " $7 " "$8}')
-newperm=$(ls -l lilo-test | awk '{print $1}')
-if [ "$time" == "$newtime" -o "$perm" != "$newperm" ]; then
- echo " failed ($perm $newperm)";
-fi
-rm -f lilo-test
+testing="Parse/write comparison"
+for n in test/*.[0-9]*; do
+ [ -d $n ] && continue
+ n=${n#*/} # remove test/
+ b=${n%.*} # remove suffix
+ [[ $b == $opt_bootloader ]] || continue
+ ${b}Test $n ../$n --remove-kernel 1234
+done
-echo "Following symlinks..."
-cp test/grub.1 grub-test
-ln -s grub-test mytest
-./grubby --grub --add-kernel bar --title title -c mytest
-if [ ! -L mytest ]; then
- echo " failed (not a symlink)"
-fi
-target=$(ls -l mytest | awk '{ print $11 }')
-if [ "$target" != grub-test ]; then
- echo " failed (wrong target)"
-fi
-rm -f grub-test mytest
+testing="Permission preservation"
+unset b
+for n in test/*.[0-9]*; do
+ n=${n#*/} # remove test/
+ [[ ${n%.*} == "$b" ]] && continue
+ b=${n%.*} # remove suffix
+ [[ $b == $opt_bootloader ]] || continue
+
+ echo "$testing ... --$b"
+
+ cp test/$n ${b}-test
+ chmod 0614 ${b}-test
+ touch -t 200301010101.00 ${b}-test
+ time=$(ls -l ${b}-test | awk '{ print $6 " " $7 " "$8}')
+ perm=$(ls -l ${b}-test | awk '{print $1}')
+ ./grubby --${b} --add-kernel bar --title title -c ${b}-test
+ if [[ $? != 0 ]]; then
+ echo " FAIL (grubby returned non-zero)"
+ (( fail++ ))
+ elif newtime=$(ls -l ${b}-test | awk '{ print $6 " " $7 " "$8}') && \
+ newperm=$(ls -l ${b}-test | awk '{print $1}') && \
+ [[ $time == "$newtime" || $perm != "$newperm" ]]
+ then
+ echo " FAIL ($perm $newperm)";
+ (( fail++ ))
+ else
+ (( pass++ ))
+ fi
+ rm -f ${b}-test
+done
-echo "GRUB default directive..."
+testing="Following symlinks"
+unset b
+for n in test/*.[0-9]*; do
+ n=${n#*/} # remove test/
+ [[ ${n%.*} == "$b" ]] && continue
+ b=${n%.*} # remove suffix
+ [[ $b == $opt_bootloader ]] || continue
+
+ echo "$testing ... --$b"
+
+ cp test/${b}.1 ${b}-test
+ ln -s ./${b}-test mytest
+ ./grubby --${b} --add-kernel bar --title title -c mytest
+ if [[ $? != 0 ]]; then
+ echo " failed (grubby returned non-zero)"
+ (( fail++ ))
+ elif [[ ! -L mytest ]]; then
+ echo " failed (not a symlink)"
+ (( fail++ ))
+ elif target=$(readlink mytest) && [[ $target != "./${b}-test" ]]; then
+ echo " failed (wrong target)"
+ (( fail++ ))
+ else
+ (( pass++ ))
+ fi
+ rm -f ${b}-test mytest
+done
+
+testing="GRUB default directive"
grubTest grub.1 default/g1.1 --boot-filesystem=/boot --add-kernel /boot/new-kernel --title Some_Title
grubTest grub.1 default/g1.2 --boot-filesystem=/boot --add-kernel /boot/new-kernel --title Some_Title --make-default
grubTest grub.3 default/g3.1 --boot-filesystem=/boot --set-default=/boot/vmlinuz-2.4.7-2
@@ -135,7 +209,38 @@
grubTest grub.4 default/g4.2 --boot-filesystem=/ --set-default=/boot/vmlinuz-2.4.7-ac3 --remove-kernel /boot/vmlinuz-2.4.7-2.5 --add-kernel=/boot/new-kernel --copy-default --title New_Title
grubTest grub.6 default/g6.1 --remove-kernel=/boot/vmlinuz-2.4.7-2.9 --boot-filesystem=/
-echo "LILO default directive..."
+testing="GRUB default index directive"
+grubTest grub.13 setdefaultindex/g.13.0 --set-default-index=0
+grubTest grub.13 setdefaultindex/g.13.1 --set-default-index=1
+grubTest grub.13 setdefaultindex/g.13.9 --set-default-index=9
+
+testing="GRUB display default index"
+grubDisplayTest grub.1 defaultindex/0 --default-index
+grubDisplayTest grub.2 defaultindex/0 --default-index
+grubDisplayTest grub.3 defaultindex/0 --default-index
+grubDisplayTest grub.4 defaultindex/0 --default-index
+grubDisplayTest grub.5 defaultindex/0 --default-index
+grubDisplayTest grub.6 defaultindex/2 --default-index
+grubDisplayTest grub.7 defaultindex/2 --default-index
+grubDisplayTest grub.8 defaultindex/0 --default-index
+grubDisplayTest grub.9 defaultindex/0 --default-index
+grubDisplayTest grub.10 defaultindex/0 --default-index
+grubDisplayTest grub.10 defaultindex/0 --default-index
+
+testing="GRUB display default title"
+grubDisplayTest grub.1 defaulttitle/g.1 --default-title
+grubDisplayTest grub.2 defaulttitle/g.2 --default-title
+grubDisplayTest grub.3 defaulttitle/g.3 --default-title
+grubDisplayTest grub.4 defaulttitle/g.4 --default-title
+grubDisplayTest grub.5 defaulttitle/g.5 --default-title
+grubDisplayTest grub.6 defaulttitle/g.6 --default-title
+grubDisplayTest grub.7 defaulttitle/g.7 --default-title
+grubDisplayTest grub.8 defaulttitle/g.8 --default-title
+grubDisplayTest grub.9 defaulttitle/g.9 --default-title
+grubDisplayTest grub.10 defaulttitle/g.10 --default-title
+grubDisplayTest grub.11 defaulttitle/g.11 --default-title
+
+testing="LILO default directive"
liloTest lilo.1 default/l1.1 --set-default=/boot/vmlinuz-2.4.18-4
liloTest lilo.1 default/l1.2 --remove-kernel=/boot/vmlinuz-2.4.18-4smp
liloTest lilo.1 default/l1.3 --add-kernel /boot/kernel --title label \
@@ -143,11 +248,11 @@
liloTest lilo.1 default/l1.4 --add-kernel /boot/kernel --title label \
--copy-default --make-default
-echo "Z/IPL default directive..."
+testing="Z/IPL default directive"
ziplTest zipl.1 default/z1.1 --add-kernel /boot/new-kernel --title test
ziplTest zipl.1 default/z1.2 --add-kernel /boot/new-kernel --title test --make-default
-echo "GRUB fallback directive..."
+testing="GRUB fallback directive"
grubTest grub.5 fallback/g5.1 --remove-kernel=/boot/vmlinuz-2.4.7-ac3 \
--boot-filesystem=/
grubTest grub.5 fallback/g5.2 --remove-kernel=/boot/vmlinuz-2.4.7-2.5 \
@@ -156,13 +261,13 @@
--boot-filesystem=/ --copy-default --add-kernel=/boot/new-kernel \
--title="Some_Title"
-echo "GRUB new kernel argument handling..."
+testing="GRUB new kernel argument handling"
grubTest grub.1 args/g1.1 --boot-filesystem=/boot \
--add-kernel=/boot/foo --title=some_title --args="1234" --copy-default
grubTest grub.1 args/g1.2 --boot-filesystem=/boot \
--add-kernel=/boot/foo --title=some_title --args="1234"
-echo "GRUB remove kernel..."
+testing="GRUB remove kernel"
grubTest grub.7 remove/g7.1 --boot-filesystem=/ \
--remove-kernel=/boot/vmlinuz-2.4.7-2.5
grubTest grub.3 remove/g3.1 --boot-filesystem=/ \
@@ -170,16 +275,16 @@
grubTest grub.9 remove/g9.1 --boot-filesystem=/boot \
--remove-kernel=/boot/vmlinuz-2.4.7-2
-echo "YABOOT remove kernel..."
+testing="YABOOT remove kernel"
yabootTest yaboot.1 remove/y1.1 --boot-filesystem=/ --remove-kernel=DEFAULT
yabootTest yaboot.1 remove/y1.2 --boot-filesystem=/ --remove-kernel=/boot/vmlinuz-2.5.50-eepro
yabootTest yaboot.2 remove/y2.1 --boot-filesystem=/ --remove-kernel=/boot/vmlinux-2.5.50
-echo "Z/IPL remove kernel..."
+testing="Z/IPL remove kernel"
ziplTest zipl.1 remove/z1.1 --remove-kernel=/boot/vmlinuz-2.4.9-38
ziplTest zipl.1 remove/z1.2 --remove-kernel=DEFAULT
-echo "GRUB update kernel argument handling..."
+testing="GRUB update kernel argument handling"
grubTest grub.1 updargs/g1.1 --update-kernel=DEFAULT --args="root=/dev/hda1"
grubTest grub.1 updargs/g1.2 --update-kernel=DEFAULT \
--args="root=/dev/hda1 hda=ide-scsi root=/dev/hda2"
@@ -202,6 +307,8 @@
grubTest grub.7 updargs/g7.4 --boot-filesystem=/ \
--update-kernel=/vmlinuz-2.4.7-2 \
--args "ro root=LABEL=/ console=tty0 console=ttyS1,9600n81 single"
+grubTest grub.7 updargs/g7.5 --boot-filesystem=/ \
+ --update-kernel=ALL --args "root=/dev/hda2"
grubTest grub.11 updargs/g11.1 --boot-filesystem=/ \
--update-kernel=/vmlinuz-2.4.7-2smp \
--args "ro root=LABEL=/ console=tty0 console=ttyS1,9600n81 single"
@@ -209,7 +316,13 @@
--update-kernel=/vmlinuz-2.4.7-2smp \
--args "ro root=LABEL=/ single"
-echo "LILO update kernel argument handling..."
+testing="GRUB lba and root information on SuSE systems"
+GRUBBY_SUSE_RELEASE=test/grub.12-support_files/etc/SuSE-release \
+ GRUBBY_SUSE_GRUB_CONF=test/grub.12-support_files/etc/grub.conf \
+ GRUBBY_GRUB_DEVICE_MAP=test/grub.12-support_files/boot/grub/device.map \
+ grubTest grub.12 info/g12.1 --info=0
+
+testing="LILO update kernel argument handling"
liloTest lilo.1 updargs/l1.1 --update-kernel=/boot/vmlinuz-2.4.18-4 \
--args="root=/dev/md1"
liloTest lilo.1 updargs/l1.2 --update-kernel=/boot/vmlinuz-2.4.18-4smp \
@@ -223,7 +336,7 @@
liloTest lilo.3 updargs/l3.2 --update-kernel=ALL \
--remove-args="single" --args "root=/dev/hda2"
-echo "LILO add kernel..."
+testing="LILO add kernel"
liloTest lilo.4 add/l4.1 --add-kernel=/boot/new-kernel.img --title="title" \
--copy-default --boot-filesystem=/boot
liloTest lilo.4 add/l4.2 --add-kernel=/boot/new-kernel.img --title="linux" \
@@ -238,7 +351,7 @@
--initrd=/boot/new-initrd --copy-default --boot-filesystem=/boot --remove-kernel "TITLE=linux"
-echo "GRUB add kernel..."
+testing="GRUB add kernel"
grubTest grub.1 add/g1.1 --add-kernel=/boot/new-kernel.img --title='title' \
--initrd=/boot/new-initrd --boot-filesystem=/
grubTest grub.1 add/g1.2 --add-kernel=/boot/new-kernel.img --title='title' \
@@ -247,6 +360,10 @@
--initrd=/boot/new-initrd --boot-filesystem=/ --copy-default
grubTest grub.1 add/g1.4 --add-kernel=/boot/new-kernel.img --title='title' \
--initrd=/boot/new-initrd --boot-filesystem=/boot --copy-default
+grubTest grub.1 add/g1.5 --add-kernel=/boot/new-kernel.img --title='title' \
+ --initrd=/boot/new-initrd --extra-initrd=/boot/extra-initrd --boot-filesystem=/
+grubTest grub.1 add/g1.6 --add-kernel=/boot/new-kernel.img --title='title' \
+ --initrd=/boot/new-initrd --extra-initrd=/boot/extra-initrd --boot-filesystem=/boot
grubTest grub.2 add/g2.1 --add-kernel=/boot/vmlinuz-2.4.7-2 \
--initrd=/boot/initrd-2.4.7-new.img --boot-filesystem=/boot --copy-default \
--title="Red Hat Linux (2.4.7-2)" \
@@ -260,19 +377,66 @@
--initrd=/boot/new-initrd --boot-filesystem=/boot --copy-default \
--args='console=tty0 console=ttyS1,9600n81 single'
-echo "YABOOT add kernel..."
+testing="GRUB2 add kernel"
+grub2Test grub2.1 add/g2-1.1 --add-kernel=/boot/new-kernel.img --title='title' \
+ --initrd=/boot/new-initrd --boot-filesystem=/boot/ --copy-default
+grub2Test grub2.1 add/g2-1.2 --add-kernel=/boot/new-kernel.img --title='title' \
+ --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
+ --copy-default --make-default
+grub2Test grub2.1 add/g2-1.3 --add-kernel=/boot/new-kernel.img --title='title' \
+ --boot-filesystem=/boot/ --copy-default --make-default
+grub2Test grub2.1 remove/g2-1.4 --remove-kernel=/boot/vmlinuz-2.6.38.2-9.fc15.x86_64 \
+ --boot-filesystem=/boot/
+grub2Test grub2.5 add/g2-1.5 --add-kernel=/boot/new-kernel.img --title='title' \
+ --initrd=/boot/new-initrd --boot-filesystem=/boot/ --copy-default
+
+testing="GRUB2 add initrd"
+grub2Test grub2.2 add/g2-1.4 --update-kernel=/boot/new-kernel.img \
+ --initrd=/boot/new-initrd --boot-filesystem=/boot/
+
+testing="GRUB2 display default index"
+grub2DisplayTest grub2.1 defaultindex/0 --default-index
+grub2DisplayTest grub2.2 defaultindex/0 --default-index
+
+testing="GRUB2 display default title"
+grub2DisplayTest grub2.1 defaulttitle/g2.1 --default-title
+grub2DisplayTest grub2.2 defaulttitle/g2.2 --default-title
+
+testing="GRUB2 display debug failure"
+grub2DisplayTest grub2.1 debug/g2.1 --bad-image-bad --boot-filesystem=/boot --default-kernel --debug
+testing="GRUB2 display debug success"
+grub2DisplayTest grub2.1 debug/g2.1.2 --boot-filesystem=/boot --default-kernel --debug
+
+testing="GRUB2 remove kernel via index"
+grub2Test grub2.3 remove/g2-1.1 --remove-kernel=1
+
+testing="GRUB2 remove kernel via title"
+grub2Test grub2.3 remove/g2-1.1 --remove-kernel="TITLE=title2"
+
+testing="GRUB2 (submenu) remove kernel via index"
+grub2Test grub2.4 remove/g2-1.2 --remove-kernel=2
+
+testing="GRUB2 (submenu) remove kernel via title"
+grub2Test grub2.4 remove/g2-1.2 --remove-kernel="TITLE=title2"
+
+testing="GRUB2 default index directive"
+grub2Test grub2.1 setdefaultindex/g2.1.0 --set-default-index=0
+grub2Test grub2.1 setdefaultindex/g2.1.1 --set-default-index=1
+grub2Test grub2.1 setdefaultindex/g2.1.9 --set-default-index=9
+
+testing="YABOOT add kernel"
yabootTest yaboot.1 add/y1.1 --copy-default --boot-filesystem=/ --add-kernel=/boot/new-kernel \
--title=newtitle
yabootTest yaboot.1 add/y1.2 --add-kernel=/boot/new-kernel --boot-filesystem=/ --title=newtitle
-echo "YABOOT empty label..."
+testing="YABOOT empty label"
yabootTest yaboot.3 add/y3.1 --add-kernel=/boot/new-kernel --boot-filesystem=/ --title=newtitle
-echo "Z/IPL add kernel..."
+testing="Z/IPL add kernel"
ziplTest zipl.1 add/z1.1 --add-kernel=/boot/new-kernel.img --title test
ziplTest zipl.1 add/z1.2 --add-kernel=/boot/new-kernel.img --title test --copy-default
-echo "LILO long titles..."
+testing="LILO long titles"
liloTest lilo.1 longtitle/l1.1 --add-kernel=/boot/new-kernel.img \
--title="linux-longtitle" --copy-default --boot-filesystem=/boot
liloTest lilo.1 longtitle/l1.2 --add-kernel=/boot/new-kernel.img \
@@ -280,11 +444,11 @@
liloTest lilo.7 longtitle/l7.1 --add-kernel=/boot/new-kernel.img \
--title="linux-longtitle-fix" --copy-default --boot-filesystem=/boot
-echo "ELILO long titles..."
+testing="ELILO long titles"
eliloTest lilo.7 longtitle/e7.1 --add-kernel=/boot/new-kernel.img \
--title="linux-longtitle-fix" --copy-default --boot-filesystem=/boot
-echo "GRUB add multiboot..."
+testing="GRUB add multiboot"
grubTest grub.1 multiboot/g1.1 --add-multiboot=/boot/xen.gz \
--add-kernel=/boot/vmlinuz-2.6.10-1.1088_FC4 --boot-filesystem=/boot \
--initrd=/boot/initrd-2.6.10-1.1088_FC4.img --title foo \
@@ -308,7 +472,7 @@
--initrd=/boot/initrd-2.6.10-1.1088_FC4.img --title foo \
--boot-filesystem=/boot
-echo "GRUB remove multiboot..."
+testing="GRUB remove multiboot"
grubTest grub.10 multiboot/g10.5 --boot-filesystem=/boot \
--remove-kernel=/boot/vmlinuz-2.6.10-1.1076_FC4
grubTest grub.10 multiboot/g10.6 --boot-filesystem=/boot \
@@ -316,4 +480,26 @@
grubTest grub.10 multiboot/g10.7 --boot-filesystem=/boot \
--remove-multiboot=/boot/xen.gz
-exit $RESULT
+testing="ELILO add multiboot"
+eliloTest elilo.1 multiboot/e1.1 --add-multiboot=/boot/xen.gz \
+ --add-kernel=/boot/vmlinuz-2.6.10-1.1088_FC4 --boot-filesystem=/boot \
+ --initrd=/boot/initrd-2.6.10-1.1088_FC4.img --title foo \
+ --mbargs="dom0_mem=130000"
+eliloTest elilo.1 multiboot/e1.2 --add-multiboot=/boot/xen.gz \
+ --add-kernel=/boot/vmlinuz-2.6.10-1.1088_FC4 --boot-filesystem=/boot \
+ --initrd=/boot/initrd-2.6.10-1.1088_FC4.img --title foo \
+ --mbargs="dom0_mem=130000" --copy-default
+
+testing="ELILO remove multiboot"
+eliloTest elilo.2 multiboot/e2.1 --boot-filesystem=/boot \
+ --remove-kernel=/boot/vmlinuz-2.6.10-1.1076_FC4
+eliloTest elilo.2 multiboot/e2.2 --boot-filesystem=/boot \
+ --remove-kernel=/boot/vmlinuz-2.6.10-1.1082_FC4
+eliloTest elilo.2 multiboot/e2.3 --boot-filesystem=/boot \
+ --remove-multiboot=/boot/xen.gz
+
+printf "\n%d (%d%%) tests passed, %d (%d%%) tests failed\n" \
+ $pass $(((100*pass)/(pass+fail))) \
+ $fail $(((100*fail)/(pass+fail)))
+
+exit $(( !!fail ))