48 |
typeset mode=$1 cfg=test/$2 correct=test/results/$3 |
typeset mode=$1 cfg=test/$2 correct=test/results/$3 |
49 |
shift 3 |
shift 3 |
50 |
|
|
51 |
|
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 |
echo "$testing ... $mode $cfg $correct" |
echo "$testing ... $mode $cfg $correct" |
65 |
runme=( ./grubby "$mode" --bad-image-okay -c "$cfg" -o - "$@" ) |
runme=( ./grubby "$mode" --bad-image-okay $ENV_FILE -c "$cfg" -o - "$@" ) |
66 |
if "${runme[@]}" | cmp "$correct" > /dev/null; then |
if "${runme[@]}" | cmp "$correct" > /dev/null; then |
67 |
(( pass++ )) |
(( pass++ )) |
68 |
if $opt_verbose; then |
if $opt_verbose; then |
87 |
oneDisplayTest() { |
oneDisplayTest() { |
88 |
typeset mode=$1 cfg=test/$2 correct=test/results/$3 |
typeset mode=$1 cfg=test/$2 correct=test/results/$3 |
89 |
shift 3 |
shift 3 |
90 |
|
|
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 |
local BIO="--bad-image-okay" |
local BIO="--bad-image-okay" |
104 |
if [ "$1" == "--bad-image-bad" ]; then |
if [ "$1" == "--bad-image-bad" ]; then |
105 |
BIO="" |
BIO="" |
107 |
fi |
fi |
108 |
|
|
109 |
echo "$testing ... $mode $cfg $correct" |
echo "$testing ... $mode $cfg $correct" |
110 |
runme=( ./grubby "$mode" $BIO -c "$cfg" "$@" ) |
runme=( ./grubby "$mode" $BIO $ENV_FILE -c "$cfg" "$@" ) |
111 |
if "${runme[@]}" 2>&1 | cmp "$correct" > /dev/null; then |
if "${runme[@]}" 2>&1 | cmp "$correct" > /dev/null; then |
112 |
(( pass++ )) |
(( pass++ )) |
113 |
if $opt_verbose; then |
if $opt_verbose; then |
127 |
fi |
fi |
128 |
} |
} |
129 |
|
|
130 |
|
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 |
# generate convenience functions |
# generate convenience functions |
160 |
for b in $(./grubby --help | \ |
for b in $(./grubby --help | \ |
161 |
sed -n 's/^.*--\([^ ]*\) *configure \1 bootloader$/\1/p'); do |
sed -n 's/^.*--\([^ ]*\) *configure \1 bootloader.*/\1/p'); do |
162 |
eval "${b}Test() { [[ \"$b\" == \$opt_bootloader ]] && oneTest --$b \"\$@\"; }" |
eval "${b}Test() { [[ \"$b\" == \$opt_bootloader ]] && oneTest --$b \"\$@\"; }" |
163 |
eval "${b}DisplayTest() { [[ \"$b\" == \$opt_bootloader ]] && oneDisplayTest --$b \"\$@\"; }" |
eval "${b}DisplayTest() { [[ \"$b\" == \$opt_bootloader ]] && oneDisplayTest --$b \"\$@\"; }" |
164 |
done |
done |
316 |
--boot-filesystem=/ --copy-default --add-kernel=/boot/new-kernel \ |
--boot-filesystem=/ --copy-default --add-kernel=/boot/new-kernel \ |
317 |
--title="Some_Title" |
--title="Some_Title" |
318 |
|
|
319 |
|
testing="Extlinux default directive" |
320 |
|
extlinuxTest extlinux.1 default/extlinux1.1 --boot-filesystem=/boot --add-kernel /boot/new-kernel --title Some_Title |
321 |
|
extlinuxTest extlinux.1 default/extlinux1.2 --boot-filesystem=/boot --add-kernel /boot/new-kernel --title Some_Title --make-default |
322 |
|
extlinuxTest extlinux.3 default/extlinux3.1 --boot-filesystem=/boot --set-default=/boot/vmlinuz-3.12.0-2.fc21.i686 |
323 |
|
extlinuxTest extlinux.3 default/extlinux3.2 --boot-filesystem=/boot --set-default=/boot/vmlinuz-3.12.0-2.fc21.i686+PAE |
324 |
|
|
325 |
testing="GRUB new kernel argument handling" |
testing="GRUB new kernel argument handling" |
326 |
grubTest grub.1 args/g1.1 --boot-filesystem=/boot \ |
grubTest grub.1 args/g1.1 --boot-filesystem=/boot \ |
327 |
--add-kernel=/boot/foo --title=some_title --args="1234" --copy-default |
--add-kernel=/boot/foo --title=some_title --args="1234" --copy-default |
328 |
grubTest grub.1 args/g1.2 --boot-filesystem=/boot \ |
grubTest grub.1 args/g1.2 --boot-filesystem=/boot \ |
329 |
--add-kernel=/boot/foo --title=some_title --args="1234" |
--add-kernel=/boot/foo --title=some_title --args="1234" |
330 |
|
|
331 |
|
testing="Extlinux new kernel argument handling" |
332 |
|
extlinuxTest extlinux.1 args/extlinux1.1 --boot-filesystem=/boot \ |
333 |
|
--add-kernel=/boot/foo --title=some_title --args="1234" --copy-default |
334 |
|
extlinuxTest extlinux.1 args/extlinux1.2 --boot-filesystem=/boot \ |
335 |
|
--add-kernel=/boot/foo --title=some_title --args="1234" |
336 |
|
|
337 |
testing="GRUB remove kernel" |
testing="GRUB remove kernel" |
338 |
grubTest grub.7 remove/g7.1 --boot-filesystem=/ \ |
grubTest grub.7 remove/g7.1 --boot-filesystem=/ \ |
339 |
--remove-kernel=/boot/vmlinuz-2.4.7-2.5 |
--remove-kernel=/boot/vmlinuz-2.4.7-2.5 |
351 |
ziplTest zipl.1 remove/z1.1 --remove-kernel=/boot/vmlinuz-2.4.9-38 |
ziplTest zipl.1 remove/z1.1 --remove-kernel=/boot/vmlinuz-2.4.9-38 |
352 |
ziplTest zipl.1 remove/z1.2 --remove-kernel=DEFAULT |
ziplTest zipl.1 remove/z1.2 --remove-kernel=DEFAULT |
353 |
|
|
354 |
|
testing="Extlinux remove kernel" |
355 |
|
extlinuxTest extlinux.4 remove/extlinux4.1 --boot-filesystem=/ \ |
356 |
|
--remove-kernel=/boot/vmlinuz-3.11.7-301.fc20.i686 |
357 |
|
extlinuxTest extlinux.3 remove/extlinux3.1 --boot-filesystem=/ \ |
358 |
|
--remove-kernel=DEFAULT |
359 |
|
|
360 |
testing="GRUB update kernel argument handling" |
testing="GRUB update kernel argument handling" |
361 |
grubTest grub.1 updargs/g1.1 --update-kernel=DEFAULT --args="root=/dev/hda1" |
grubTest grub.1 updargs/g1.1 --update-kernel=DEFAULT --args="root=/dev/hda1" |
362 |
grubTest grub.1 updargs/g1.2 --update-kernel=DEFAULT \ |
grubTest grub.1 updargs/g1.2 --update-kernel=DEFAULT \ |
409 |
liloTest lilo.3 updargs/l3.2 --update-kernel=ALL \ |
liloTest lilo.3 updargs/l3.2 --update-kernel=ALL \ |
410 |
--remove-args="single" --args "root=/dev/hda2" |
--remove-args="single" --args "root=/dev/hda2" |
411 |
|
|
412 |
|
testing="Extlinux update kernel argument handling" |
413 |
|
extlinuxTest extlinux.1 updargs/extlinux1.1 --update-kernel=DEFAULT --args="root=/dev/hda1" |
414 |
|
extlinuxTest extlinux.1 updargs/extlinux1.2 --update-kernel=DEFAULT \ |
415 |
|
--args="root=/dev/hda1 hda=ide-scsi root=/dev/hda2" |
416 |
|
extlinuxTest extlinux.3 updargs/extlinux3.1 --update-kernel=DEFAULT --args "hdd=notide-scsi" |
417 |
|
extlinuxTest extlinux.3 updargs/extlinux3.2 --update-kernel=DEFAULT \ |
418 |
|
--args "hdd=notide-scsi root=/dev/hdd1" |
419 |
|
extlinuxTest extlinux.3 updargs/extlinux3.2 --update-kernel=DEFAULT \ |
420 |
|
--args "root=/dev/hdd1 hdd=notide-scsi" |
421 |
|
extlinuxTest extlinux.3 updargs/extlinux3.4 --update-kernel=ALL --remove-args="hdd" |
422 |
|
extlinuxTest extlinux.3 updargs/extlinux3.4 --update-kernel=ALL --remove-args="hdd=ide-scsi" |
423 |
|
extlinuxTest extlinux.3 updargs/extlinux3.4 --update-kernel=ALL --remove-args="hdd=foobar" |
424 |
|
extlinuxTest extlinux.3 updargs/extlinux3.7 --update-kernel=ALL \ |
425 |
|
--remove-args="hdd root ro" |
426 |
|
extlinuxTest extlinux.4 updargs/extlinux4.2 --boot-filesystem=/ \ |
427 |
|
--update-kernel=ALL --args "hde=ide-scsi" |
428 |
|
extlinuxTest extlinux.4 updargs/extlinux4.3 --boot-filesystem=/ \ |
429 |
|
--update-kernel=DEFAULT --args "hde=ide-scsi" |
430 |
|
extlinuxTest extlinux.4 updargs/extlinux4.4 --boot-filesystem=/ \ |
431 |
|
--update-kernel=/vmlinuz-3.12.0-2.fc21.i686 \ |
432 |
|
--args "ro root=LABEL=/ console=tty0 console=ttyS1,9600n81 single" |
433 |
|
extlinuxTest extlinux.4 updargs/extlinux4.5 --boot-filesystem=/ \ |
434 |
|
--update-kernel=ALL --args "root=/dev/hda2" |
435 |
|
|
436 |
testing="LILO add kernel" |
testing="LILO add kernel" |
437 |
liloTest lilo.4 add/l4.1 --add-kernel=/boot/new-kernel.img --title="title" \ |
liloTest lilo.4 add/l4.1 --add-kernel=/boot/new-kernel.img --title="title" \ |
438 |
--copy-default --boot-filesystem=/boot |
--copy-default --boot-filesystem=/boot |
474 |
--initrd=/boot/new-initrd --boot-filesystem=/boot --copy-default \ |
--initrd=/boot/new-initrd --boot-filesystem=/boot --copy-default \ |
475 |
--args='console=tty0 console=ttyS1,9600n81 single' |
--args='console=tty0 console=ttyS1,9600n81 single' |
476 |
|
|
477 |
testing="GRUB2 add kernel" |
testgrub2=n |
478 |
grub2Test grub2.1 add/g2-1.1 --add-kernel=/boot/new-kernel.img --title='title' \ |
ARCH=$(uname -m | sed s,i[3456789]86,ia32,) |
479 |
--initrd=/boot/new-initrd --boot-filesystem=/boot/ --copy-default |
case $ARCH in |
480 |
grub2Test grub2.1 add/g2-1.6 --add-kernel=/boot/new-kernel.img --title='title' \ |
aarch64|ppc|ppc64|ia32|x86_64) testgrub2=y ;; |
481 |
--initrd=/boot/new-initrd --boot-filesystem=/boot/ --copy-default --efi |
esac |
482 |
grub2Test grub2.6 add/g2-1.7 --add-kernel=/boot/new-kernel.img --title='title' \ |
|
483 |
--initrd=/boot/new-initrd --boot-filesystem=/boot/ --copy-default --efi |
if [ "$testgrub2" == "y" ]; then |
484 |
grub2Test grub2.1 add/g2-1.2 --add-kernel=/boot/new-kernel.img --title='title' \ |
testing="GRUB2 add kernel" |
485 |
--initrd=/boot/new-initrd --boot-filesystem=/boot/ \ |
grub2Test grub2.1 add/g2-1.1 --add-kernel=/boot/new-kernel.img \ |
486 |
--copy-default --make-default |
--title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \ |
487 |
grub2Test grub2.1 add/g2-1.3 --add-kernel=/boot/new-kernel.img --title='title' \ |
--copy-default |
488 |
--boot-filesystem=/boot/ --copy-default --make-default |
case $ARCH in |
489 |
grub2Test grub2.1 remove/g2-1.4 --remove-kernel=/boot/vmlinuz-2.6.38.2-9.fc15.x86_64 \ |
aarch64) |
490 |
--boot-filesystem=/boot/ |
grub2Test grub2.1 add/g2-1.1 --add-kernel=/boot/new-kernel.img \ |
491 |
grub2Test grub2.5 add/g2-1.5 --add-kernel=/boot/new-kernel.img --title='title' \ |
--title='title' \ |
492 |
--initrd=/boot/new-initrd --boot-filesystem=/boot/ --copy-default |
--initrd=/boot/new-initrd --boot-filesystem=/boot/ \ |
493 |
|
--copy-default --efi |
494 |
testing="GRUB2 add initrd" |
;; |
495 |
grub2Test grub2.2 add/g2-1.4 --update-kernel=/boot/new-kernel.img \ |
*) |
496 |
--initrd=/boot/new-initrd --boot-filesystem=/boot/ |
grub2Test grub2.1 add/g2-1.6 --add-kernel=/boot/new-kernel.img \ |
497 |
|
--title='title' \ |
498 |
testing="GRUB2 display default index" |
--initrd=/boot/new-initrd --boot-filesystem=/boot/ \ |
499 |
grub2DisplayTest grub2.1 defaultindex/0 --default-index |
--copy-default --efi |
500 |
grub2DisplayTest grub2.2 defaultindex/0 --default-index |
;; |
501 |
|
esac |
502 |
testing="GRUB2 display default title" |
grub2Test grub2.6 add/g2-1.7 --add-kernel=/boot/new-kernel.img \ |
503 |
grub2DisplayTest grub2.1 defaulttitle/g2.1 --default-title |
--title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \ |
504 |
grub2DisplayTest grub2.2 defaulttitle/g2.2 --default-title |
--copy-default --efi |
505 |
|
grub2Test grub2.1 add/g2-1.2 --add-kernel=/boot/new-kernel.img \ |
506 |
testing="GRUB2 display debug failure" |
--title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \ |
507 |
grub2DisplayTest grub2.1 debug/g2.1 --bad-image-bad --boot-filesystem=/boot --default-kernel --debug |
--copy-default --make-default |
508 |
testing="GRUB2 display debug success" |
grub2Test grub2.1 add/g2-1.3 --add-kernel=/boot/new-kernel.img \ |
509 |
grub2DisplayTest grub2.1 debug/g2.1.2 --boot-filesystem=/boot --default-kernel --debug |
--title='title' --boot-filesystem=/boot/ --copy-default --make-default |
510 |
|
grub2Test grub2.1 remove/g2-1.4 \ |
511 |
testing="GRUB2 remove kernel via index" |
--remove-kernel=/boot/vmlinuz-2.6.38.2-9.fc15.x86_64 \ |
512 |
grub2Test grub2.3 remove/g2-1.1 --remove-kernel=1 |
--boot-filesystem=/boot/ |
513 |
|
grub2Test grub2.5 add/g2-1.5 --add-kernel=/boot/new-kernel.img \ |
514 |
testing="GRUB2 remove kernel via title" |
--title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \ |
515 |
grub2Test grub2.3 remove/g2-1.1 --remove-kernel="TITLE=title2" |
--copy-default |
516 |
|
grub2Test grub2.12 add/g2-1.12 \ |
517 |
testing="GRUB2 (submenu) remove kernel via index" |
--add-kernel=/boot/vmlinuz-2.6.38.8-32.fc15.x86_64 \ |
518 |
grub2Test grub2.4 remove/g2-1.2 --remove-kernel=2 |
--title='Linux, with Fedora 2.6.38.8-32.fc15.x86_64' \ |
519 |
|
--devtree='/boot/dtb-2.6.38.8-32.fc15.x86_64/foobarbaz.dtb' \ |
520 |
testing="GRUB2 (submenu) remove kernel via title" |
--initrd=/boot/initramfs-2.6.38.8-32.fc15.x86_64.img \ |
521 |
grub2Test grub2.4 remove/g2-1.2 --remove-kernel="TITLE=title2" |
--boot-filesystem=/boot/ --copy-default --efi |
522 |
|
grub2Test grub2.13 add/g2-1.13 \ |
523 |
testing="GRUB2 default index directive" |
--add-kernel=/boot/vmlinuz-2.6.38.8-32.fc15.x86_64 \ |
524 |
grub2Test grub2.1 setdefaultindex/g2.1.0 --set-default-index=0 |
--title='Linux, with Fedora 2.6.38.8-32.fc15.x86_64' \ |
525 |
grub2Test grub2.1 setdefaultindex/g2.1.1 --set-default-index=1 |
--devtree='/boot/dtb-2.6.38.8-32.fc15.x86_64/foobarbaz.dtb' \ |
526 |
grub2Test grub2.1 setdefaultindex/g2.1.9 --set-default-index=9 |
--initrd=/boot/initramfs-2.6.38.8-32.fc15.x86_64.img \ |
527 |
|
--boot-filesystem=/boot/ --copy-default --efi |
528 |
|
|
529 |
|
testing="GRUB2 add initrd" |
530 |
|
grub2Test grub2.2 add/g2-1.4 --update-kernel=/boot/new-kernel.img \ |
531 |
|
--initrd=/boot/new-initrd --boot-filesystem=/boot/ |
532 |
|
|
533 |
|
testing="GRUB2 display default index" |
534 |
|
grub2DisplayTest grub2.1 defaultindex/0 --default-index |
535 |
|
grub2DisplayTest grub2.2 defaultindex/0 --default-index |
536 |
|
|
537 |
|
testing="GRUB2 display default title" |
538 |
|
grub2DisplayTest grub2.1 defaulttitle/g2.1 --default-title |
539 |
|
grub2DisplayTest grub2.2 defaulttitle/g2.2 --default-title |
540 |
|
|
541 |
|
testing="GRUB2 display debug failure" |
542 |
|
grub2DisplayTest grub2.1 debug/g2.1 --bad-image-bad \ |
543 |
|
--boot-filesystem=/boot --default-kernel --debug |
544 |
|
testing="GRUB2 display debug success" |
545 |
|
grub2DisplayTest grub2.1 debug/g2.1.2 --boot-filesystem=/boot \ |
546 |
|
--default-kernel --debug |
547 |
|
|
548 |
|
testing="GRUB2 remove kernel via index" |
549 |
|
grub2Test grub2.3 remove/g2-1.1 --remove-kernel=1 |
550 |
|
|
551 |
|
testing="GRUB2 remove kernel via title" |
552 |
|
grub2Test grub2.3 remove/g2-1.1 --remove-kernel="TITLE=title2" |
553 |
|
|
554 |
|
testing="GRUB2 (submenu) remove kernel via index" |
555 |
|
grub2Test grub2.4 remove/g2-1.2 --remove-kernel=2 |
556 |
|
|
557 |
|
testing="GRUB2 (submenu) remove kernel via title" |
558 |
|
grub2Test grub2.4 remove/g2-1.2 --remove-kernel="TITLE=title2" |
559 |
|
|
560 |
|
testing="GRUB2 default index directive" |
561 |
|
grub2Test grub2.1 setdefaultindex/g2.1.0 --set-default-index=0 |
562 |
|
grub2Test grub2.1 setdefaultindex/g2.1.1 --set-default-index=1 |
563 |
|
grub2Test grub2.1 setdefaultindex/g2.1.9 --set-default-index=9 |
564 |
|
|
565 |
|
testing="GRUB2 add kernel with default=saved_entry" |
566 |
|
grub2Test grub2.7 add/g2-1.8 --env grubenv.1 \ |
567 |
|
--add-kernel=/boot/new-kernel.img \ |
568 |
|
--title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \ |
569 |
|
--copy-default |
570 |
|
commandTest "saved_default output" \ |
571 |
|
"grub2-editenv test/grub2-support_files/env_temp list" \ |
572 |
|
"saved_entry=Linux, with Fedora 2.6.38.8-32.fc15.x86_64" |
573 |
|
|
574 |
|
testing="GRUB2 add kernel with default=saved_entry and a terrible title" |
575 |
|
grub2Test grub2.7 add/g2-1.9 --env grubenv.1 \ |
576 |
|
--add-kernel=/boot/new-kernel.img \ |
577 |
|
--title='Fedora (3.10.3-300.fc19.x86_64) 19 (Schrödinger’s Cat)' \ |
578 |
|
--initrd=/boot/new-initrd --boot-filesystem=/boot/ \ |
579 |
|
--copy-default |
580 |
|
|
581 |
|
testing="GRUB2 set default with default=saved_entry and a terrible name" |
582 |
|
grub2Test grub2.9 add/g2-1.9 --env grubenv.1 --set-default-index=0 |
583 |
|
commandTest "saved_default output" \ |
584 |
|
"grub2-editenv test/grub2-support_files/env_temp list" \ |
585 |
|
'saved_entry=Fedora (3.10.3-300.fc19.x86_64) 19 (Schrödinger’s Cat)' |
586 |
|
|
587 |
|
testing="GRUB2 set default with default=saved_entry" |
588 |
|
grub2Test grub2.8 add/g2-1.8 --env grubenv.1 --set-default-index=0 |
589 |
|
commandTest "saved_default output" \ |
590 |
|
"grub2-editenv test/grub2-support_files/env_temp list" \ |
591 |
|
"saved_entry=title" |
592 |
|
|
593 |
|
testing="GRUB2 --default-index with default=saved_entry" |
594 |
|
grub2DisplayTest grub2.8 defaultindex/1 --env grubenv.1 --default-index |
595 |
|
|
596 |
|
testing="GRUB2 --default-index with default=saved_entry" |
597 |
|
grub2DisplayTest grub2.8 defaultindex/0 --env grubenv.2 --default-index |
598 |
|
|
599 |
|
testing="GRUB2 --default-title with default=saved_entry" |
600 |
|
grub2DisplayTest grub2.8 defaulttitle/g2.1 --env grubenv.1 --default-title |
601 |
|
|
602 |
|
testing="GRUB2 --default-index with default=saved_entry and empty grubenv" |
603 |
|
grub2DisplayTest grub2.8 defaultindex/0 --env grubenv.0 --default-index |
604 |
|
|
605 |
|
testlinux16=n |
606 |
|
case $ARCH in |
607 |
|
ia32|x86_64) testlinux16=y ;; |
608 |
|
esac |
609 |
|
|
610 |
|
if [ "$testlinux16" == "y" ]; then |
611 |
|
testing="GRUB2 add kernel with linux16" |
612 |
|
grub2Test grub2.10 add/g2-1.10 --add-kernel=/boot/new-kernel.img \ |
613 |
|
--title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \ |
614 |
|
--copy-default |
615 |
|
|
616 |
|
testing="GRUB2 add initrd with linux16" |
617 |
|
grub2Test grub2.11 add/g2-1.11 --update-kernel=/boot/new-kernel.img \ |
618 |
|
--initrd=/boot/new-initrd --boot-filesystem=/boot/ |
619 |
|
fi |
620 |
|
fi |
621 |
|
|
622 |
testing="YABOOT add kernel" |
testing="YABOOT add kernel" |
623 |
yabootTest yaboot.1 add/y1.1 --copy-default --boot-filesystem=/ --add-kernel=/boot/new-kernel \ |
yabootTest yaboot.1 add/y1.1 --copy-default --boot-filesystem=/ --add-kernel=/boot/new-kernel \ |
631 |
ziplTest zipl.1 add/z1.1 --add-kernel=/boot/new-kernel.img --title test |
ziplTest zipl.1 add/z1.1 --add-kernel=/boot/new-kernel.img --title test |
632 |
ziplTest zipl.1 add/z1.2 --add-kernel=/boot/new-kernel.img --title test --copy-default |
ziplTest zipl.1 add/z1.2 --add-kernel=/boot/new-kernel.img --title test --copy-default |
633 |
|
|
634 |
|
testing="Extlinux add kernel" |
635 |
|
extlinuxTest extlinux.1 add/extlinux1.1 --add-kernel=/boot/new-kernel.img --title='title' \ |
636 |
|
--initrd=/boot/new-initrd --boot-filesystem=/ |
637 |
|
extlinuxTest extlinux.1 add/extlinux1.2 --add-kernel=/boot/new-kernel.img --title='title' \ |
638 |
|
--initrd=/boot/new-initrd --boot-filesystem=/boot |
639 |
|
extlinuxTest extlinux.1 add/extlinux1.3 --add-kernel=/boot/new-kernel.img --title='title' \ |
640 |
|
--initrd=/boot/new-initrd --boot-filesystem=/ --copy-default |
641 |
|
extlinuxTest extlinux.1 add/extlinux1.4 --add-kernel=/boot/new-kernel.img --title='title' \ |
642 |
|
--initrd=/boot/new-initrd --boot-filesystem=/boot --copy-default |
643 |
|
extlinuxTest extlinux.2 add/extlinux2.1 --add-kernel=/boot/vmlinuz-3.12.0-2.fc21.i686 \ |
644 |
|
--initrd=/boot/initrd-3.12.0-2.fc21.i686-new.img --boot-filesystem=/boot --copy-default \ |
645 |
|
--title="Fedora (3.12.0-2.fc21.i686) 20 (Heisenbug)" \ |
646 |
|
--remove-kernel="TITLE=Fedora (3.12.0-2.fc21.i686) 20 (Heisenbug)" |
647 |
|
|
648 |
testing="LILO long titles" |
testing="LILO long titles" |
649 |
liloTest lilo.1 longtitle/l1.1 --add-kernel=/boot/new-kernel.img \ |
liloTest lilo.1 longtitle/l1.1 --add-kernel=/boot/new-kernel.img \ |
650 |
--title="linux-longtitle" --copy-default --boot-filesystem=/boot |
--title="linux-longtitle" --copy-default --boot-filesystem=/boot |