Annotation of /trunk/grubby/test.sh
Parent Directory | Revision Log
Revision 3009 -
(hide annotations)
(download)
(as text)
Tue Jun 27 14:29:55 2017 UTC (7 years, 3 months ago) by niro
File MIME type: application/x-sh
File size: 34899 byte(s)
Tue Jun 27 14:29:55 2017 UTC (7 years, 3 months ago) by niro
File MIME type: application/x-sh
File size: 34899 byte(s)
Add a test case for a failure rmarshall saw in --set-index=
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 | 2252 | local ENV_FILE="" |
52 | if [ "$mode" == "--grub2" ]; then | ||
53 | ENV_FILE="test/grub2-support_files/env_temp" | ||
54 | if [ "$1" == "--env" ]; then | ||
55 | cp "test/grub2-support_files/$2" "$ENV_FILE" | ||
56 | shift 2 | ||
57 | else | ||
58 | cp "test/grub2-support_files/grubenv.0" "$ENV_FILE" | ||
59 | fi | ||
60 | ENV_FILE="--env=$ENV_FILE" | ||
61 | fi | ||
62 | |||
63 | |||
64 | niro | 1308 | echo "$testing ... $mode $cfg $correct" |
65 | niro | 2252 | runme=( ./grubby "$mode" --bad-image-okay $ENV_FILE -c "$cfg" -o - "$@" ) |
66 | niro | 1308 | if "${runme[@]}" | cmp "$correct" > /dev/null; then |
67 | (( pass++ )) | ||
68 | if $opt_verbose; then | ||
69 | echo ------------------------------------------------------------- | ||
70 | echo -n "PASS: " | ||
71 | printf "%q " "${runme[@]}"; echo | ||
72 | "${runme[@]}" | diff -U30 "$cfg" - | ||
73 | echo | ||
74 | fi | ||
75 | else | ||
76 | (( fail++ )) | ||
77 | niro | 532 | echo ------------------------------------------------------------- |
78 | niro | 1308 | echo -n "FAIL: " |
79 | printf "%q " "${runme[@]}"; echo | ||
80 | "${runme[@]}" | diff -U30 "$correct" - | ||
81 | echo | ||
82 | niro | 532 | fi |
83 | } | ||
84 | |||
85 | niro | 1719 | # Test feature that display some information, checking that output instead of |
86 | # the generated configuration file | ||
87 | oneDisplayTest() { | ||
88 | typeset mode=$1 cfg=test/$2 correct=test/results/$3 | ||
89 | shift 3 | ||
90 | niro | 2252 | |
91 | local ENV_FILE="" | ||
92 | if [ "$mode" == "--grub2" ]; then | ||
93 | ENV_FILE="test/grub2-support_files/env_temp" | ||
94 | if [ "$1" == "--env" ]; then | ||
95 | cp "test/grub2-support_files/$2" "$ENV_FILE" | ||
96 | shift 2 | ||
97 | else | ||
98 | cp "test/grub2-support_files/grubenv.0" "$ENV_FILE" | ||
99 | fi | ||
100 | ENV_FILE="--env=$ENV_FILE" | ||
101 | fi | ||
102 | |||
103 | niro | 1737 | local BIO="--bad-image-okay" |
104 | if [ "$1" == "--bad-image-bad" ]; then | ||
105 | BIO="" | ||
106 | shift | ||
107 | fi | ||
108 | niro | 1719 | |
109 | echo "$testing ... $mode $cfg $correct" | ||
110 | niro | 2252 | runme=( ./grubby "$mode" $BIO $ENV_FILE -c "$cfg" "$@" ) |
111 | niro | 1856 | if "${runme[@]}" 2>&1 | cmp "$correct" > /dev/null; then |
112 | niro | 1719 | (( pass++ )) |
113 | if $opt_verbose; then | ||
114 | echo ------------------------------------------------------------- | ||
115 | echo -n "PASS: " | ||
116 | printf "%q " "${runme[@]}"; echo | ||
117 | niro | 1856 | "${runme[@]}" 2>&1 | diff -U30 "$cfg" - |
118 | niro | 1719 | echo |
119 | fi | ||
120 | else | ||
121 | (( fail++ )) | ||
122 | echo ------------------------------------------------------------- | ||
123 | echo -n "FAIL: " | ||
124 | printf "%q " "${runme[@]}"; echo | ||
125 | niro | 1856 | "${runme[@]}" 2>&1 | diff -U30 "$correct" - |
126 | niro | 1719 | echo |
127 | fi | ||
128 | } | ||
129 | |||
130 | niro | 2252 | commandTest() { |
131 | description=$1 | ||
132 | cmd0=$2 | ||
133 | text1=$3 | ||
134 | shift 3 | ||
135 | echo "$description" | ||
136 | output0=$(mktemp) | ||
137 | |||
138 | $cmd0 > $output0 | ||
139 | |||
140 | if echo $text1 | cmp $output0 - >/dev/null; then | ||
141 | (( pass++)) | ||
142 | if $opt_verbose; then | ||
143 | echo ------------------------------------------------------------- | ||
144 | echo -n "PASS: " | ||
145 | printf "%q " "\"$cmd0\""; echo | ||
146 | echo $text1 | diff -U30 $output0 - | ||
147 | echo | ||
148 | fi | ||
149 | else | ||
150 | (( fail++ )) | ||
151 | echo ------------------------------------------------------------- | ||
152 | echo -n "FAIL: " | ||
153 | printf "%q " "\"$cmd0\""; echo | ||
154 | echo $text1 | diff -U30 $output0 - | ||
155 | echo | ||
156 | fi | ||
157 | } | ||
158 | |||
159 | niro | 1308 | # generate convenience functions |
160 | for b in $(./grubby --help | \ | ||
161 | niro | 2693 | sed -n 's/^.*--\([^ ]*\) *configure \1 bootloader.*/\1/p'); do |
162 | niro | 1308 | eval "${b}Test() { [[ \"$b\" == \$opt_bootloader ]] && oneTest --$b \"\$@\"; }" |
163 | niro | 1719 | eval "${b}DisplayTest() { [[ \"$b\" == \$opt_bootloader ]] && oneDisplayTest --$b \"\$@\"; }" |
164 | niro | 1308 | done |
165 | niro | 532 | |
166 | niro | 1308 | #---------------------------------------------------------------------- |
167 | # Main | ||
168 | #---------------------------------------------------------------------- | ||
169 | niro | 532 | |
170 | niro | 1308 | # Use /usr/bin/getopt which supports GNU-style long options |
171 | args=$(getopt -o b:hv --long bootloader,help,verbose -n "$cmd" -- "$@") || exit | ||
172 | eval set -- "$args" | ||
173 | while true; do | ||
174 | case $1 in | ||
175 | -b|--bootloader) opt_bootloader=$2; shift 2 ;; | ||
176 | -h|--help) echo "$usage"; exit 0 ;; | ||
177 | -v|--verbose) opt_verbose=true; shift ;; | ||
178 | --) shift; break ;; | ||
179 | *) echo "failed to process cmdline args" >&2; exit 1 ;; | ||
180 | esac | ||
181 | done | ||
182 | niro | 532 | |
183 | niro | 1308 | export MALLOC_CHECK_=2 |
184 | niro | 1858 | if [ -n "${RANDOM}" ]; then |
185 | export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) | ||
186 | else | ||
187 | export MALLOC_PERTURB_=1 | ||
188 | fi | ||
189 | niro | 532 | |
190 | niro | 1308 | testing="Parse/write comparison" |
191 | for n in test/*.[0-9]*; do | ||
192 | niro | 1861 | [ -d $n ] && continue |
193 | niro | 1308 | n=${n#*/} # remove test/ |
194 | b=${n%.*} # remove suffix | ||
195 | [[ $b == $opt_bootloader ]] || continue | ||
196 | ${b}Test $n ../$n --remove-kernel 1234 | ||
197 | niro | 532 | done |
198 | |||
199 | niro | 1308 | testing="Permission preservation" |
200 | unset b | ||
201 | for n in test/*.[0-9]*; do | ||
202 | n=${n#*/} # remove test/ | ||
203 | [[ ${n%.*} == "$b" ]] && continue | ||
204 | b=${n%.*} # remove suffix | ||
205 | [[ $b == $opt_bootloader ]] || continue | ||
206 | |||
207 | echo "$testing ... --$b" | ||
208 | |||
209 | cp test/$n ${b}-test | ||
210 | chmod 0614 ${b}-test | ||
211 | touch -t 200301010101.00 ${b}-test | ||
212 | time=$(ls -l ${b}-test | awk '{ print $6 " " $7 " "$8}') | ||
213 | perm=$(ls -l ${b}-test | awk '{print $1}') | ||
214 | ./grubby --${b} --add-kernel bar --title title -c ${b}-test | ||
215 | if [[ $? != 0 ]]; then | ||
216 | echo " FAIL (grubby returned non-zero)" | ||
217 | (( fail++ )) | ||
218 | elif newtime=$(ls -l ${b}-test | awk '{ print $6 " " $7 " "$8}') && \ | ||
219 | newperm=$(ls -l ${b}-test | awk '{print $1}') && \ | ||
220 | [[ $time == "$newtime" || $perm != "$newperm" ]] | ||
221 | then | ||
222 | echo " FAIL ($perm $newperm)"; | ||
223 | (( fail++ )) | ||
224 | else | ||
225 | (( pass++ )) | ||
226 | fi | ||
227 | rm -f ${b}-test | ||
228 | niro | 532 | done |
229 | |||
230 | niro | 1308 | testing="Following symlinks" |
231 | unset b | ||
232 | for n in test/*.[0-9]*; do | ||
233 | n=${n#*/} # remove test/ | ||
234 | [[ ${n%.*} == "$b" ]] && continue | ||
235 | b=${n%.*} # remove suffix | ||
236 | [[ $b == $opt_bootloader ]] || continue | ||
237 | niro | 532 | |
238 | niro | 1308 | echo "$testing ... --$b" |
239 | niro | 532 | |
240 | niro | 1308 | cp test/${b}.1 ${b}-test |
241 | ln -s ./${b}-test mytest | ||
242 | ./grubby --${b} --add-kernel bar --title title -c mytest | ||
243 | if [[ $? != 0 ]]; then | ||
244 | echo " failed (grubby returned non-zero)" | ||
245 | (( fail++ )) | ||
246 | elif [[ ! -L mytest ]]; then | ||
247 | echo " failed (not a symlink)" | ||
248 | (( fail++ )) | ||
249 | elif target=$(readlink mytest) && [[ $target != "./${b}-test" ]]; then | ||
250 | echo " failed (wrong target)" | ||
251 | (( fail++ )) | ||
252 | else | ||
253 | (( pass++ )) | ||
254 | fi | ||
255 | rm -f ${b}-test mytest | ||
256 | done | ||
257 | niro | 532 | |
258 | niro | 1308 | testing="GRUB default directive" |
259 | niro | 532 | grubTest grub.1 default/g1.1 --boot-filesystem=/boot --add-kernel /boot/new-kernel --title Some_Title |
260 | grubTest grub.1 default/g1.2 --boot-filesystem=/boot --add-kernel /boot/new-kernel --title Some_Title --make-default | ||
261 | grubTest grub.3 default/g3.1 --boot-filesystem=/boot --set-default=/boot/vmlinuz-2.4.7-2 | ||
262 | grubTest grub.3 default/g3.2 --boot-filesystem=/boot --set-default=/boot/vmlinuz-2.4.7-2smp | ||
263 | 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 | ||
264 | 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 | ||
265 | grubTest grub.6 default/g6.1 --remove-kernel=/boot/vmlinuz-2.4.7-2.9 --boot-filesystem=/ | ||
266 | |||
267 | niro | 1861 | testing="GRUB default index directive" |
268 | grubTest grub.13 setdefaultindex/g.13.0 --set-default-index=0 | ||
269 | grubTest grub.13 setdefaultindex/g.13.1 --set-default-index=1 | ||
270 | grubTest grub.13 setdefaultindex/g.13.9 --set-default-index=9 | ||
271 | |||
272 | niro | 2980 | testing="GRUB add initrd" |
273 | grubTest grub.14 add/g1.7 --boot-filesystem=/ --update-kernel=/vmlinuz-4.0.0-0.rc4.git1.4.fc23.x86_64 --initrd /initramfs-4.0.0-0.rc4.git1.4.fc23.x86_64.img '--args= LANG=en_US.UTF-8' '--title=Fedora (4.0.0-0.rc4.git1.4.fc23.x86_64) 23 (Rawhide)' | ||
274 | |||
275 | niro | 1720 | testing="GRUB display default index" |
276 | grubDisplayTest grub.1 defaultindex/0 --default-index | ||
277 | grubDisplayTest grub.2 defaultindex/0 --default-index | ||
278 | grubDisplayTest grub.3 defaultindex/0 --default-index | ||
279 | grubDisplayTest grub.4 defaultindex/0 --default-index | ||
280 | grubDisplayTest grub.5 defaultindex/0 --default-index | ||
281 | grubDisplayTest grub.6 defaultindex/2 --default-index | ||
282 | grubDisplayTest grub.7 defaultindex/2 --default-index | ||
283 | grubDisplayTest grub.8 defaultindex/0 --default-index | ||
284 | grubDisplayTest grub.9 defaultindex/0 --default-index | ||
285 | grubDisplayTest grub.10 defaultindex/0 --default-index | ||
286 | grubDisplayTest grub.10 defaultindex/0 --default-index | ||
287 | |||
288 | niro | 1721 | testing="GRUB display default title" |
289 | grubDisplayTest grub.1 defaulttitle/g.1 --default-title | ||
290 | grubDisplayTest grub.2 defaulttitle/g.2 --default-title | ||
291 | grubDisplayTest grub.3 defaulttitle/g.3 --default-title | ||
292 | grubDisplayTest grub.4 defaulttitle/g.4 --default-title | ||
293 | grubDisplayTest grub.5 defaulttitle/g.5 --default-title | ||
294 | grubDisplayTest grub.6 defaulttitle/g.6 --default-title | ||
295 | grubDisplayTest grub.7 defaulttitle/g.7 --default-title | ||
296 | grubDisplayTest grub.8 defaulttitle/g.8 --default-title | ||
297 | grubDisplayTest grub.9 defaulttitle/g.9 --default-title | ||
298 | grubDisplayTest grub.10 defaulttitle/g.10 --default-title | ||
299 | grubDisplayTest grub.11 defaulttitle/g.11 --default-title | ||
300 | |||
301 | niro | 2992 | testing="GRUB display default kernel" |
302 | niro | 2994 | grubDisplayTest grub.1 defaultkernel/g.1 --boot-filesystem=/boot --default-kernel |
303 | grubDisplayTest grub.1 defaultkernel/g.2 --boot-filesystem=/ --default-kernel | ||
304 | niro | 2992 | |
305 | niro | 1308 | testing="LILO default directive" |
306 | niro | 532 | liloTest lilo.1 default/l1.1 --set-default=/boot/vmlinuz-2.4.18-4 |
307 | liloTest lilo.1 default/l1.2 --remove-kernel=/boot/vmlinuz-2.4.18-4smp | ||
308 | liloTest lilo.1 default/l1.3 --add-kernel /boot/kernel --title label \ | ||
309 | --copy-default | ||
310 | liloTest lilo.1 default/l1.4 --add-kernel /boot/kernel --title label \ | ||
311 | --copy-default --make-default | ||
312 | niro | 2992 | liloDisplayTest lilo.1 defaultkernel/l1.1 --default-kernel |
313 | niro | 532 | |
314 | niro | 1308 | testing="Z/IPL default directive" |
315 | niro | 532 | ziplTest zipl.1 default/z1.1 --add-kernel /boot/new-kernel --title test |
316 | ziplTest zipl.1 default/z1.2 --add-kernel /boot/new-kernel --title test --make-default | ||
317 | niro | 2992 | testing="Z/IPL display default index" |
318 | ziplDisplayTest zipl.1 defaultindex/0 --default-index | ||
319 | testing="Z/IPL display default title" | ||
320 | ziplDisplayTest zipl.1 defaulttitle/z.1 --default-title | ||
321 | testing="Z/IPL display default kernel" | ||
322 | ziplDisplayTest zipl.1 defaultkernel/z.1 --default-kernel | ||
323 | niro | 532 | |
324 | niro | 1308 | testing="GRUB fallback directive" |
325 | niro | 532 | grubTest grub.5 fallback/g5.1 --remove-kernel=/boot/vmlinuz-2.4.7-ac3 \ |
326 | --boot-filesystem=/ | ||
327 | grubTest grub.5 fallback/g5.2 --remove-kernel=/boot/vmlinuz-2.4.7-2.5 \ | ||
328 | --boot-filesystem=/ | ||
329 | grubTest grub.5 fallback/g5.3 --remove-kernel=/boot/vmlinuz-2.4.7-2.5 \ | ||
330 | --boot-filesystem=/ --copy-default --add-kernel=/boot/new-kernel \ | ||
331 | --title="Some_Title" | ||
332 | |||
333 | niro | 2693 | testing="Extlinux default directive" |
334 | extlinuxTest extlinux.1 default/extlinux1.1 --boot-filesystem=/boot --add-kernel /boot/new-kernel --title Some_Title | ||
335 | extlinuxTest extlinux.1 default/extlinux1.2 --boot-filesystem=/boot --add-kernel /boot/new-kernel --title Some_Title --make-default | ||
336 | extlinuxTest extlinux.3 default/extlinux3.1 --boot-filesystem=/boot --set-default=/boot/vmlinuz-3.12.0-2.fc21.i686 | ||
337 | extlinuxTest extlinux.3 default/extlinux3.2 --boot-filesystem=/boot --set-default=/boot/vmlinuz-3.12.0-2.fc21.i686+PAE | ||
338 | |||
339 | niro | 1308 | testing="GRUB new kernel argument handling" |
340 | niro | 532 | grubTest grub.1 args/g1.1 --boot-filesystem=/boot \ |
341 | --add-kernel=/boot/foo --title=some_title --args="1234" --copy-default | ||
342 | grubTest grub.1 args/g1.2 --boot-filesystem=/boot \ | ||
343 | --add-kernel=/boot/foo --title=some_title --args="1234" | ||
344 | |||
345 | niro | 2693 | testing="Extlinux new kernel argument handling" |
346 | extlinuxTest extlinux.1 args/extlinux1.1 --boot-filesystem=/boot \ | ||
347 | --add-kernel=/boot/foo --title=some_title --args="1234" --copy-default | ||
348 | extlinuxTest extlinux.1 args/extlinux1.2 --boot-filesystem=/boot \ | ||
349 | --add-kernel=/boot/foo --title=some_title --args="1234" | ||
350 | |||
351 | niro | 1308 | testing="GRUB remove kernel" |
352 | niro | 532 | grubTest grub.7 remove/g7.1 --boot-filesystem=/ \ |
353 | --remove-kernel=/boot/vmlinuz-2.4.7-2.5 | ||
354 | grubTest grub.3 remove/g3.1 --boot-filesystem=/ \ | ||
355 | --remove-kernel=DEFAULT | ||
356 | grubTest grub.9 remove/g9.1 --boot-filesystem=/boot \ | ||
357 | --remove-kernel=/boot/vmlinuz-2.4.7-2 | ||
358 | |||
359 | niro | 1308 | testing="YABOOT remove kernel" |
360 | niro | 532 | yabootTest yaboot.1 remove/y1.1 --boot-filesystem=/ --remove-kernel=DEFAULT |
361 | yabootTest yaboot.1 remove/y1.2 --boot-filesystem=/ --remove-kernel=/boot/vmlinuz-2.5.50-eepro | ||
362 | yabootTest yaboot.2 remove/y2.1 --boot-filesystem=/ --remove-kernel=/boot/vmlinux-2.5.50 | ||
363 | |||
364 | niro | 1308 | testing="Z/IPL remove kernel" |
365 | niro | 532 | ziplTest zipl.1 remove/z1.1 --remove-kernel=/boot/vmlinuz-2.4.9-38 |
366 | ziplTest zipl.1 remove/z1.2 --remove-kernel=DEFAULT | ||
367 | |||
368 | niro | 2693 | testing="Extlinux remove kernel" |
369 | extlinuxTest extlinux.4 remove/extlinux4.1 --boot-filesystem=/ \ | ||
370 | --remove-kernel=/boot/vmlinuz-3.11.7-301.fc20.i686 | ||
371 | extlinuxTest extlinux.3 remove/extlinux3.1 --boot-filesystem=/ \ | ||
372 | --remove-kernel=DEFAULT | ||
373 | |||
374 | niro | 1308 | testing="GRUB update kernel argument handling" |
375 | niro | 532 | grubTest grub.1 updargs/g1.1 --update-kernel=DEFAULT --args="root=/dev/hda1" |
376 | grubTest grub.1 updargs/g1.2 --update-kernel=DEFAULT \ | ||
377 | --args="root=/dev/hda1 hda=ide-scsi root=/dev/hda2" | ||
378 | grubTest grub.3 updargs/g3.1 --update-kernel=DEFAULT --args "hdd=notide-scsi" | ||
379 | grubTest grub.3 updargs/g3.2 --update-kernel=DEFAULT \ | ||
380 | --args "hdd=notide-scsi root=/dev/hdd1" | ||
381 | grubTest grub.3 updargs/g3.2 --update-kernel=DEFAULT \ | ||
382 | --args "root=/dev/hdd1 hdd=notide-scsi" | ||
383 | grubTest grub.3 updargs/g3.4 --update-kernel=ALL --remove-args="hdd" | ||
384 | grubTest grub.3 updargs/g3.4 --update-kernel=ALL --remove-args="hdd=ide-scsi" | ||
385 | grubTest grub.3 updargs/g3.4 --update-kernel=ALL --remove-args="hdd=foobar" | ||
386 | grubTest grub.3 updargs/g3.7 --update-kernel=ALL \ | ||
387 | --remove-args="hdd root ro" | ||
388 | grubTest grub.7 updargs/g7.2 --boot-filesystem=/ \ | ||
389 | --update-kernel=ALL --args "hde=ide-scsi" | ||
390 | grubTest grub.7 updargs/g7.3 --boot-filesystem=/ \ | ||
391 | --update-kernel=DEFAULT --args "hde=ide-scsi" | ||
392 | grubTest grub.7 updargs/g7.4 --boot-filesystem=/ \ | ||
393 | --update-kernel=/vmlinuz-2.4.7-2 \ | ||
394 | --args "ro root=LABEL=/ console=tty0 console=ttyS1,9600n81 single" | ||
395 | niro | 1308 | grubTest grub.7 updargs/g7.5 --boot-filesystem=/ \ |
396 | --update-kernel=ALL --args "root=/dev/hda2" | ||
397 | niro | 532 | grubTest grub.11 updargs/g11.1 --boot-filesystem=/ \ |
398 | --update-kernel=/vmlinuz-2.4.7-2smp \ | ||
399 | --args "ro root=LABEL=/ console=tty0 console=ttyS1,9600n81 single" | ||
400 | grubTest grub.11 updargs/g11.2 --boot-filesystem=/ \ | ||
401 | --update-kernel=/vmlinuz-2.4.7-2smp \ | ||
402 | --args "ro root=LABEL=/ single" | ||
403 | |||
404 | niro | 1861 | testing="GRUB lba and root information on SuSE systems" |
405 | GRUBBY_SUSE_RELEASE=test/grub.12-support_files/etc/SuSE-release \ | ||
406 | GRUBBY_SUSE_GRUB_CONF=test/grub.12-support_files/etc/grub.conf \ | ||
407 | GRUBBY_GRUB_DEVICE_MAP=test/grub.12-support_files/boot/grub/device.map \ | ||
408 | grubTest grub.12 info/g12.1 --info=0 | ||
409 | |||
410 | niro | 1308 | testing="LILO update kernel argument handling" |
411 | niro | 532 | liloTest lilo.1 updargs/l1.1 --update-kernel=/boot/vmlinuz-2.4.18-4 \ |
412 | --args="root=/dev/md1" | ||
413 | liloTest lilo.1 updargs/l1.2 --update-kernel=/boot/vmlinuz-2.4.18-4smp \ | ||
414 | --args="root=LABEL=foo" | ||
415 | liloTest lilo.1 updargs/l1.3 --update-kernel=DEFAULT --args="foo" | ||
416 | liloTest lilo.1 updargs/l1.4 --update-kernel=ALL --args="foo bar root=/dev/md1" | ||
417 | liloTest lilo.1 updargs/l1.4 --update-kernel=ALL --args="foo root=/dev/md1 bar" | ||
418 | liloTest lilo.1 updargs/l1.6 --update-kernel=ALL --args="foo root=LABEL=/ bar" | ||
419 | liloTest lilo.3 updargs/l3.1 --update-kernel=/boot/vmlinuz-2.4.18-4 \ | ||
420 | --remove-args="hda" | ||
421 | liloTest lilo.3 updargs/l3.2 --update-kernel=ALL \ | ||
422 | --remove-args="single" --args "root=/dev/hda2" | ||
423 | |||
424 | niro | 2693 | testing="Extlinux update kernel argument handling" |
425 | extlinuxTest extlinux.1 updargs/extlinux1.1 --update-kernel=DEFAULT --args="root=/dev/hda1" | ||
426 | extlinuxTest extlinux.1 updargs/extlinux1.2 --update-kernel=DEFAULT \ | ||
427 | --args="root=/dev/hda1 hda=ide-scsi root=/dev/hda2" | ||
428 | extlinuxTest extlinux.3 updargs/extlinux3.1 --update-kernel=DEFAULT --args "hdd=notide-scsi" | ||
429 | extlinuxTest extlinux.3 updargs/extlinux3.2 --update-kernel=DEFAULT \ | ||
430 | --args "hdd=notide-scsi root=/dev/hdd1" | ||
431 | extlinuxTest extlinux.3 updargs/extlinux3.2 --update-kernel=DEFAULT \ | ||
432 | --args "root=/dev/hdd1 hdd=notide-scsi" | ||
433 | extlinuxTest extlinux.3 updargs/extlinux3.4 --update-kernel=ALL --remove-args="hdd" | ||
434 | extlinuxTest extlinux.3 updargs/extlinux3.4 --update-kernel=ALL --remove-args="hdd=ide-scsi" | ||
435 | extlinuxTest extlinux.3 updargs/extlinux3.4 --update-kernel=ALL --remove-args="hdd=foobar" | ||
436 | extlinuxTest extlinux.3 updargs/extlinux3.7 --update-kernel=ALL \ | ||
437 | --remove-args="hdd root ro" | ||
438 | extlinuxTest extlinux.4 updargs/extlinux4.2 --boot-filesystem=/ \ | ||
439 | --update-kernel=ALL --args "hde=ide-scsi" | ||
440 | extlinuxTest extlinux.4 updargs/extlinux4.3 --boot-filesystem=/ \ | ||
441 | --update-kernel=DEFAULT --args "hde=ide-scsi" | ||
442 | extlinuxTest extlinux.4 updargs/extlinux4.4 --boot-filesystem=/ \ | ||
443 | --update-kernel=/vmlinuz-3.12.0-2.fc21.i686 \ | ||
444 | --args "ro root=LABEL=/ console=tty0 console=ttyS1,9600n81 single" | ||
445 | extlinuxTest extlinux.4 updargs/extlinux4.5 --boot-filesystem=/ \ | ||
446 | --update-kernel=ALL --args "root=/dev/hda2" | ||
447 | |||
448 | niro | 1308 | testing="LILO add kernel" |
449 | niro | 532 | liloTest lilo.4 add/l4.1 --add-kernel=/boot/new-kernel.img --title="title" \ |
450 | --copy-default --boot-filesystem=/boot | ||
451 | liloTest lilo.4 add/l4.2 --add-kernel=/boot/new-kernel.img --title="linux" \ | ||
452 | --copy-default --boot-filesystem=/boot --remove-kernel "TITLE=linux" | ||
453 | liloTest lilo.5 add/l5.1 --add-kernel=/boot/new-kernel.img --title="title" \ | ||
454 | --copy-default --boot-filesystem=/boot | ||
455 | liloTest lilo.5 add/l5.2 --add-kernel=/boot/new-kernel.img --title="linux" \ | ||
456 | --copy-default --boot-filesystem=/boot --remove-kernel "TITLE=linux" | ||
457 | liloTest lilo.6 add/l6.1 --add-kernel=/boot/new-kernel.img --title="title" \ | ||
458 | --initrd=/boot/new-initrd --copy-default --boot-filesystem=/boot | ||
459 | liloTest lilo.6 add/l6.2 --add-kernel=/boot/new-kernel.img --title="linux" \ | ||
460 | --initrd=/boot/new-initrd --copy-default --boot-filesystem=/boot --remove-kernel "TITLE=linux" | ||
461 | |||
462 | |||
463 | niro | 1308 | testing="GRUB add kernel" |
464 | niro | 532 | grubTest grub.1 add/g1.1 --add-kernel=/boot/new-kernel.img --title='title' \ |
465 | --initrd=/boot/new-initrd --boot-filesystem=/ | ||
466 | grubTest grub.1 add/g1.2 --add-kernel=/boot/new-kernel.img --title='title' \ | ||
467 | --initrd=/boot/new-initrd --boot-filesystem=/boot | ||
468 | grubTest grub.1 add/g1.3 --add-kernel=/boot/new-kernel.img --title='title' \ | ||
469 | --initrd=/boot/new-initrd --boot-filesystem=/ --copy-default | ||
470 | grubTest grub.1 add/g1.4 --add-kernel=/boot/new-kernel.img --title='title' \ | ||
471 | --initrd=/boot/new-initrd --boot-filesystem=/boot --copy-default | ||
472 | niro | 1308 | grubTest grub.1 add/g1.5 --add-kernel=/boot/new-kernel.img --title='title' \ |
473 | --initrd=/boot/new-initrd --extra-initrd=/boot/extra-initrd --boot-filesystem=/ | ||
474 | grubTest grub.1 add/g1.6 --add-kernel=/boot/new-kernel.img --title='title' \ | ||
475 | --initrd=/boot/new-initrd --extra-initrd=/boot/extra-initrd --boot-filesystem=/boot | ||
476 | niro | 532 | grubTest grub.2 add/g2.1 --add-kernel=/boot/vmlinuz-2.4.7-2 \ |
477 | --initrd=/boot/initrd-2.4.7-new.img --boot-filesystem=/boot --copy-default \ | ||
478 | --title="Red Hat Linux (2.4.7-2)" \ | ||
479 | --remove-kernel="TITLE=Red Hat Linux (2.4.7-2)" | ||
480 | grubTest grub.8 add/g8.1 --add-kernel=/boot/new-kernel.img --title='title' \ | ||
481 | --initrd=/boot/new-initrd --boot-filesystem=/boot --copy-default | ||
482 | grubTest grub.8 add/g8.2 --add-kernel=/boot/new-kernel.img --title='title' \ | ||
483 | --initrd=/boot/new-initrd --boot-filesystem=/boot --copy-default \ | ||
484 | --args='console=tty0 console=ttyS1,9600n81 single' | ||
485 | grubTest grub.11 add/g11.1 --add-kernel=/boot/new-kernel.img --title='title' \ | ||
486 | --initrd=/boot/new-initrd --boot-filesystem=/boot --copy-default \ | ||
487 | --args='console=tty0 console=ttyS1,9600n81 single' | ||
488 | niro | 3007 | grubTest grub.1 add/g1.1 --add-kernel=/boot/new-kernel.img --title='title' \ |
489 | --initrd=/boot/new-initrd --boot-filesystem=/ --set-index 0 | ||
490 | grubTest grub.1 add/g1.17 --add-kernel=/boot/new-kernel.img --title='title' \ | ||
491 | --initrd=/boot/new-initrd --boot-filesystem=/ --set-index 1 | ||
492 | grubTest grub.1 add/g1.17 --add-kernel=/boot/new-kernel.img --title='title' \ | ||
493 | --initrd=/boot/new-initrd --boot-filesystem=/ --set-index 2 | ||
494 | grubTest grub.15 add/g1.10 --add-kernel=/boot/new-kernel.img --title='title' \ | ||
495 | --initrd=/boot/new-initrd --boot-filesystem=/ --set-index 0 | ||
496 | grubTest grub.15 add/g1.8 --add-kernel=/boot/new-kernel.img --title='title' \ | ||
497 | --initrd=/boot/new-initrd --boot-filesystem=/ --set-index 1 | ||
498 | grubTest grub.15 add/g1.9 --add-kernel=/boot/new-kernel.img --title='title' \ | ||
499 | --initrd=/boot/new-initrd --boot-filesystem=/ --set-index 2 | ||
500 | grubTest grub.15 add/g1.9 --add-kernel=/boot/new-kernel.img --title='title' \ | ||
501 | --initrd=/boot/new-initrd --boot-filesystem=/ --set-index 5 | ||
502 | niro | 532 | |
503 | niro | 2254 | testgrub2=n |
504 | ARCH=$(uname -m | sed s,i[3456789]86,ia32,) | ||
505 | case $ARCH in | ||
506 | aarch64|ppc|ppc64|ia32|x86_64) testgrub2=y ;; | ||
507 | esac | ||
508 | niro | 1698 | |
509 | niro | 2254 | if [ "$testgrub2" == "y" ]; then |
510 | testing="GRUB2 add kernel" | ||
511 | grub2Test grub2.1 add/g2-1.1 --add-kernel=/boot/new-kernel.img \ | ||
512 | --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \ | ||
513 | --copy-default | ||
514 | niro | 2687 | case $ARCH in |
515 | aarch64) | ||
516 | grub2Test grub2.1 add/g2-1.1 --add-kernel=/boot/new-kernel.img \ | ||
517 | --title='title' \ | ||
518 | --initrd=/boot/new-initrd --boot-filesystem=/boot/ \ | ||
519 | --copy-default --efi | ||
520 | ;; | ||
521 | *) | ||
522 | grub2Test grub2.1 add/g2-1.6 --add-kernel=/boot/new-kernel.img \ | ||
523 | --title='title' \ | ||
524 | --initrd=/boot/new-initrd --boot-filesystem=/boot/ \ | ||
525 | --copy-default --efi | ||
526 | ;; | ||
527 | esac | ||
528 | niro | 2254 | grub2Test grub2.6 add/g2-1.7 --add-kernel=/boot/new-kernel.img \ |
529 | --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \ | ||
530 | --copy-default --efi | ||
531 | grub2Test grub2.1 add/g2-1.2 --add-kernel=/boot/new-kernel.img \ | ||
532 | --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \ | ||
533 | --copy-default --make-default | ||
534 | grub2Test grub2.1 add/g2-1.3 --add-kernel=/boot/new-kernel.img \ | ||
535 | --title='title' --boot-filesystem=/boot/ --copy-default --make-default | ||
536 | grub2Test grub2.1 remove/g2-1.4 \ | ||
537 | --remove-kernel=/boot/vmlinuz-2.6.38.2-9.fc15.x86_64 \ | ||
538 | --boot-filesystem=/boot/ | ||
539 | grub2Test grub2.5 add/g2-1.5 --add-kernel=/boot/new-kernel.img \ | ||
540 | --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \ | ||
541 | --copy-default | ||
542 | niro | 2685 | grub2Test grub2.12 add/g2-1.12 \ |
543 | --add-kernel=/boot/vmlinuz-2.6.38.8-32.fc15.x86_64 \ | ||
544 | --title='Linux, with Fedora 2.6.38.8-32.fc15.x86_64' \ | ||
545 | --devtree='/boot/dtb-2.6.38.8-32.fc15.x86_64/foobarbaz.dtb' \ | ||
546 | --initrd=/boot/initramfs-2.6.38.8-32.fc15.x86_64.img \ | ||
547 | --boot-filesystem=/boot/ --copy-default --efi | ||
548 | grub2Test grub2.13 add/g2-1.13 \ | ||
549 | --add-kernel=/boot/vmlinuz-2.6.38.8-32.fc15.x86_64 \ | ||
550 | --title='Linux, with Fedora 2.6.38.8-32.fc15.x86_64' \ | ||
551 | --devtree='/boot/dtb-2.6.38.8-32.fc15.x86_64/foobarbaz.dtb' \ | ||
552 | --initrd=/boot/initramfs-2.6.38.8-32.fc15.x86_64.img \ | ||
553 | --boot-filesystem=/boot/ --copy-default --efi | ||
554 | niro | 2968 | grub2Test grub2.15 add/g2-1.15 \ |
555 | niro | 2709 | --add-kernel=/boot/vmlinuz-0-rescue-5a94251776a14678911d4ae0949500f5 \ |
556 | --initrd /boot/initramfs-0-rescue-5a94251776a14678911d4ae0949500f5.img \ | ||
557 | --copy-default --title "Fedora 21 Rescue" --args=root=/fooooo \ | ||
558 | niro | 2974 | --remove-kernel=wtf --boot-filesystem=/boot/ --efi |
559 | niro | 1698 | |
560 | niro | 3003 | # a grub2 add with a "set" of the form: set foo="bar=1,2". bz#1152550 |
561 | # has this being emitted as: set foo="bar=1,2"=1,2" | ||
562 | # which is wrong. | ||
563 | grub2Test grub2.16 add/g2-1.16 \ | ||
564 | --add-kernel=/boot/vmlinuz-foo \ | ||
565 | --copy-default --title 'Red Hat Enterprise Linux Server' \ | ||
566 | --args=root=/dev/mapper/foo-- | ||
567 | |||
568 | niro | 3009 | # copy a stanza and add arguments as well, while using --set-index= |
569 | testing="GRUB2 add stanza and new args with --set-index=" | ||
570 | grub2Test grub2.18 add/g2-1.18 --env grubenv.3 \ | ||
571 | --add-kernel=/boot/vmlinuz-3.10.0-327.22.2.el7.x86_64.debug \ | ||
572 | --boot-filesystem=/boot --copy-default \ | ||
573 | --title "Red Hat Enterprise Linux Server (3.10.0-327.22.2.el7.x86_64.debug) 7.2 (Maipo) with debugging" \ | ||
574 | --args="root=/dev/mapper/rhel_team--area--222-root systemd.log_level=debug systemd.log_target=kmsg" \ | ||
575 | --set-index=1 | ||
576 | |||
577 | niro | 2254 | testing="GRUB2 add initrd" |
578 | grub2Test grub2.2 add/g2-1.4 --update-kernel=/boot/new-kernel.img \ | ||
579 | --initrd=/boot/new-initrd --boot-filesystem=/boot/ | ||
580 | niro | 1720 | |
581 | niro | 2254 | testing="GRUB2 display default index" |
582 | grub2DisplayTest grub2.1 defaultindex/0 --default-index | ||
583 | grub2DisplayTest grub2.2 defaultindex/0 --default-index | ||
584 | niro | 1721 | |
585 | niro | 2254 | testing="GRUB2 display default title" |
586 | grub2DisplayTest grub2.1 defaulttitle/g2.1 --default-title | ||
587 | grub2DisplayTest grub2.2 defaulttitle/g2.2 --default-title | ||
588 | niro | 1737 | |
589 | niro | 2254 | testing="GRUB2 display debug failure" |
590 | grub2DisplayTest grub2.1 debug/g2.1 --bad-image-bad \ | ||
591 | --boot-filesystem=/boot --default-kernel --debug | ||
592 | testing="GRUB2 display debug success" | ||
593 | grub2DisplayTest grub2.1 debug/g2.1.2 --boot-filesystem=/boot \ | ||
594 | --default-kernel --debug | ||
595 | niro | 1801 | |
596 | niro | 2254 | testing="GRUB2 remove kernel via index" |
597 | grub2Test grub2.3 remove/g2-1.1 --remove-kernel=1 | ||
598 | niro | 1801 | |
599 | niro | 2254 | testing="GRUB2 remove kernel via title" |
600 | grub2Test grub2.3 remove/g2-1.1 --remove-kernel="TITLE=title2" | ||
601 | niro | 1801 | |
602 | niro | 2254 | testing="GRUB2 (submenu) remove kernel via index" |
603 | grub2Test grub2.4 remove/g2-1.2 --remove-kernel=2 | ||
604 | niro | 1801 | |
605 | niro | 2254 | testing="GRUB2 (submenu) remove kernel via title" |
606 | grub2Test grub2.4 remove/g2-1.2 --remove-kernel="TITLE=title2" | ||
607 | niro | 1861 | |
608 | niro | 2254 | testing="GRUB2 default index directive" |
609 | grub2Test grub2.1 setdefaultindex/g2.1.0 --set-default-index=0 | ||
610 | grub2Test grub2.1 setdefaultindex/g2.1.1 --set-default-index=1 | ||
611 | grub2Test grub2.1 setdefaultindex/g2.1.9 --set-default-index=9 | ||
612 | niro | 2252 | |
613 | niro | 2254 | testing="GRUB2 add kernel with default=saved_entry" |
614 | grub2Test grub2.7 add/g2-1.8 --env grubenv.1 \ | ||
615 | --add-kernel=/boot/new-kernel.img \ | ||
616 | --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \ | ||
617 | --copy-default | ||
618 | commandTest "saved_default output" \ | ||
619 | "grub2-editenv test/grub2-support_files/env_temp list" \ | ||
620 | "saved_entry=Linux, with Fedora 2.6.38.8-32.fc15.x86_64" | ||
621 | niro | 2252 | |
622 | niro | 2257 | testing="GRUB2 add kernel with default=saved_entry and a terrible title" |
623 | grub2Test grub2.7 add/g2-1.9 --env grubenv.1 \ | ||
624 | --add-kernel=/boot/new-kernel.img \ | ||
625 | --title='Fedora (3.10.3-300.fc19.x86_64) 19 (Schrödinger’s Cat)' \ | ||
626 | --initrd=/boot/new-initrd --boot-filesystem=/boot/ \ | ||
627 | --copy-default | ||
628 | |||
629 | testing="GRUB2 set default with default=saved_entry and a terrible name" | ||
630 | grub2Test grub2.9 add/g2-1.9 --env grubenv.1 --set-default-index=0 | ||
631 | commandTest "saved_default output" \ | ||
632 | "grub2-editenv test/grub2-support_files/env_temp list" \ | ||
633 | 'saved_entry=Fedora (3.10.3-300.fc19.x86_64) 19 (Schrödinger’s Cat)' | ||
634 | |||
635 | niro | 2254 | testing="GRUB2 set default with default=saved_entry" |
636 | grub2Test grub2.8 add/g2-1.8 --env grubenv.1 --set-default-index=0 | ||
637 | commandTest "saved_default output" \ | ||
638 | "grub2-editenv test/grub2-support_files/env_temp list" \ | ||
639 | "saved_entry=title" | ||
640 | niro | 2252 | |
641 | niro | 2254 | testing="GRUB2 --default-index with default=saved_entry" |
642 | grub2DisplayTest grub2.8 defaultindex/1 --env grubenv.1 --default-index | ||
643 | niro | 2252 | |
644 | niro | 2254 | testing="GRUB2 --default-index with default=saved_entry" |
645 | grub2DisplayTest grub2.8 defaultindex/0 --env grubenv.2 --default-index | ||
646 | niro | 2252 | |
647 | niro | 2254 | testing="GRUB2 --default-title with default=saved_entry" |
648 | grub2DisplayTest grub2.8 defaulttitle/g2.1 --env grubenv.1 --default-title | ||
649 | niro | 2255 | |
650 | testing="GRUB2 --default-index with default=saved_entry and empty grubenv" | ||
651 | grub2DisplayTest grub2.8 defaultindex/0 --env grubenv.0 --default-index | ||
652 | niro | 2683 | |
653 | testlinux16=n | ||
654 | case $ARCH in | ||
655 | ia32|x86_64) testlinux16=y ;; | ||
656 | esac | ||
657 | |||
658 | if [ "$testlinux16" == "y" ]; then | ||
659 | testing="GRUB2 add kernel with linux16" | ||
660 | grub2Test grub2.10 add/g2-1.10 --add-kernel=/boot/new-kernel.img \ | ||
661 | --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \ | ||
662 | --copy-default | ||
663 | |||
664 | testing="GRUB2 add initrd with linux16" | ||
665 | grub2Test grub2.11 add/g2-1.11 --update-kernel=/boot/new-kernel.img \ | ||
666 | --initrd=/boot/new-initrd --boot-filesystem=/boot/ | ||
667 | niro | 2968 | |
668 | testing="GRUB2 add rescue with linux16" | ||
669 | grub2Test grub2.14 add/g2-1.14 \ | ||
670 | --add-kernel=/boot/vmlinuz-0-rescue-5a94251776a14678911d4ae0949500f5 \ | ||
671 | --initrd /boot/initramfs-0-rescue-5a94251776a14678911d4ae0949500f5.img \ | ||
672 | --copy-default --title "Fedora 21 Rescue" --args=root=/fooooo \ | ||
673 | --remove-kernel=wtf --boot-filesystem=/boot/ | ||
674 | niro | 2683 | fi |
675 | niro | 2254 | fi |
676 | |||
677 | niro | 1308 | testing="YABOOT add kernel" |
678 | niro | 532 | yabootTest yaboot.1 add/y1.1 --copy-default --boot-filesystem=/ --add-kernel=/boot/new-kernel \ |
679 | --title=newtitle | ||
680 | yabootTest yaboot.1 add/y1.2 --add-kernel=/boot/new-kernel --boot-filesystem=/ --title=newtitle | ||
681 | |||
682 | niro | 1308 | testing="YABOOT empty label" |
683 | niro | 532 | yabootTest yaboot.3 add/y3.1 --add-kernel=/boot/new-kernel --boot-filesystem=/ --title=newtitle |
684 | |||
685 | niro | 1308 | testing="Z/IPL add kernel" |
686 | niro | 532 | ziplTest zipl.1 add/z1.1 --add-kernel=/boot/new-kernel.img --title test |
687 | ziplTest zipl.1 add/z1.2 --add-kernel=/boot/new-kernel.img --title test --copy-default | ||
688 | |||
689 | niro | 2693 | testing="Extlinux add kernel" |
690 | niro | 2971 | extlinuxTest extlinux.1 add/extlinux1.1 --add-kernel=/boot/new-kernel.img \ |
691 | --title='title' --initrd=/boot/new-initrd --boot-filesystem=/ | ||
692 | extlinuxTest extlinux.1 add/extlinux1.2 --add-kernel=/boot/new-kernel.img \ | ||
693 | --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot | ||
694 | extlinuxTest extlinux.1 add/extlinux1.3 --add-kernel=/boot/new-kernel.img \ | ||
695 | --title='title' --initrd=/boot/new-initrd --boot-filesystem=/ \ | ||
696 | --copy-default | ||
697 | extlinuxTest extlinux.1 add/extlinux1.4 --add-kernel=/boot/new-kernel.img \ | ||
698 | --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot \ | ||
699 | --copy-default | ||
700 | extlinuxTest extlinux.2 add/extlinux2.1 \ | ||
701 | --add-kernel=/boot/vmlinuz-3.12.0-2.fc21.i686 \ | ||
702 | --initrd=/boot/initrd-3.12.0-2.fc21.i686-new.img \ | ||
703 | --boot-filesystem=/boot --copy-default \ | ||
704 | --title="Fedora (3.12.0-2.fc21.i686) 20 (Heisenbug)" \ | ||
705 | niro | 2693 | --remove-kernel="TITLE=Fedora (3.12.0-2.fc21.i686) 20 (Heisenbug)" |
706 | niro | 2971 | extlinuxTest extlinux.5 add/extlinux5.1 \ |
707 | --add-kernel=/boot/vmlinuz-3.15.0-0.rc1.git4.1.fc21.armv7hl \ | ||
708 | --devtree='/boot/dtb-3.15.0-0.rc1.git4.1.fc21.armv7hl/imx6q-cubox-i.dtb' \ | ||
709 | --initrd=/boot/initramfs-3.15.0-0.rc1.git4.1.fc21.armv7hl.img \ | ||
710 | --boot-filesystem=/boot --copy-default \ | ||
711 | --title="Fedora (3.15.0-0.rc1.git4.1.fc21.armv7hl) 21 (Rawhide)" \ | ||
712 | --remove-kernel="TITLE=Fedora (3.12.0-0.fc21.armv7hl) 21 (Rawhide)" | ||
713 | niro | 2972 | extlinuxTest extlinux.6 add/extlinux6.1 \ |
714 | --add-kernel=/boot/vmlinuz-3.15.0-0.rc1.git4.1.fc21.armv7hl \ | ||
715 | --devtreedir='/boot/dtb-3.15.0-0.rc1.git4.1.fc21.armv7hl/' \ | ||
716 | --initrd=/boot/initramfs-3.15.0-0.rc1.git4.1.fc21.armv7hl.img \ | ||
717 | --boot-filesystem=/boot --copy-default \ | ||
718 | --title="Fedora (3.15.0-0.rc1.git4.1.fc21.armv7hl) 21 (Rawhide)" \ | ||
719 | --remove-kernel="TITLE=Fedora (3.12.0-0.fc21.armv7hl) 21 (Rawhide)" | ||
720 | niro | 2693 | |
721 | niro | 1308 | testing="LILO long titles" |
722 | niro | 532 | liloTest lilo.1 longtitle/l1.1 --add-kernel=/boot/new-kernel.img \ |
723 | --title="linux-longtitle" --copy-default --boot-filesystem=/boot | ||
724 | liloTest lilo.1 longtitle/l1.2 --add-kernel=/boot/new-kernel.img \ | ||
725 | --title="linux-toolongtitle" --copy-default --boot-filesystem=/boot | ||
726 | liloTest lilo.7 longtitle/l7.1 --add-kernel=/boot/new-kernel.img \ | ||
727 | --title="linux-longtitle-fix" --copy-default --boot-filesystem=/boot | ||
728 | |||
729 | niro | 1308 | testing="ELILO long titles" |
730 | niro | 532 | eliloTest lilo.7 longtitle/e7.1 --add-kernel=/boot/new-kernel.img \ |
731 | --title="linux-longtitle-fix" --copy-default --boot-filesystem=/boot | ||
732 | |||
733 | niro | 1308 | testing="GRUB add multiboot" |
734 | niro | 532 | grubTest grub.1 multiboot/g1.1 --add-multiboot=/boot/xen.gz \ |
735 | --add-kernel=/boot/vmlinuz-2.6.10-1.1088_FC4 --boot-filesystem=/boot \ | ||
736 | --initrd=/boot/initrd-2.6.10-1.1088_FC4.img --title foo \ | ||
737 | --mbargs="dom0_mem=130000" | ||
738 | grubTest grub.1 multiboot/g1.2 --add-multiboot=/boot/xen.gz \ | ||
739 | --add-kernel=/boot/vmlinuz-2.6.10-1.1088_FC4 --boot-filesystem=/boot \ | ||
740 | --initrd=/boot/initrd-2.6.10-1.1088_FC4.img --title foo \ | ||
741 | --mbargs="dom0_mem=130000" --copy-default | ||
742 | grubTest grub.10 multiboot/g10.1 --add-multiboot=/boot/xen.gz \ | ||
743 | --add-kernel=/boot/vmlinuz-2.6.10-1.1088_FC4 --boot-filesystem=/boot \ | ||
744 | --initrd=/boot/initrd-2.6.10-1.1088_FC4.img --title foo \ | ||
745 | --mbargs="dom0_mem=130000" | ||
746 | grubTest grub.10 multiboot/g10.2 --add-multiboot=/boot/xen.gz \ | ||
747 | --add-kernel=/boot/vmlinuz-2.6.10-1.1088_FC4 --boot-filesystem=/boot \ | ||
748 | --initrd=/boot/initrd-2.6.10-1.1088_FC4.img --title foo \ | ||
749 | --mbargs="dom0_mem=130000" --copy-default | ||
750 | grubTest grub.10 multiboot/g10.3 --add-kernel=/boot/vmlinuz-2.6.10-1.1088_FC4 \ | ||
751 | --initrd=/boot/initrd-2.6.10-1.1088_FC4.img --title foo \ | ||
752 | --copy-default --boot-filesystem=/boot | ||
753 | grubTest grub.10 multiboot/g10.4 --add-kernel=/boot/vmlinuz-2.6.10-1.1088_FC4 \ | ||
754 | --initrd=/boot/initrd-2.6.10-1.1088_FC4.img --title foo \ | ||
755 | --boot-filesystem=/boot | ||
756 | |||
757 | niro | 1308 | testing="GRUB remove multiboot" |
758 | niro | 532 | grubTest grub.10 multiboot/g10.5 --boot-filesystem=/boot \ |
759 | --remove-kernel=/boot/vmlinuz-2.6.10-1.1076_FC4 | ||
760 | grubTest grub.10 multiboot/g10.6 --boot-filesystem=/boot \ | ||
761 | --remove-kernel=/boot/vmlinuz-2.6.10-1.1082_FC4 | ||
762 | grubTest grub.10 multiboot/g10.7 --boot-filesystem=/boot \ | ||
763 | --remove-multiboot=/boot/xen.gz | ||
764 | |||
765 | niro | 1308 | testing="ELILO add multiboot" |
766 | eliloTest elilo.1 multiboot/e1.1 --add-multiboot=/boot/xen.gz \ | ||
767 | --add-kernel=/boot/vmlinuz-2.6.10-1.1088_FC4 --boot-filesystem=/boot \ | ||
768 | --initrd=/boot/initrd-2.6.10-1.1088_FC4.img --title foo \ | ||
769 | --mbargs="dom0_mem=130000" | ||
770 | eliloTest elilo.1 multiboot/e1.2 --add-multiboot=/boot/xen.gz \ | ||
771 | --add-kernel=/boot/vmlinuz-2.6.10-1.1088_FC4 --boot-filesystem=/boot \ | ||
772 | --initrd=/boot/initrd-2.6.10-1.1088_FC4.img --title foo \ | ||
773 | --mbargs="dom0_mem=130000" --copy-default | ||
774 | |||
775 | testing="ELILO remove multiboot" | ||
776 | eliloTest elilo.2 multiboot/e2.1 --boot-filesystem=/boot \ | ||
777 | --remove-kernel=/boot/vmlinuz-2.6.10-1.1076_FC4 | ||
778 | eliloTest elilo.2 multiboot/e2.2 --boot-filesystem=/boot \ | ||
779 | --remove-kernel=/boot/vmlinuz-2.6.10-1.1082_FC4 | ||
780 | eliloTest elilo.2 multiboot/e2.3 --boot-filesystem=/boot \ | ||
781 | --remove-multiboot=/boot/xen.gz | ||
782 | |||
783 | printf "\n%d (%d%%) tests passed, %d (%d%%) tests failed\n" \ | ||
784 | $pass $(((100*pass)/(pass+fail))) \ | ||
785 | $fail $(((100*fail)/(pass+fail))) | ||
786 | |||
787 | exit $(( !!fail )) |
Properties
Name | Value |
---|---|
svn:executable | * |