Magellan Linux

Annotation of /tags/grubby-8_32/test.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2057 - (hide annotations) (download) (as text)
Wed Feb 20 14:05:36 2013 UTC (11 years, 2 months ago) by niro
Original Path: trunk/grubby/test.sh
File MIME type: application/x-sh
File size: 21987 byte(s)
Add test case for rhbz#742885
1 niro 532 #!/bin/bash
2 niro 1308 #
3     # test.sh -- grubby regression tests
4     #
5     # Copyright 2007-2008 Red Hat, Inc. All rights reserved.
6     #
7     # This program is free software; you can redistribute it and/or modify
8     # it under the terms of the GNU General Public License as published by
9     # the Free Software Foundation; either version 2 of the License, or
10     # (at your option) any later version.
11     #
12     # This program is distributed in the hope that it will be useful,
13     # but WITHOUT ANY WARRANTY; without even the implied warranty of
14     # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15     # GNU General Public License for more details.
16     #
17     # You should have received a copy of the GNU General Public License
18     # along with this program. If not, see <http://www.gnu.org/licenses/>.
19     #
20 niro 532
21 niro 1308 if [ -n "$TOPDIR" ]; then
22     LD_LIBRARY_PATH="$TOPDIR/nash:$TOPDIR/bdevid:/usr/lib:/lib"
23     export LD_LIBRARY_PATH
24     fi
25 niro 532
26 niro 1308 #----------------------------------------------------------------------
27     # Global vars
28     #----------------------------------------------------------------------
29 niro 532
30 niro 1308 cmd=${0##*/}
31     opt_bootloader=*
32     opt_verbose=false
33     read -d '' usage <<EOT
34     usage: test.sh [ -hv ]
35 niro 532
36 niro 1308 -b B --bootloader=B Test bootloader B instead of all
37     -h --help Show this help message
38     -v --verbose Verbose output
39     EOT
40     declare -i pass=0 fail=0
41     testing=
42 niro 532
43 niro 1308 #----------------------------------------------------------------------
44     # Functions
45     #----------------------------------------------------------------------
46 niro 532
47 niro 1308 oneTest() {
48     typeset mode=$1 cfg=test/$2 correct=test/results/$3
49     shift 3
50 niro 532
51 niro 1308 echo "$testing ... $mode $cfg $correct"
52     runme=( ./grubby "$mode" --bad-image-okay -c "$cfg" -o - "$@" )
53     if "${runme[@]}" | cmp "$correct" > /dev/null; then
54     (( pass++ ))
55     if $opt_verbose; then
56     echo -------------------------------------------------------------
57     echo -n "PASS: "
58     printf "%q " "${runme[@]}"; echo
59     "${runme[@]}" | diff -U30 "$cfg" -
60     echo
61     fi
62     else
63     (( fail++ ))
64 niro 532 echo -------------------------------------------------------------
65 niro 1308 echo -n "FAIL: "
66     printf "%q " "${runme[@]}"; echo
67     "${runme[@]}" | diff -U30 "$correct" -
68     echo
69 niro 532 fi
70     }
71    
72 niro 1719 # Test feature that display some information, checking that output instead of
73     # the generated configuration file
74     oneDisplayTest() {
75     typeset mode=$1 cfg=test/$2 correct=test/results/$3
76     shift 3
77 niro 1737 local BIO="--bad-image-okay"
78     if [ "$1" == "--bad-image-bad" ]; then
79     BIO=""
80     shift
81     fi
82 niro 1719
83     echo "$testing ... $mode $cfg $correct"
84 niro 1741 runme=( ./grubby "$mode" $BIO -c "$cfg" "$@" )
85 niro 1856 if "${runme[@]}" 2>&1 | cmp "$correct" > /dev/null; then
86 niro 1719 (( pass++ ))
87     if $opt_verbose; then
88     echo -------------------------------------------------------------
89     echo -n "PASS: "
90     printf "%q " "${runme[@]}"; echo
91 niro 1856 "${runme[@]}" 2>&1 | diff -U30 "$cfg" -
92 niro 1719 echo
93     fi
94     else
95     (( fail++ ))
96     echo -------------------------------------------------------------
97     echo -n "FAIL: "
98     printf "%q " "${runme[@]}"; echo
99 niro 1856 "${runme[@]}" 2>&1 | diff -U30 "$correct" -
100 niro 1719 echo
101     fi
102     }
103    
104 niro 1308 # generate convenience functions
105     for b in $(./grubby --help | \
106     sed -n 's/^.*--\([^ ]*\) *configure \1 bootloader$/\1/p'); do
107     eval "${b}Test() { [[ \"$b\" == \$opt_bootloader ]] && oneTest --$b \"\$@\"; }"
108 niro 1719 eval "${b}DisplayTest() { [[ \"$b\" == \$opt_bootloader ]] && oneDisplayTest --$b \"\$@\"; }"
109 niro 1308 done
110 niro 532
111 niro 1308 #----------------------------------------------------------------------
112     # Main
113     #----------------------------------------------------------------------
114 niro 532
115 niro 1308 # Use /usr/bin/getopt which supports GNU-style long options
116     args=$(getopt -o b:hv --long bootloader,help,verbose -n "$cmd" -- "$@") || exit
117     eval set -- "$args"
118     while true; do
119     case $1 in
120     -b|--bootloader) opt_bootloader=$2; shift 2 ;;
121     -h|--help) echo "$usage"; exit 0 ;;
122     -v|--verbose) opt_verbose=true; shift ;;
123     --) shift; break ;;
124     *) echo "failed to process cmdline args" >&2; exit 1 ;;
125     esac
126     done
127 niro 532
128 niro 1308 export MALLOC_CHECK_=2
129 niro 1858 if [ -n "${RANDOM}" ]; then
130     export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))
131     else
132     export MALLOC_PERTURB_=1
133     fi
134 niro 532
135 niro 1308 testing="Parse/write comparison"
136     for n in test/*.[0-9]*; do
137 niro 1861 [ -d $n ] && continue
138 niro 1308 n=${n#*/} # remove test/
139     b=${n%.*} # remove suffix
140     [[ $b == $opt_bootloader ]] || continue
141     ${b}Test $n ../$n --remove-kernel 1234
142 niro 532 done
143    
144 niro 1308 testing="Permission preservation"
145     unset b
146     for n in test/*.[0-9]*; do
147     n=${n#*/} # remove test/
148     [[ ${n%.*} == "$b" ]] && continue
149     b=${n%.*} # remove suffix
150     [[ $b == $opt_bootloader ]] || continue
151    
152     echo "$testing ... --$b"
153    
154     cp test/$n ${b}-test
155     chmod 0614 ${b}-test
156     touch -t 200301010101.00 ${b}-test
157     time=$(ls -l ${b}-test | awk '{ print $6 " " $7 " "$8}')
158     perm=$(ls -l ${b}-test | awk '{print $1}')
159     ./grubby --${b} --add-kernel bar --title title -c ${b}-test
160     if [[ $? != 0 ]]; then
161     echo " FAIL (grubby returned non-zero)"
162     (( fail++ ))
163     elif newtime=$(ls -l ${b}-test | awk '{ print $6 " " $7 " "$8}') && \
164     newperm=$(ls -l ${b}-test | awk '{print $1}') && \
165     [[ $time == "$newtime" || $perm != "$newperm" ]]
166     then
167     echo " FAIL ($perm $newperm)";
168     (( fail++ ))
169     else
170     (( pass++ ))
171     fi
172     rm -f ${b}-test
173 niro 532 done
174    
175 niro 1308 testing="Following symlinks"
176     unset b
177     for n in test/*.[0-9]*; do
178     n=${n#*/} # remove test/
179     [[ ${n%.*} == "$b" ]] && continue
180     b=${n%.*} # remove suffix
181     [[ $b == $opt_bootloader ]] || continue
182 niro 532
183 niro 1308 echo "$testing ... --$b"
184 niro 532
185 niro 1308 cp test/${b}.1 ${b}-test
186     ln -s ./${b}-test mytest
187     ./grubby --${b} --add-kernel bar --title title -c mytest
188     if [[ $? != 0 ]]; then
189     echo " failed (grubby returned non-zero)"
190     (( fail++ ))
191     elif [[ ! -L mytest ]]; then
192     echo " failed (not a symlink)"
193     (( fail++ ))
194     elif target=$(readlink mytest) && [[ $target != "./${b}-test" ]]; then
195     echo " failed (wrong target)"
196     (( fail++ ))
197     else
198     (( pass++ ))
199     fi
200     rm -f ${b}-test mytest
201     done
202 niro 532
203 niro 1308 testing="GRUB default directive"
204 niro 532 grubTest grub.1 default/g1.1 --boot-filesystem=/boot --add-kernel /boot/new-kernel --title Some_Title
205     grubTest grub.1 default/g1.2 --boot-filesystem=/boot --add-kernel /boot/new-kernel --title Some_Title --make-default
206     grubTest grub.3 default/g3.1 --boot-filesystem=/boot --set-default=/boot/vmlinuz-2.4.7-2
207     grubTest grub.3 default/g3.2 --boot-filesystem=/boot --set-default=/boot/vmlinuz-2.4.7-2smp
208     grubTest grub.4 default/g4.1 --boot-filesystem=/ --set-default=/boot/vmlinuz-2.4.7-ac3 --remove-kernel /boot/vmlinuz-2.4.7-2.5
209     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
210     grubTest grub.6 default/g6.1 --remove-kernel=/boot/vmlinuz-2.4.7-2.9 --boot-filesystem=/
211 niro 2057 grubTest grub.14 add/g1.7 --boot-filesystem=/boot --add-kernel /boot/new-kernel --title Some_Title
212 niro 532
213 niro 1861 testing="GRUB default index directive"
214     grubTest grub.13 setdefaultindex/g.13.0 --set-default-index=0
215     grubTest grub.13 setdefaultindex/g.13.1 --set-default-index=1
216     grubTest grub.13 setdefaultindex/g.13.9 --set-default-index=9
217    
218 niro 1720 testing="GRUB display default index"
219     grubDisplayTest grub.1 defaultindex/0 --default-index
220     grubDisplayTest grub.2 defaultindex/0 --default-index
221     grubDisplayTest grub.3 defaultindex/0 --default-index
222     grubDisplayTest grub.4 defaultindex/0 --default-index
223     grubDisplayTest grub.5 defaultindex/0 --default-index
224     grubDisplayTest grub.6 defaultindex/2 --default-index
225     grubDisplayTest grub.7 defaultindex/2 --default-index
226     grubDisplayTest grub.8 defaultindex/0 --default-index
227     grubDisplayTest grub.9 defaultindex/0 --default-index
228     grubDisplayTest grub.10 defaultindex/0 --default-index
229     grubDisplayTest grub.10 defaultindex/0 --default-index
230    
231 niro 1721 testing="GRUB display default title"
232     grubDisplayTest grub.1 defaulttitle/g.1 --default-title
233     grubDisplayTest grub.2 defaulttitle/g.2 --default-title
234     grubDisplayTest grub.3 defaulttitle/g.3 --default-title
235     grubDisplayTest grub.4 defaulttitle/g.4 --default-title
236     grubDisplayTest grub.5 defaulttitle/g.5 --default-title
237     grubDisplayTest grub.6 defaulttitle/g.6 --default-title
238     grubDisplayTest grub.7 defaulttitle/g.7 --default-title
239     grubDisplayTest grub.8 defaulttitle/g.8 --default-title
240     grubDisplayTest grub.9 defaulttitle/g.9 --default-title
241     grubDisplayTest grub.10 defaulttitle/g.10 --default-title
242     grubDisplayTest grub.11 defaulttitle/g.11 --default-title
243    
244 niro 1308 testing="LILO default directive"
245 niro 532 liloTest lilo.1 default/l1.1 --set-default=/boot/vmlinuz-2.4.18-4
246     liloTest lilo.1 default/l1.2 --remove-kernel=/boot/vmlinuz-2.4.18-4smp
247     liloTest lilo.1 default/l1.3 --add-kernel /boot/kernel --title label \
248     --copy-default
249     liloTest lilo.1 default/l1.4 --add-kernel /boot/kernel --title label \
250     --copy-default --make-default
251    
252 niro 1308 testing="Z/IPL default directive"
253 niro 532 ziplTest zipl.1 default/z1.1 --add-kernel /boot/new-kernel --title test
254     ziplTest zipl.1 default/z1.2 --add-kernel /boot/new-kernel --title test --make-default
255    
256 niro 1308 testing="GRUB fallback directive"
257 niro 532 grubTest grub.5 fallback/g5.1 --remove-kernel=/boot/vmlinuz-2.4.7-ac3 \
258     --boot-filesystem=/
259     grubTest grub.5 fallback/g5.2 --remove-kernel=/boot/vmlinuz-2.4.7-2.5 \
260     --boot-filesystem=/
261     grubTest grub.5 fallback/g5.3 --remove-kernel=/boot/vmlinuz-2.4.7-2.5 \
262     --boot-filesystem=/ --copy-default --add-kernel=/boot/new-kernel \
263     --title="Some_Title"
264    
265 niro 1308 testing="GRUB new kernel argument handling"
266 niro 532 grubTest grub.1 args/g1.1 --boot-filesystem=/boot \
267     --add-kernel=/boot/foo --title=some_title --args="1234" --copy-default
268     grubTest grub.1 args/g1.2 --boot-filesystem=/boot \
269     --add-kernel=/boot/foo --title=some_title --args="1234"
270    
271 niro 1308 testing="GRUB remove kernel"
272 niro 532 grubTest grub.7 remove/g7.1 --boot-filesystem=/ \
273     --remove-kernel=/boot/vmlinuz-2.4.7-2.5
274     grubTest grub.3 remove/g3.1 --boot-filesystem=/ \
275     --remove-kernel=DEFAULT
276     grubTest grub.9 remove/g9.1 --boot-filesystem=/boot \
277     --remove-kernel=/boot/vmlinuz-2.4.7-2
278    
279 niro 1308 testing="YABOOT remove kernel"
280 niro 532 yabootTest yaboot.1 remove/y1.1 --boot-filesystem=/ --remove-kernel=DEFAULT
281     yabootTest yaboot.1 remove/y1.2 --boot-filesystem=/ --remove-kernel=/boot/vmlinuz-2.5.50-eepro
282     yabootTest yaboot.2 remove/y2.1 --boot-filesystem=/ --remove-kernel=/boot/vmlinux-2.5.50
283    
284 niro 1308 testing="Z/IPL remove kernel"
285 niro 532 ziplTest zipl.1 remove/z1.1 --remove-kernel=/boot/vmlinuz-2.4.9-38
286     ziplTest zipl.1 remove/z1.2 --remove-kernel=DEFAULT
287    
288 niro 1308 testing="GRUB update kernel argument handling"
289 niro 532 grubTest grub.1 updargs/g1.1 --update-kernel=DEFAULT --args="root=/dev/hda1"
290     grubTest grub.1 updargs/g1.2 --update-kernel=DEFAULT \
291     --args="root=/dev/hda1 hda=ide-scsi root=/dev/hda2"
292     grubTest grub.3 updargs/g3.1 --update-kernel=DEFAULT --args "hdd=notide-scsi"
293     grubTest grub.3 updargs/g3.2 --update-kernel=DEFAULT \
294     --args "hdd=notide-scsi root=/dev/hdd1"
295     grubTest grub.3 updargs/g3.2 --update-kernel=DEFAULT \
296     --args "root=/dev/hdd1 hdd=notide-scsi"
297     grubTest grub.3 updargs/g3.4 --update-kernel=ALL --remove-args="hdd"
298     grubTest grub.3 updargs/g3.4 --update-kernel=ALL --remove-args="hdd=ide-scsi"
299     grubTest grub.3 updargs/g3.4 --update-kernel=ALL --remove-args="hdd=foobar"
300     grubTest grub.3 updargs/g3.7 --update-kernel=ALL \
301     --remove-args="hdd root ro"
302     grubTest grub.7 updargs/g7.2 --boot-filesystem=/ \
303     --update-kernel=ALL --args "hde=ide-scsi"
304     grubTest grub.7 updargs/g7.2 --boot-filesystem=/ \
305     --update-kernel=ALL --args "hde=ide-scsi"
306     grubTest grub.7 updargs/g7.3 --boot-filesystem=/ \
307     --update-kernel=DEFAULT --args "hde=ide-scsi"
308     grubTest grub.7 updargs/g7.4 --boot-filesystem=/ \
309     --update-kernel=/vmlinuz-2.4.7-2 \
310     --args "ro root=LABEL=/ console=tty0 console=ttyS1,9600n81 single"
311 niro 1308 grubTest grub.7 updargs/g7.5 --boot-filesystem=/ \
312     --update-kernel=ALL --args "root=/dev/hda2"
313 niro 532 grubTest grub.11 updargs/g11.1 --boot-filesystem=/ \
314     --update-kernel=/vmlinuz-2.4.7-2smp \
315     --args "ro root=LABEL=/ console=tty0 console=ttyS1,9600n81 single"
316     grubTest grub.11 updargs/g11.2 --boot-filesystem=/ \
317     --update-kernel=/vmlinuz-2.4.7-2smp \
318     --args "ro root=LABEL=/ single"
319    
320 niro 1861 testing="GRUB lba and root information on SuSE systems"
321     GRUBBY_SUSE_RELEASE=test/grub.12-support_files/etc/SuSE-release \
322     GRUBBY_SUSE_GRUB_CONF=test/grub.12-support_files/etc/grub.conf \
323     GRUBBY_GRUB_DEVICE_MAP=test/grub.12-support_files/boot/grub/device.map \
324     grubTest grub.12 info/g12.1 --info=0
325    
326 niro 1308 testing="LILO update kernel argument handling"
327 niro 532 liloTest lilo.1 updargs/l1.1 --update-kernel=/boot/vmlinuz-2.4.18-4 \
328     --args="root=/dev/md1"
329     liloTest lilo.1 updargs/l1.2 --update-kernel=/boot/vmlinuz-2.4.18-4smp \
330     --args="root=LABEL=foo"
331     liloTest lilo.1 updargs/l1.3 --update-kernel=DEFAULT --args="foo"
332     liloTest lilo.1 updargs/l1.4 --update-kernel=ALL --args="foo bar root=/dev/md1"
333     liloTest lilo.1 updargs/l1.4 --update-kernel=ALL --args="foo root=/dev/md1 bar"
334     liloTest lilo.1 updargs/l1.6 --update-kernel=ALL --args="foo root=LABEL=/ bar"
335     liloTest lilo.3 updargs/l3.1 --update-kernel=/boot/vmlinuz-2.4.18-4 \
336     --remove-args="hda"
337     liloTest lilo.3 updargs/l3.2 --update-kernel=ALL \
338     --remove-args="single" --args "root=/dev/hda2"
339    
340 niro 1308 testing="LILO add kernel"
341 niro 532 liloTest lilo.4 add/l4.1 --add-kernel=/boot/new-kernel.img --title="title" \
342     --copy-default --boot-filesystem=/boot
343     liloTest lilo.4 add/l4.2 --add-kernel=/boot/new-kernel.img --title="linux" \
344     --copy-default --boot-filesystem=/boot --remove-kernel "TITLE=linux"
345     liloTest lilo.5 add/l5.1 --add-kernel=/boot/new-kernel.img --title="title" \
346     --copy-default --boot-filesystem=/boot
347     liloTest lilo.5 add/l5.2 --add-kernel=/boot/new-kernel.img --title="linux" \
348     --copy-default --boot-filesystem=/boot --remove-kernel "TITLE=linux"
349     liloTest lilo.6 add/l6.1 --add-kernel=/boot/new-kernel.img --title="title" \
350     --initrd=/boot/new-initrd --copy-default --boot-filesystem=/boot
351     liloTest lilo.6 add/l6.2 --add-kernel=/boot/new-kernel.img --title="linux" \
352     --initrd=/boot/new-initrd --copy-default --boot-filesystem=/boot --remove-kernel "TITLE=linux"
353    
354    
355 niro 1308 testing="GRUB add kernel"
356 niro 532 grubTest grub.1 add/g1.1 --add-kernel=/boot/new-kernel.img --title='title' \
357     --initrd=/boot/new-initrd --boot-filesystem=/
358     grubTest grub.1 add/g1.2 --add-kernel=/boot/new-kernel.img --title='title' \
359     --initrd=/boot/new-initrd --boot-filesystem=/boot
360     grubTest grub.1 add/g1.3 --add-kernel=/boot/new-kernel.img --title='title' \
361     --initrd=/boot/new-initrd --boot-filesystem=/ --copy-default
362     grubTest grub.1 add/g1.4 --add-kernel=/boot/new-kernel.img --title='title' \
363     --initrd=/boot/new-initrd --boot-filesystem=/boot --copy-default
364 niro 1308 grubTest grub.1 add/g1.5 --add-kernel=/boot/new-kernel.img --title='title' \
365     --initrd=/boot/new-initrd --extra-initrd=/boot/extra-initrd --boot-filesystem=/
366     grubTest grub.1 add/g1.6 --add-kernel=/boot/new-kernel.img --title='title' \
367     --initrd=/boot/new-initrd --extra-initrd=/boot/extra-initrd --boot-filesystem=/boot
368 niro 532 grubTest grub.2 add/g2.1 --add-kernel=/boot/vmlinuz-2.4.7-2 \
369     --initrd=/boot/initrd-2.4.7-new.img --boot-filesystem=/boot --copy-default \
370     --title="Red Hat Linux (2.4.7-2)" \
371     --remove-kernel="TITLE=Red Hat Linux (2.4.7-2)"
372     grubTest grub.8 add/g8.1 --add-kernel=/boot/new-kernel.img --title='title' \
373     --initrd=/boot/new-initrd --boot-filesystem=/boot --copy-default
374     grubTest grub.8 add/g8.2 --add-kernel=/boot/new-kernel.img --title='title' \
375     --initrd=/boot/new-initrd --boot-filesystem=/boot --copy-default \
376     --args='console=tty0 console=ttyS1,9600n81 single'
377     grubTest grub.11 add/g11.1 --add-kernel=/boot/new-kernel.img --title='title' \
378     --initrd=/boot/new-initrd --boot-filesystem=/boot --copy-default \
379     --args='console=tty0 console=ttyS1,9600n81 single'
380    
381 niro 1698 testing="GRUB2 add kernel"
382     grub2Test grub2.1 add/g2-1.1 --add-kernel=/boot/new-kernel.img --title='title' \
383     --initrd=/boot/new-initrd --boot-filesystem=/boot/ --copy-default
384 niro 1940 grub2Test grub2.1 add/g2-1.6 --add-kernel=/boot/new-kernel.img --title='title' \
385     --initrd=/boot/new-initrd --boot-filesystem=/boot/ --copy-default --efi
386     grub2Test grub2.6 add/g2-1.7 --add-kernel=/boot/new-kernel.img --title='title' \
387     --initrd=/boot/new-initrd --boot-filesystem=/boot/ --copy-default --efi
388 niro 1698 grub2Test grub2.1 add/g2-1.2 --add-kernel=/boot/new-kernel.img --title='title' \
389     --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
390     --copy-default --make-default
391     grub2Test grub2.1 add/g2-1.3 --add-kernel=/boot/new-kernel.img --title='title' \
392     --boot-filesystem=/boot/ --copy-default --make-default
393 niro 1727 grub2Test grub2.1 remove/g2-1.4 --remove-kernel=/boot/vmlinuz-2.6.38.2-9.fc15.x86_64 \
394     --boot-filesystem=/boot/
395 niro 1837 grub2Test grub2.5 add/g2-1.5 --add-kernel=/boot/new-kernel.img --title='title' \
396     --initrd=/boot/new-initrd --boot-filesystem=/boot/ --copy-default
397 niro 1698
398     testing="GRUB2 add initrd"
399     grub2Test grub2.2 add/g2-1.4 --update-kernel=/boot/new-kernel.img \
400     --initrd=/boot/new-initrd --boot-filesystem=/boot/
401    
402 niro 1720 testing="GRUB2 display default index"
403     grub2DisplayTest grub2.1 defaultindex/0 --default-index
404     grub2DisplayTest grub2.2 defaultindex/0 --default-index
405    
406 niro 1737 testing="GRUB2 display default title"
407 niro 1721 grub2DisplayTest grub2.1 defaulttitle/g2.1 --default-title
408     grub2DisplayTest grub2.2 defaulttitle/g2.2 --default-title
409    
410 niro 1737 testing="GRUB2 display debug failure"
411 niro 1741 grub2DisplayTest grub2.1 debug/g2.1 --bad-image-bad --boot-filesystem=/boot --default-kernel --debug
412 niro 1737 testing="GRUB2 display debug success"
413 niro 1741 grub2DisplayTest grub2.1 debug/g2.1.2 --boot-filesystem=/boot --default-kernel --debug
414 niro 1737
415 niro 1801 testing="GRUB2 remove kernel via index"
416     grub2Test grub2.3 remove/g2-1.1 --remove-kernel=1
417    
418     testing="GRUB2 remove kernel via title"
419     grub2Test grub2.3 remove/g2-1.1 --remove-kernel="TITLE=title2"
420    
421     testing="GRUB2 (submenu) remove kernel via index"
422     grub2Test grub2.4 remove/g2-1.2 --remove-kernel=2
423    
424     testing="GRUB2 (submenu) remove kernel via title"
425     grub2Test grub2.4 remove/g2-1.2 --remove-kernel="TITLE=title2"
426    
427 niro 1861 testing="GRUB2 default index directive"
428     grub2Test grub2.1 setdefaultindex/g2.1.0 --set-default-index=0
429     grub2Test grub2.1 setdefaultindex/g2.1.1 --set-default-index=1
430     grub2Test grub2.1 setdefaultindex/g2.1.9 --set-default-index=9
431    
432 niro 1308 testing="YABOOT add kernel"
433 niro 532 yabootTest yaboot.1 add/y1.1 --copy-default --boot-filesystem=/ --add-kernel=/boot/new-kernel \
434     --title=newtitle
435     yabootTest yaboot.1 add/y1.2 --add-kernel=/boot/new-kernel --boot-filesystem=/ --title=newtitle
436    
437 niro 1308 testing="YABOOT empty label"
438 niro 532 yabootTest yaboot.3 add/y3.1 --add-kernel=/boot/new-kernel --boot-filesystem=/ --title=newtitle
439    
440 niro 1308 testing="Z/IPL add kernel"
441 niro 532 ziplTest zipl.1 add/z1.1 --add-kernel=/boot/new-kernel.img --title test
442     ziplTest zipl.1 add/z1.2 --add-kernel=/boot/new-kernel.img --title test --copy-default
443    
444 niro 1308 testing="LILO long titles"
445 niro 532 liloTest lilo.1 longtitle/l1.1 --add-kernel=/boot/new-kernel.img \
446     --title="linux-longtitle" --copy-default --boot-filesystem=/boot
447     liloTest lilo.1 longtitle/l1.2 --add-kernel=/boot/new-kernel.img \
448     --title="linux-toolongtitle" --copy-default --boot-filesystem=/boot
449     liloTest lilo.7 longtitle/l7.1 --add-kernel=/boot/new-kernel.img \
450     --title="linux-longtitle-fix" --copy-default --boot-filesystem=/boot
451    
452 niro 1308 testing="ELILO long titles"
453 niro 532 eliloTest lilo.7 longtitle/e7.1 --add-kernel=/boot/new-kernel.img \
454     --title="linux-longtitle-fix" --copy-default --boot-filesystem=/boot
455    
456 niro 1308 testing="GRUB add multiboot"
457 niro 532 grubTest grub.1 multiboot/g1.1 --add-multiboot=/boot/xen.gz \
458     --add-kernel=/boot/vmlinuz-2.6.10-1.1088_FC4 --boot-filesystem=/boot \
459     --initrd=/boot/initrd-2.6.10-1.1088_FC4.img --title foo \
460     --mbargs="dom0_mem=130000"
461     grubTest grub.1 multiboot/g1.2 --add-multiboot=/boot/xen.gz \
462     --add-kernel=/boot/vmlinuz-2.6.10-1.1088_FC4 --boot-filesystem=/boot \
463     --initrd=/boot/initrd-2.6.10-1.1088_FC4.img --title foo \
464     --mbargs="dom0_mem=130000" --copy-default
465     grubTest grub.10 multiboot/g10.1 --add-multiboot=/boot/xen.gz \
466     --add-kernel=/boot/vmlinuz-2.6.10-1.1088_FC4 --boot-filesystem=/boot \
467     --initrd=/boot/initrd-2.6.10-1.1088_FC4.img --title foo \
468     --mbargs="dom0_mem=130000"
469     grubTest grub.10 multiboot/g10.2 --add-multiboot=/boot/xen.gz \
470     --add-kernel=/boot/vmlinuz-2.6.10-1.1088_FC4 --boot-filesystem=/boot \
471     --initrd=/boot/initrd-2.6.10-1.1088_FC4.img --title foo \
472     --mbargs="dom0_mem=130000" --copy-default
473     grubTest grub.10 multiboot/g10.3 --add-kernel=/boot/vmlinuz-2.6.10-1.1088_FC4 \
474     --initrd=/boot/initrd-2.6.10-1.1088_FC4.img --title foo \
475     --copy-default --boot-filesystem=/boot
476     grubTest grub.10 multiboot/g10.4 --add-kernel=/boot/vmlinuz-2.6.10-1.1088_FC4 \
477     --initrd=/boot/initrd-2.6.10-1.1088_FC4.img --title foo \
478     --boot-filesystem=/boot
479    
480 niro 1308 testing="GRUB remove multiboot"
481 niro 532 grubTest grub.10 multiboot/g10.5 --boot-filesystem=/boot \
482     --remove-kernel=/boot/vmlinuz-2.6.10-1.1076_FC4
483     grubTest grub.10 multiboot/g10.6 --boot-filesystem=/boot \
484     --remove-kernel=/boot/vmlinuz-2.6.10-1.1082_FC4
485     grubTest grub.10 multiboot/g10.7 --boot-filesystem=/boot \
486     --remove-multiboot=/boot/xen.gz
487    
488 niro 1308 testing="ELILO add multiboot"
489     eliloTest elilo.1 multiboot/e1.1 --add-multiboot=/boot/xen.gz \
490     --add-kernel=/boot/vmlinuz-2.6.10-1.1088_FC4 --boot-filesystem=/boot \
491     --initrd=/boot/initrd-2.6.10-1.1088_FC4.img --title foo \
492     --mbargs="dom0_mem=130000"
493     eliloTest elilo.1 multiboot/e1.2 --add-multiboot=/boot/xen.gz \
494     --add-kernel=/boot/vmlinuz-2.6.10-1.1088_FC4 --boot-filesystem=/boot \
495     --initrd=/boot/initrd-2.6.10-1.1088_FC4.img --title foo \
496     --mbargs="dom0_mem=130000" --copy-default
497    
498     testing="ELILO remove multiboot"
499     eliloTest elilo.2 multiboot/e2.1 --boot-filesystem=/boot \
500     --remove-kernel=/boot/vmlinuz-2.6.10-1.1076_FC4
501     eliloTest elilo.2 multiboot/e2.2 --boot-filesystem=/boot \
502     --remove-kernel=/boot/vmlinuz-2.6.10-1.1082_FC4
503     eliloTest elilo.2 multiboot/e2.3 --boot-filesystem=/boot \
504     --remove-multiboot=/boot/xen.gz
505    
506     printf "\n%d (%d%%) tests passed, %d (%d%%) tests failed\n" \
507     $pass $(((100*pass)/(pass+fail))) \
508     $fail $(((100*fail)/(pass+fail)))
509    
510     exit $(( !!fail ))

Properties

Name Value
svn:executable *