Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2257 by niro, Mon Oct 21 14:01:48 2013 UTC revision 2695 by niro, Wed Jul 16 10:48:35 2014 UTC
# Line 158  commandTest() { Line 158  commandTest() {
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
# Line 316  grubTest grub.5 fallback/g5.3 --remove-k Line 316  grubTest grub.5 fallback/g5.3 --remove-k
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
# Line 339  testing="Z/IPL remove kernel" Line 351  testing="Z/IPL remove kernel"
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 \
# Line 355  grubTest grub.3 updargs/g3.7 --update-ke Line 373  grubTest grub.3 updargs/g3.7 --update-ke
373      --remove-args="hdd root ro"      --remove-args="hdd root ro"
374  grubTest grub.7 updargs/g7.2 --boot-filesystem=/    \  grubTest grub.7 updargs/g7.2 --boot-filesystem=/    \
375      --update-kernel=ALL --args "hde=ide-scsi"      --update-kernel=ALL --args "hde=ide-scsi"
 grubTest grub.7 updargs/g7.2 --boot-filesystem=/    \  
     --update-kernel=ALL --args "hde=ide-scsi"  
376  grubTest grub.7 updargs/g7.3 --boot-filesystem=/    \  grubTest grub.7 updargs/g7.3 --boot-filesystem=/    \
377      --update-kernel=DEFAULT --args "hde=ide-scsi"      --update-kernel=DEFAULT --args "hde=ide-scsi"
378  grubTest grub.7 updargs/g7.4 --boot-filesystem=/    \  grubTest grub.7 updargs/g7.4 --boot-filesystem=/    \
# Line 391  liloTest lilo.3 updargs/l3.1 --update-ke Line 407  liloTest lilo.3 updargs/l3.1 --update-ke
407  liloTest lilo.3 updargs/l3.2 --update-kernel=ALL \  liloTest lilo.3 updargs/l3.2 --update-kernel=ALL \
408      --remove-args="single" --args "root=/dev/hda2"      --remove-args="single" --args "root=/dev/hda2"
409    
410    testing="Extlinux update kernel argument handling"
411    extlinuxTest extlinux.1 updargs/extlinux1.1 --update-kernel=DEFAULT --args="root=/dev/hda1"
412    extlinuxTest extlinux.1 updargs/extlinux1.2 --update-kernel=DEFAULT \
413        --args="root=/dev/hda1 hda=ide-scsi root=/dev/hda2"
414    extlinuxTest extlinux.3 updargs/extlinux3.1 --update-kernel=DEFAULT --args "hdd=notide-scsi"
415    extlinuxTest extlinux.3 updargs/extlinux3.2 --update-kernel=DEFAULT \
416        --args "hdd=notide-scsi root=/dev/hdd1"
417    extlinuxTest extlinux.3 updargs/extlinux3.2 --update-kernel=DEFAULT \
418        --args "root=/dev/hdd1 hdd=notide-scsi"
419    extlinuxTest extlinux.3 updargs/extlinux3.4 --update-kernel=ALL --remove-args="hdd"
420    extlinuxTest extlinux.3 updargs/extlinux3.4 --update-kernel=ALL --remove-args="hdd=ide-scsi"
421    extlinuxTest extlinux.3 updargs/extlinux3.4 --update-kernel=ALL --remove-args="hdd=foobar"
422    extlinuxTest extlinux.3 updargs/extlinux3.7 --update-kernel=ALL \
423        --remove-args="hdd root ro"
424    extlinuxTest extlinux.4 updargs/extlinux4.2 --boot-filesystem=/    \
425        --update-kernel=ALL --args "hde=ide-scsi"
426    extlinuxTest extlinux.4 updargs/extlinux4.3 --boot-filesystem=/    \
427        --update-kernel=DEFAULT --args "hde=ide-scsi"
428    extlinuxTest extlinux.4 updargs/extlinux4.4 --boot-filesystem=/    \
429        --update-kernel=/vmlinuz-3.12.0-2.fc21.i686 \
430        --args "ro root=LABEL=/ console=tty0 console=ttyS1,9600n81 single"
431    extlinuxTest extlinux.4 updargs/extlinux4.5 --boot-filesystem=/    \
432        --update-kernel=ALL --args "root=/dev/hda2"
433    
434  testing="LILO add kernel"  testing="LILO add kernel"
435  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" \
436      --copy-default --boot-filesystem=/boot      --copy-default --boot-filesystem=/boot
# Line 443  if [ "$testgrub2" == "y" ]; then Line 483  if [ "$testgrub2" == "y" ]; then
483      grub2Test grub2.1 add/g2-1.1 --add-kernel=/boot/new-kernel.img \      grub2Test grub2.1 add/g2-1.1 --add-kernel=/boot/new-kernel.img \
484          --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \          --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
485          --copy-default          --copy-default
486      grub2Test grub2.1 add/g2-1.6 --add-kernel=/boot/new-kernel.img \      case $ARCH in
487          --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \          aarch64)
488          --copy-default --efi              grub2Test grub2.1 add/g2-1.1 --add-kernel=/boot/new-kernel.img \
489                    --title='title' \
490                    --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
491                    --copy-default --efi
492                ;;
493            *)
494                grub2Test grub2.1 add/g2-1.6 --add-kernel=/boot/new-kernel.img \
495                    --title='title' \
496                    --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
497                    --copy-default --efi
498                ;;
499        esac
500      grub2Test grub2.6 add/g2-1.7 --add-kernel=/boot/new-kernel.img \      grub2Test grub2.6 add/g2-1.7 --add-kernel=/boot/new-kernel.img \
501          --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \          --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
502          --copy-default --efi          --copy-default --efi
# Line 460  if [ "$testgrub2" == "y" ]; then Line 511  if [ "$testgrub2" == "y" ]; then
511      grub2Test grub2.5 add/g2-1.5 --add-kernel=/boot/new-kernel.img \      grub2Test grub2.5 add/g2-1.5 --add-kernel=/boot/new-kernel.img \
512          --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \          --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
513          --copy-default          --copy-default
514        grub2Test grub2.12 add/g2-1.12 \
515            --add-kernel=/boot/vmlinuz-2.6.38.8-32.fc15.x86_64 \
516            --title='Linux, with Fedora 2.6.38.8-32.fc15.x86_64' \
517            --devtree='/boot/dtb-2.6.38.8-32.fc15.x86_64/foobarbaz.dtb' \
518            --initrd=/boot/initramfs-2.6.38.8-32.fc15.x86_64.img \
519            --boot-filesystem=/boot/ --copy-default --efi
520        grub2Test grub2.13 add/g2-1.13 \
521            --add-kernel=/boot/vmlinuz-2.6.38.8-32.fc15.x86_64 \
522            --title='Linux, with Fedora 2.6.38.8-32.fc15.x86_64' \
523            --devtree='/boot/dtb-2.6.38.8-32.fc15.x86_64/foobarbaz.dtb' \
524            --initrd=/boot/initramfs-2.6.38.8-32.fc15.x86_64.img \
525            --boot-filesystem=/boot/ --copy-default --efi
526    
527      testing="GRUB2 add initrd"      testing="GRUB2 add initrd"
528      grub2Test grub2.2 add/g2-1.4 --update-kernel=/boot/new-kernel.img \      grub2Test grub2.2 add/g2-1.4 --update-kernel=/boot/new-kernel.img \
# Line 536  if [ "$testgrub2" == "y" ]; then Line 599  if [ "$testgrub2" == "y" ]; then
599    
600      testing="GRUB2 --default-index with default=saved_entry and empty grubenv"      testing="GRUB2 --default-index with default=saved_entry and empty grubenv"
601      grub2DisplayTest grub2.8 defaultindex/0 --env grubenv.0 --default-index      grub2DisplayTest grub2.8 defaultindex/0 --env grubenv.0 --default-index
602    
603        testlinux16=n
604        case $ARCH in
605            ia32|x86_64) testlinux16=y ;;
606        esac
607    
608        if [ "$testlinux16" == "y" ]; then
609            testing="GRUB2 add kernel with linux16"
610            grub2Test grub2.10 add/g2-1.10 --add-kernel=/boot/new-kernel.img \
611                --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
612                --copy-default
613    
614            testing="GRUB2 add initrd with linux16"
615            grub2Test grub2.11 add/g2-1.11 --update-kernel=/boot/new-kernel.img \
616                --initrd=/boot/new-initrd --boot-filesystem=/boot/
617        fi
618  fi  fi
619    
620  testing="YABOOT add kernel"  testing="YABOOT add kernel"
# Line 550  testing="Z/IPL add kernel" Line 629  testing="Z/IPL add kernel"
629  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
630  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
631    
632    testing="Extlinux add kernel"
633    extlinuxTest extlinux.1 add/extlinux1.1 --add-kernel=/boot/new-kernel.img --title='title' \
634        --initrd=/boot/new-initrd --boot-filesystem=/
635    extlinuxTest extlinux.1 add/extlinux1.2 --add-kernel=/boot/new-kernel.img --title='title' \
636        --initrd=/boot/new-initrd --boot-filesystem=/boot
637    extlinuxTest extlinux.1 add/extlinux1.3 --add-kernel=/boot/new-kernel.img --title='title' \
638        --initrd=/boot/new-initrd --boot-filesystem=/ --copy-default
639    extlinuxTest extlinux.1 add/extlinux1.4 --add-kernel=/boot/new-kernel.img --title='title' \
640        --initrd=/boot/new-initrd --boot-filesystem=/boot --copy-default
641    extlinuxTest extlinux.2 add/extlinux2.1 --add-kernel=/boot/vmlinuz-3.12.0-2.fc21.i686    \
642        --initrd=/boot/initrd-3.12.0-2.fc21.i686-new.img --boot-filesystem=/boot --copy-default \
643        --title="Fedora (3.12.0-2.fc21.i686) 20 (Heisenbug)"    \
644        --remove-kernel="TITLE=Fedora (3.12.0-2.fc21.i686) 20 (Heisenbug)"
645    
646  testing="LILO long titles"  testing="LILO long titles"
647  liloTest lilo.1 longtitle/l1.1 --add-kernel=/boot/new-kernel.img \  liloTest lilo.1 longtitle/l1.1 --add-kernel=/boot/new-kernel.img \
648      --title="linux-longtitle" --copy-default --boot-filesystem=/boot      --title="linux-longtitle" --copy-default --boot-filesystem=/boot

Legend:
Removed from v.2257  
changed lines
  Added in v.2695