Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1737 - (hide annotations) (download) (as text)
Sat Feb 18 01:02:56 2012 UTC (12 years, 2 months ago) by niro
Original Path: trunk/grubby/test.sh
File MIME type: application/x-sh
File size: 20047 byte(s)
Add a test case for --debug.

Make sure --debug works as expected in both successful and failed
attempts.


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 1737 runme=( ./grubby "$mode" $BIO -c "$cfg" "$@")
85     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     "${runme[@]}" | diff -U30 "$cfg" -
92     echo
93     fi
94     else
95     (( fail++ ))
96     echo -------------------------------------------------------------
97     echo -n "FAIL: "
98     printf "%q " "${runme[@]}"; echo
99     "${runme[@]}" | diff -U30 "$correct" -
100     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 532
130 niro 1308 testing="Parse/write comparison"
131     for n in test/*.[0-9]*; do
132     n=${n#*/} # remove test/
133     b=${n%.*} # remove suffix
134     [[ $b == $opt_bootloader ]] || continue
135     ${b}Test $n ../$n --remove-kernel 1234
136 niro 532 done
137    
138 niro 1308 testing="Permission preservation"
139     unset b
140     for n in test/*.[0-9]*; do
141     n=${n#*/} # remove test/
142     [[ ${n%.*} == "$b" ]] && continue
143     b=${n%.*} # remove suffix
144     [[ $b == $opt_bootloader ]] || continue
145    
146     echo "$testing ... --$b"
147    
148     cp test/$n ${b}-test
149     chmod 0614 ${b}-test
150     touch -t 200301010101.00 ${b}-test
151     time=$(ls -l ${b}-test | awk '{ print $6 " " $7 " "$8}')
152     perm=$(ls -l ${b}-test | awk '{print $1}')
153     ./grubby --${b} --add-kernel bar --title title -c ${b}-test
154     if [[ $? != 0 ]]; then
155     echo " FAIL (grubby returned non-zero)"
156     (( fail++ ))
157     elif newtime=$(ls -l ${b}-test | awk '{ print $6 " " $7 " "$8}') && \
158     newperm=$(ls -l ${b}-test | awk '{print $1}') && \
159     [[ $time == "$newtime" || $perm != "$newperm" ]]
160     then
161     echo " FAIL ($perm $newperm)";
162     (( fail++ ))
163     else
164     (( pass++ ))
165     fi
166     rm -f ${b}-test
167 niro 532 done
168    
169 niro 1308 testing="Following symlinks"
170     unset b
171     for n in test/*.[0-9]*; do
172     n=${n#*/} # remove test/
173     [[ ${n%.*} == "$b" ]] && continue
174     b=${n%.*} # remove suffix
175     [[ $b == $opt_bootloader ]] || continue
176 niro 532
177 niro 1308 echo "$testing ... --$b"
178 niro 532
179 niro 1308 cp test/${b}.1 ${b}-test
180     ln -s ./${b}-test mytest
181     ./grubby --${b} --add-kernel bar --title title -c mytest
182     if [[ $? != 0 ]]; then
183     echo " failed (grubby returned non-zero)"
184     (( fail++ ))
185     elif [[ ! -L mytest ]]; then
186     echo " failed (not a symlink)"
187     (( fail++ ))
188     elif target=$(readlink mytest) && [[ $target != "./${b}-test" ]]; then
189     echo " failed (wrong target)"
190     (( fail++ ))
191     else
192     (( pass++ ))
193     fi
194     rm -f ${b}-test mytest
195     done
196 niro 532
197 niro 1308 testing="GRUB default directive"
198 niro 532 grubTest grub.1 default/g1.1 --boot-filesystem=/boot --add-kernel /boot/new-kernel --title Some_Title
199     grubTest grub.1 default/g1.2 --boot-filesystem=/boot --add-kernel /boot/new-kernel --title Some_Title --make-default
200     grubTest grub.3 default/g3.1 --boot-filesystem=/boot --set-default=/boot/vmlinuz-2.4.7-2
201     grubTest grub.3 default/g3.2 --boot-filesystem=/boot --set-default=/boot/vmlinuz-2.4.7-2smp
202     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
203     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
204     grubTest grub.6 default/g6.1 --remove-kernel=/boot/vmlinuz-2.4.7-2.9 --boot-filesystem=/
205    
206 niro 1720 testing="GRUB display default index"
207     grubDisplayTest grub.1 defaultindex/0 --default-index
208     grubDisplayTest grub.2 defaultindex/0 --default-index
209     grubDisplayTest grub.3 defaultindex/0 --default-index
210     grubDisplayTest grub.4 defaultindex/0 --default-index
211     grubDisplayTest grub.5 defaultindex/0 --default-index
212     grubDisplayTest grub.6 defaultindex/2 --default-index
213     grubDisplayTest grub.7 defaultindex/2 --default-index
214     grubDisplayTest grub.8 defaultindex/0 --default-index
215     grubDisplayTest grub.9 defaultindex/0 --default-index
216     grubDisplayTest grub.10 defaultindex/0 --default-index
217     grubDisplayTest grub.10 defaultindex/0 --default-index
218    
219 niro 1721 testing="GRUB display default title"
220     grubDisplayTest grub.1 defaulttitle/g.1 --default-title
221     grubDisplayTest grub.2 defaulttitle/g.2 --default-title
222     grubDisplayTest grub.3 defaulttitle/g.3 --default-title
223     grubDisplayTest grub.4 defaulttitle/g.4 --default-title
224     grubDisplayTest grub.5 defaulttitle/g.5 --default-title
225     grubDisplayTest grub.6 defaulttitle/g.6 --default-title
226     grubDisplayTest grub.7 defaulttitle/g.7 --default-title
227     grubDisplayTest grub.8 defaulttitle/g.8 --default-title
228     grubDisplayTest grub.9 defaulttitle/g.9 --default-title
229     grubDisplayTest grub.10 defaulttitle/g.10 --default-title
230     grubDisplayTest grub.11 defaulttitle/g.11 --default-title
231    
232 niro 1308 testing="LILO default directive"
233 niro 532 liloTest lilo.1 default/l1.1 --set-default=/boot/vmlinuz-2.4.18-4
234     liloTest lilo.1 default/l1.2 --remove-kernel=/boot/vmlinuz-2.4.18-4smp
235     liloTest lilo.1 default/l1.3 --add-kernel /boot/kernel --title label \
236     --copy-default
237     liloTest lilo.1 default/l1.4 --add-kernel /boot/kernel --title label \
238     --copy-default --make-default
239    
240 niro 1308 testing="Z/IPL default directive"
241 niro 532 ziplTest zipl.1 default/z1.1 --add-kernel /boot/new-kernel --title test
242     ziplTest zipl.1 default/z1.2 --add-kernel /boot/new-kernel --title test --make-default
243    
244 niro 1308 testing="GRUB fallback directive"
245 niro 532 grubTest grub.5 fallback/g5.1 --remove-kernel=/boot/vmlinuz-2.4.7-ac3 \
246     --boot-filesystem=/
247     grubTest grub.5 fallback/g5.2 --remove-kernel=/boot/vmlinuz-2.4.7-2.5 \
248     --boot-filesystem=/
249     grubTest grub.5 fallback/g5.3 --remove-kernel=/boot/vmlinuz-2.4.7-2.5 \
250     --boot-filesystem=/ --copy-default --add-kernel=/boot/new-kernel \
251     --title="Some_Title"
252    
253 niro 1308 testing="GRUB new kernel argument handling"
254 niro 532 grubTest grub.1 args/g1.1 --boot-filesystem=/boot \
255     --add-kernel=/boot/foo --title=some_title --args="1234" --copy-default
256     grubTest grub.1 args/g1.2 --boot-filesystem=/boot \
257     --add-kernel=/boot/foo --title=some_title --args="1234"
258    
259 niro 1308 testing="GRUB remove kernel"
260 niro 532 grubTest grub.7 remove/g7.1 --boot-filesystem=/ \
261     --remove-kernel=/boot/vmlinuz-2.4.7-2.5
262     grubTest grub.3 remove/g3.1 --boot-filesystem=/ \
263     --remove-kernel=DEFAULT
264     grubTest grub.9 remove/g9.1 --boot-filesystem=/boot \
265     --remove-kernel=/boot/vmlinuz-2.4.7-2
266    
267 niro 1308 testing="YABOOT remove kernel"
268 niro 532 yabootTest yaboot.1 remove/y1.1 --boot-filesystem=/ --remove-kernel=DEFAULT
269     yabootTest yaboot.1 remove/y1.2 --boot-filesystem=/ --remove-kernel=/boot/vmlinuz-2.5.50-eepro
270     yabootTest yaboot.2 remove/y2.1 --boot-filesystem=/ --remove-kernel=/boot/vmlinux-2.5.50
271    
272 niro 1308 testing="Z/IPL remove kernel"
273 niro 532 ziplTest zipl.1 remove/z1.1 --remove-kernel=/boot/vmlinuz-2.4.9-38
274     ziplTest zipl.1 remove/z1.2 --remove-kernel=DEFAULT
275    
276 niro 1308 testing="GRUB update kernel argument handling"
277 niro 532 grubTest grub.1 updargs/g1.1 --update-kernel=DEFAULT --args="root=/dev/hda1"
278     grubTest grub.1 updargs/g1.2 --update-kernel=DEFAULT \
279     --args="root=/dev/hda1 hda=ide-scsi root=/dev/hda2"
280     grubTest grub.3 updargs/g3.1 --update-kernel=DEFAULT --args "hdd=notide-scsi"
281     grubTest grub.3 updargs/g3.2 --update-kernel=DEFAULT \
282     --args "hdd=notide-scsi root=/dev/hdd1"
283     grubTest grub.3 updargs/g3.2 --update-kernel=DEFAULT \
284     --args "root=/dev/hdd1 hdd=notide-scsi"
285     grubTest grub.3 updargs/g3.4 --update-kernel=ALL --remove-args="hdd"
286     grubTest grub.3 updargs/g3.4 --update-kernel=ALL --remove-args="hdd=ide-scsi"
287     grubTest grub.3 updargs/g3.4 --update-kernel=ALL --remove-args="hdd=foobar"
288     grubTest grub.3 updargs/g3.7 --update-kernel=ALL \
289     --remove-args="hdd root ro"
290     grubTest grub.7 updargs/g7.2 --boot-filesystem=/ \
291     --update-kernel=ALL --args "hde=ide-scsi"
292     grubTest grub.7 updargs/g7.2 --boot-filesystem=/ \
293     --update-kernel=ALL --args "hde=ide-scsi"
294     grubTest grub.7 updargs/g7.3 --boot-filesystem=/ \
295     --update-kernel=DEFAULT --args "hde=ide-scsi"
296     grubTest grub.7 updargs/g7.4 --boot-filesystem=/ \
297     --update-kernel=/vmlinuz-2.4.7-2 \
298     --args "ro root=LABEL=/ console=tty0 console=ttyS1,9600n81 single"
299 niro 1308 grubTest grub.7 updargs/g7.5 --boot-filesystem=/ \
300     --update-kernel=ALL --args "root=/dev/hda2"
301 niro 532 grubTest grub.11 updargs/g11.1 --boot-filesystem=/ \
302     --update-kernel=/vmlinuz-2.4.7-2smp \
303     --args "ro root=LABEL=/ console=tty0 console=ttyS1,9600n81 single"
304     grubTest grub.11 updargs/g11.2 --boot-filesystem=/ \
305     --update-kernel=/vmlinuz-2.4.7-2smp \
306     --args "ro root=LABEL=/ single"
307    
308 niro 1308 testing="LILO update kernel argument handling"
309 niro 532 liloTest lilo.1 updargs/l1.1 --update-kernel=/boot/vmlinuz-2.4.18-4 \
310     --args="root=/dev/md1"
311     liloTest lilo.1 updargs/l1.2 --update-kernel=/boot/vmlinuz-2.4.18-4smp \
312     --args="root=LABEL=foo"
313     liloTest lilo.1 updargs/l1.3 --update-kernel=DEFAULT --args="foo"
314     liloTest lilo.1 updargs/l1.4 --update-kernel=ALL --args="foo bar root=/dev/md1"
315     liloTest lilo.1 updargs/l1.4 --update-kernel=ALL --args="foo root=/dev/md1 bar"
316     liloTest lilo.1 updargs/l1.6 --update-kernel=ALL --args="foo root=LABEL=/ bar"
317     liloTest lilo.3 updargs/l3.1 --update-kernel=/boot/vmlinuz-2.4.18-4 \
318     --remove-args="hda"
319     liloTest lilo.3 updargs/l3.2 --update-kernel=ALL \
320     --remove-args="single" --args "root=/dev/hda2"
321    
322 niro 1308 testing="LILO add kernel"
323 niro 532 liloTest lilo.4 add/l4.1 --add-kernel=/boot/new-kernel.img --title="title" \
324     --copy-default --boot-filesystem=/boot
325     liloTest lilo.4 add/l4.2 --add-kernel=/boot/new-kernel.img --title="linux" \
326     --copy-default --boot-filesystem=/boot --remove-kernel "TITLE=linux"
327     liloTest lilo.5 add/l5.1 --add-kernel=/boot/new-kernel.img --title="title" \
328     --copy-default --boot-filesystem=/boot
329     liloTest lilo.5 add/l5.2 --add-kernel=/boot/new-kernel.img --title="linux" \
330     --copy-default --boot-filesystem=/boot --remove-kernel "TITLE=linux"
331     liloTest lilo.6 add/l6.1 --add-kernel=/boot/new-kernel.img --title="title" \
332     --initrd=/boot/new-initrd --copy-default --boot-filesystem=/boot
333     liloTest lilo.6 add/l6.2 --add-kernel=/boot/new-kernel.img --title="linux" \
334     --initrd=/boot/new-initrd --copy-default --boot-filesystem=/boot --remove-kernel "TITLE=linux"
335    
336    
337 niro 1308 testing="GRUB add kernel"
338 niro 532 grubTest grub.1 add/g1.1 --add-kernel=/boot/new-kernel.img --title='title' \
339     --initrd=/boot/new-initrd --boot-filesystem=/
340     grubTest grub.1 add/g1.2 --add-kernel=/boot/new-kernel.img --title='title' \
341     --initrd=/boot/new-initrd --boot-filesystem=/boot
342     grubTest grub.1 add/g1.3 --add-kernel=/boot/new-kernel.img --title='title' \
343     --initrd=/boot/new-initrd --boot-filesystem=/ --copy-default
344     grubTest grub.1 add/g1.4 --add-kernel=/boot/new-kernel.img --title='title' \
345     --initrd=/boot/new-initrd --boot-filesystem=/boot --copy-default
346 niro 1308 grubTest grub.1 add/g1.5 --add-kernel=/boot/new-kernel.img --title='title' \
347     --initrd=/boot/new-initrd --extra-initrd=/boot/extra-initrd --boot-filesystem=/
348     grubTest grub.1 add/g1.6 --add-kernel=/boot/new-kernel.img --title='title' \
349     --initrd=/boot/new-initrd --extra-initrd=/boot/extra-initrd --boot-filesystem=/boot
350 niro 532 grubTest grub.2 add/g2.1 --add-kernel=/boot/vmlinuz-2.4.7-2 \
351     --initrd=/boot/initrd-2.4.7-new.img --boot-filesystem=/boot --copy-default \
352     --title="Red Hat Linux (2.4.7-2)" \
353     --remove-kernel="TITLE=Red Hat Linux (2.4.7-2)"
354     grubTest grub.8 add/g8.1 --add-kernel=/boot/new-kernel.img --title='title' \
355     --initrd=/boot/new-initrd --boot-filesystem=/boot --copy-default
356     grubTest grub.8 add/g8.2 --add-kernel=/boot/new-kernel.img --title='title' \
357     --initrd=/boot/new-initrd --boot-filesystem=/boot --copy-default \
358     --args='console=tty0 console=ttyS1,9600n81 single'
359     grubTest grub.11 add/g11.1 --add-kernel=/boot/new-kernel.img --title='title' \
360     --initrd=/boot/new-initrd --boot-filesystem=/boot --copy-default \
361     --args='console=tty0 console=ttyS1,9600n81 single'
362    
363 niro 1698 testing="GRUB2 add kernel"
364     grub2Test grub2.1 add/g2-1.1 --add-kernel=/boot/new-kernel.img --title='title' \
365     --initrd=/boot/new-initrd --boot-filesystem=/boot/ --copy-default
366     grub2Test grub2.1 add/g2-1.2 --add-kernel=/boot/new-kernel.img --title='title' \
367     --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
368     --copy-default --make-default
369     grub2Test grub2.1 add/g2-1.3 --add-kernel=/boot/new-kernel.img --title='title' \
370     --boot-filesystem=/boot/ --copy-default --make-default
371 niro 1727 grub2Test grub2.1 remove/g2-1.4 --remove-kernel=/boot/vmlinuz-2.6.38.2-9.fc15.x86_64 \
372     --boot-filesystem=/boot/
373 niro 1698
374     testing="GRUB2 add initrd"
375     grub2Test grub2.2 add/g2-1.4 --update-kernel=/boot/new-kernel.img \
376     --initrd=/boot/new-initrd --boot-filesystem=/boot/
377    
378 niro 1720 testing="GRUB2 display default index"
379     grub2DisplayTest grub2.1 defaultindex/0 --default-index
380     grub2DisplayTest grub2.2 defaultindex/0 --default-index
381    
382 niro 1737 testing="GRUB2 display default title"
383 niro 1721 grub2DisplayTest grub2.1 defaulttitle/g2.1 --default-title
384     grub2DisplayTest grub2.2 defaulttitle/g2.2 --default-title
385    
386 niro 1737 testing="GRUB2 display debug failure"
387     grub2DisplayTest grub2.1 debug/g2.1 --bad-image-bad --default-kernel --debug
388     testing="GRUB2 display debug success"
389     grub2DisplayTest grub2.1 debug/g2.1.2 --default-kernel --debug
390    
391 niro 1308 testing="YABOOT add kernel"
392 niro 532 yabootTest yaboot.1 add/y1.1 --copy-default --boot-filesystem=/ --add-kernel=/boot/new-kernel \
393     --title=newtitle
394     yabootTest yaboot.1 add/y1.2 --add-kernel=/boot/new-kernel --boot-filesystem=/ --title=newtitle
395    
396 niro 1308 testing="YABOOT empty label"
397 niro 532 yabootTest yaboot.3 add/y3.1 --add-kernel=/boot/new-kernel --boot-filesystem=/ --title=newtitle
398    
399 niro 1308 testing="Z/IPL add kernel"
400 niro 532 ziplTest zipl.1 add/z1.1 --add-kernel=/boot/new-kernel.img --title test
401     ziplTest zipl.1 add/z1.2 --add-kernel=/boot/new-kernel.img --title test --copy-default
402    
403 niro 1308 testing="LILO long titles"
404 niro 532 liloTest lilo.1 longtitle/l1.1 --add-kernel=/boot/new-kernel.img \
405     --title="linux-longtitle" --copy-default --boot-filesystem=/boot
406     liloTest lilo.1 longtitle/l1.2 --add-kernel=/boot/new-kernel.img \
407     --title="linux-toolongtitle" --copy-default --boot-filesystem=/boot
408     liloTest lilo.7 longtitle/l7.1 --add-kernel=/boot/new-kernel.img \
409     --title="linux-longtitle-fix" --copy-default --boot-filesystem=/boot
410    
411 niro 1308 testing="ELILO long titles"
412 niro 532 eliloTest lilo.7 longtitle/e7.1 --add-kernel=/boot/new-kernel.img \
413     --title="linux-longtitle-fix" --copy-default --boot-filesystem=/boot
414    
415 niro 1308 testing="GRUB add multiboot"
416 niro 532 grubTest grub.1 multiboot/g1.1 --add-multiboot=/boot/xen.gz \
417     --add-kernel=/boot/vmlinuz-2.6.10-1.1088_FC4 --boot-filesystem=/boot \
418     --initrd=/boot/initrd-2.6.10-1.1088_FC4.img --title foo \
419     --mbargs="dom0_mem=130000"
420     grubTest grub.1 multiboot/g1.2 --add-multiboot=/boot/xen.gz \
421     --add-kernel=/boot/vmlinuz-2.6.10-1.1088_FC4 --boot-filesystem=/boot \
422     --initrd=/boot/initrd-2.6.10-1.1088_FC4.img --title foo \
423     --mbargs="dom0_mem=130000" --copy-default
424     grubTest grub.10 multiboot/g10.1 --add-multiboot=/boot/xen.gz \
425     --add-kernel=/boot/vmlinuz-2.6.10-1.1088_FC4 --boot-filesystem=/boot \
426     --initrd=/boot/initrd-2.6.10-1.1088_FC4.img --title foo \
427     --mbargs="dom0_mem=130000"
428     grubTest grub.10 multiboot/g10.2 --add-multiboot=/boot/xen.gz \
429     --add-kernel=/boot/vmlinuz-2.6.10-1.1088_FC4 --boot-filesystem=/boot \
430     --initrd=/boot/initrd-2.6.10-1.1088_FC4.img --title foo \
431     --mbargs="dom0_mem=130000" --copy-default
432     grubTest grub.10 multiboot/g10.3 --add-kernel=/boot/vmlinuz-2.6.10-1.1088_FC4 \
433     --initrd=/boot/initrd-2.6.10-1.1088_FC4.img --title foo \
434     --copy-default --boot-filesystem=/boot
435     grubTest grub.10 multiboot/g10.4 --add-kernel=/boot/vmlinuz-2.6.10-1.1088_FC4 \
436     --initrd=/boot/initrd-2.6.10-1.1088_FC4.img --title foo \
437     --boot-filesystem=/boot
438    
439 niro 1308 testing="GRUB remove multiboot"
440 niro 532 grubTest grub.10 multiboot/g10.5 --boot-filesystem=/boot \
441     --remove-kernel=/boot/vmlinuz-2.6.10-1.1076_FC4
442     grubTest grub.10 multiboot/g10.6 --boot-filesystem=/boot \
443     --remove-kernel=/boot/vmlinuz-2.6.10-1.1082_FC4
444     grubTest grub.10 multiboot/g10.7 --boot-filesystem=/boot \
445     --remove-multiboot=/boot/xen.gz
446    
447 niro 1308 testing="ELILO add multiboot"
448     eliloTest elilo.1 multiboot/e1.1 --add-multiboot=/boot/xen.gz \
449     --add-kernel=/boot/vmlinuz-2.6.10-1.1088_FC4 --boot-filesystem=/boot \
450     --initrd=/boot/initrd-2.6.10-1.1088_FC4.img --title foo \
451     --mbargs="dom0_mem=130000"
452     eliloTest elilo.1 multiboot/e1.2 --add-multiboot=/boot/xen.gz \
453     --add-kernel=/boot/vmlinuz-2.6.10-1.1088_FC4 --boot-filesystem=/boot \
454     --initrd=/boot/initrd-2.6.10-1.1088_FC4.img --title foo \
455     --mbargs="dom0_mem=130000" --copy-default
456    
457     testing="ELILO remove multiboot"
458     eliloTest elilo.2 multiboot/e2.1 --boot-filesystem=/boot \
459     --remove-kernel=/boot/vmlinuz-2.6.10-1.1076_FC4
460     eliloTest elilo.2 multiboot/e2.2 --boot-filesystem=/boot \
461     --remove-kernel=/boot/vmlinuz-2.6.10-1.1082_FC4
462     eliloTest elilo.2 multiboot/e2.3 --boot-filesystem=/boot \
463     --remove-multiboot=/boot/xen.gz
464    
465     printf "\n%d (%d%%) tests passed, %d (%d%%) tests failed\n" \
466     $pass $(((100*pass)/(pass+fail))) \
467     $fail $(((100*fail)/(pass+fail)))
468    
469     exit $(( !!fail ))

Properties

Name Value
svn:executable *