Magellan Linux

Diff of /trunk/grubby/test.sh

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

trunk/mkinitrd-magellan/grubby/test.sh revision 532 by niro, Sat Sep 1 22:45:15 2007 UTC trunk/grubby/test.sh revision 2992 by niro, Thu Jun 30 10:35:14 2016 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2    #
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    
21    if [ -n "$TOPDIR" ]; then
22        LD_LIBRARY_PATH="$TOPDIR/nash:$TOPDIR/bdevid:/usr/lib:/lib"
23        export LD_LIBRARY_PATH
24    fi
25    
26  ARCH=$(uname -m)  #----------------------------------------------------------------------
27    # Global vars
28  elilotest=""  #----------------------------------------------------------------------
29  lilotest=""  
30  grubtest=""  cmd=${0##*/}
31  zipltest=""  opt_bootloader=*
32  yaboottest=""  opt_verbose=false
33    read -d '' usage <<EOT
34  case "$ARCH" in  usage: test.sh [ -hv ]
35      i?86)  
36   lilotest="yes"      -b B   --bootloader=B  Test bootloader B instead of all
37   grubtest="yes"      -h     --help          Show this help message
38   ;;      -v     --verbose       Verbose output
39      x86_64)  EOT
40   lilotest="yes"  declare -i pass=0 fail=0
41   grubtest="yes"  testing=
42   ;;  
43      ppc*)  #----------------------------------------------------------------------
44   yaboottest="yes"  # Functions
45   ;;  #----------------------------------------------------------------------
46      s390*)  
47   zipltest="yes"  oneTest() {
48   ;;      typeset mode=$1 cfg=test/$2 correct=test/results/$3
49      *)      shift 3
50   echo "Not running any tests for $ARCH"  
51   exit 0      local ENV_FILE=""
52  esac      if [ "$mode" == "--grub2" ]; then
53            ENV_FILE="test/grub2-support_files/env_temp"
54  export MALLOC_CHECK_=2          if [ "$1" == "--env" ]; then
55                cp "test/grub2-support_files/$2" "$ENV_FILE"
56  RESULT=0              shift 2
57            else
58  oneTest () {              cp "test/grub2-support_files/grubenv.0" "$ENV_FILE"
59      mode=$1          fi
60      cfg=test/$2          ENV_FILE="--env=$ENV_FILE"
61      correct=test/results/$3      fi
62      shift; shift; shift  
63      ./grubby $mode --bad-image-okay -c $cfg -o - "$@" | cmp $correct > /dev/null  
64        echo "$testing ... $mode $cfg $correct"
65      if [ $? != 0 ]; then      runme=( ./grubby "$mode" --bad-image-okay $ENV_FILE -c "$cfg" -o - "$@" )
66        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   echo -------------------------------------------------------------   echo -------------------------------------------------------------
78   echo FAILURE: $cfg $correct "$@"   echo -n "FAIL: "
79   echo -n ./grubby $mode --bad-image-okay -c $cfg -o -   printf "%q " "${runme[@]}"; echo
80   for arg in "$@"; do   "${runme[@]}" | diff -U30 "$correct" -
81      echo -n " \"$arg\""   echo
  done  
  echo ""  
  ./grubby $mode --bad-image-okay -c $cfg -o - "$@" | diff -u $correct -;  
  RESULT=1  
82      fi      fi
83  }  }
84    
85  liloTest() {  # Test feature that display some information, checking that output instead of
86      if [ -z "$lilotest" ]; then echo "skipping LILO test" ; return; fi  # the generated configuration file
87      oneTest --lilo "$@"  oneDisplayTest() {
88  }      typeset mode=$1 cfg=test/$2 correct=test/results/$3
89        shift 3
90  eliloTest() {  
91      if [ -z "$elilotest" ]; then echo "skipping ELILO test" ; return; fi      local ENV_FILE=""
92      oneTest --elilo "$@"      if [ "$mode" == "--grub2" ]; then
93  }          ENV_FILE="test/grub2-support_files/env_temp"
94            if [ "$1" == "--env" ]; then
95  grubTest() {              cp "test/grub2-support_files/$2" "$ENV_FILE"
96      if [ -z "$grubtest" ]; then echo "skipping GRUB test" ; return; fi              shift 2
97      oneTest --grub "$@"          else
98  }              cp "test/grub2-support_files/grubenv.0" "$ENV_FILE"
99            fi
100  yabootTest() {          ENV_FILE="--env=$ENV_FILE"
101      if [ -z "$yaboottest" ]; then echo "skipping YABOOT test" ; return; fi      fi
102      oneTest --yaboot "$@"  
103        local BIO="--bad-image-okay"
104        if [ "$1" == "--bad-image-bad" ]; then
105            BIO=""
106            shift
107        fi
108    
109        echo "$testing ... $mode $cfg $correct"
110        runme=( ./grubby "$mode" $BIO $ENV_FILE -c "$cfg" "$@" )
111        if "${runme[@]}" 2>&1 | cmp "$correct" > /dev/null; then
112     (( pass++ ))
113     if $opt_verbose; then
114        echo -------------------------------------------------------------
115        echo -n "PASS: "
116        printf "%q " "${runme[@]}"; echo
117        "${runme[@]}" 2>&1 | diff -U30 "$cfg" -
118        echo
119     fi
120        else
121     (( fail++ ))
122     echo -------------------------------------------------------------
123     echo -n "FAIL: "
124     printf "%q " "${runme[@]}"; echo
125     "${runme[@]}" 2>&1 | diff -U30 "$correct" -
126     echo
127        fi
128  }  }
129    
130  ziplTest() {  commandTest() {
131      if [ -z "$zipltest" ]; then echo "skipping Z/IPL test" ; return; fi      description=$1
132      oneTest --zipl "$@"      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  echo "Parse/write comparison..."  # generate convenience functions
160  for n in $(cd test; echo grub.[0-9]*); do  for b in $(./grubby --help | \
161      grubTest $n ../$n --remove-kernel 1234   sed -n 's/^.*--\([^ ]*\) *configure \1 bootloader.*/\1/p'); do
162        eval "${b}Test() { [[ \"$b\" == \$opt_bootloader ]] && oneTest --$b \"\$@\"; }"
163        eval "${b}DisplayTest() { [[ \"$b\" == \$opt_bootloader ]] && oneDisplayTest --$b \"\$@\"; }"
164  done  done
165    
166  for n in $(cd test; echo lilo.[0-9]*); do  #----------------------------------------------------------------------
167      liloTest $n ../$n --remove-kernel 1234  # Main
168    #----------------------------------------------------------------------
169    
170    # 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  done
182    
183  echo "Permission preservation..."  export MALLOC_CHECK_=2
184  cp test/grub.1 grub-test  if [ -n "${RANDOM}" ]; then
185  chmod 0614 grub-test      export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))
186  touch -t 200301010101.00 grub-test  else
187  time=$(ls -l grub-test | awk '{ print $6 " " $7 " "$8}')      export MALLOC_PERTURB_=1
 perm=$(ls -l grub-test | awk '{print $1}')  
 ./grubby --grub --add-kernel bar --title title -c grub-test  
 newtime=$(ls -l grub-test | awk '{ print $6 " " $7 " "$8}')  
 newperm=$(ls -l grub-test | awk '{print $1}')  
 if [ "$time" == "$newtime" -o "$perm" != "$newperm" ]; then  
     echo "  failed ($perm $newperm)";  
188  fi  fi
 rm -f grub-test  
189    
190  cp test/lilo.1 lilo-test  testing="Parse/write comparison"
191  chmod 0614 lilo-test  for n in test/*.[0-9]*; do
192  touch -t 200301010101.00 lilo-test      [ -d $n ] && continue
193  time=$(ls -l lilo-test | awk '{ print $6 " " $7 " "$8}')      n=${n#*/} # remove test/
194  perm=$(ls -l lilo-test | awk '{print $1}')      b=${n%.*} # remove suffix
195  ./grubby --lilo --add-kernel bar --title title -c lilo-test      [[ $b == $opt_bootloader ]] || continue
196  newtime=$(ls -l lilo-test | awk '{ print $6 " " $7 " "$8}')      ${b}Test $n ../$n --remove-kernel 1234
197  newperm=$(ls -l lilo-test | awk '{print $1}')  done
 if [ "$time" == "$newtime" -o "$perm" != "$newperm" ]; then  
     echo "  failed ($perm $newperm)";  
 fi  
 rm -f lilo-test  
198    
199  echo "Following symlinks..."  testing="Permission preservation"
200  cp test/grub.1 grub-test  unset b
201  ln -s grub-test mytest  for n in test/*.[0-9]*; do
202  ./grubby --grub --add-kernel bar --title title -c mytest      n=${n#*/} # remove test/
203  if [ ! -L mytest ]; then      [[ ${n%.*} == "$b" ]] && continue
204      echo " failed (not a symlink)"      b=${n%.*} # remove suffix
205  fi      [[ $b == $opt_bootloader ]] || continue
206  target=$(ls -l mytest | awk '{ print $11 }')  
207  if [ "$target" != grub-test ]; then      echo "$testing ... --$b"
208      echo "  failed (wrong target)"  
209  fi      cp test/$n ${b}-test
210  rm -f grub-test mytest      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    done
229    
230    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    
238        echo "$testing ... --$b"
239    
240        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    
258  echo "GRUB default directive..."  testing="GRUB default directive"
259  grubTest grub.1 default/g1.1 --boot-filesystem=/boot --add-kernel /boot/new-kernel --title Some_Title  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  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  grubTest grub.3 default/g3.1 --boot-filesystem=/boot --set-default=/boot/vmlinuz-2.4.7-2
# Line 135  grubTest grub.4 default/g4.1 --boot-file Line 264  grubTest grub.4 default/g4.1 --boot-file
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  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=/  grubTest grub.6 default/g6.1 --remove-kernel=/boot/vmlinuz-2.4.7-2.9 --boot-filesystem=/
266    
267  echo "LILO default directive..."  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    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    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    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    testing="GRUB display default kernel"
302    grubDisplayTest grub.1 defaultkernel/g.1 --default-kernel
303    
304    testing="LILO default directive"
305  liloTest lilo.1 default/l1.1 --set-default=/boot/vmlinuz-2.4.18-4  liloTest lilo.1 default/l1.1 --set-default=/boot/vmlinuz-2.4.18-4
306  liloTest lilo.1 default/l1.2 --remove-kernel=/boot/vmlinuz-2.4.18-4smp  liloTest lilo.1 default/l1.2 --remove-kernel=/boot/vmlinuz-2.4.18-4smp
307  liloTest lilo.1 default/l1.3 --add-kernel /boot/kernel --title label \  liloTest lilo.1 default/l1.3 --add-kernel /boot/kernel --title label \
308      --copy-default      --copy-default
309  liloTest lilo.1 default/l1.4 --add-kernel /boot/kernel --title label \  liloTest lilo.1 default/l1.4 --add-kernel /boot/kernel --title label \
310      --copy-default --make-default      --copy-default --make-default
311    liloDisplayTest lilo.1 defaultkernel/l1.1 --default-kernel
312    
313  echo "Z/IPL default directive..."  testing="Z/IPL default directive"
314  ziplTest zipl.1 default/z1.1 --add-kernel /boot/new-kernel --title test  ziplTest zipl.1 default/z1.1 --add-kernel /boot/new-kernel --title test
315  ziplTest zipl.1 default/z1.2 --add-kernel /boot/new-kernel --title test --make-default  ziplTest zipl.1 default/z1.2 --add-kernel /boot/new-kernel --title test --make-default
316    testing="Z/IPL display default index"
317    ziplDisplayTest zipl.1 defaultindex/0 --default-index
318    testing="Z/IPL display default title"
319    ziplDisplayTest zipl.1 defaulttitle/z.1 --default-title
320    testing="Z/IPL display default kernel"
321    ziplDisplayTest zipl.1 defaultkernel/z.1 --default-kernel
322    
323  echo "GRUB fallback directive..."  testing="GRUB fallback directive"
324  grubTest grub.5 fallback/g5.1 --remove-kernel=/boot/vmlinuz-2.4.7-ac3 \  grubTest grub.5 fallback/g5.1 --remove-kernel=/boot/vmlinuz-2.4.7-ac3 \
325      --boot-filesystem=/      --boot-filesystem=/
326  grubTest grub.5 fallback/g5.2 --remove-kernel=/boot/vmlinuz-2.4.7-2.5 \  grubTest grub.5 fallback/g5.2 --remove-kernel=/boot/vmlinuz-2.4.7-2.5 \
# Line 156  grubTest grub.5 fallback/g5.3 --remove-k Line 329  grubTest grub.5 fallback/g5.3 --remove-k
329      --boot-filesystem=/ --copy-default --add-kernel=/boot/new-kernel \      --boot-filesystem=/ --copy-default --add-kernel=/boot/new-kernel \
330      --title="Some_Title"      --title="Some_Title"
331    
332  echo "GRUB new kernel argument handling..."  testing="Extlinux default directive"
333    extlinuxTest extlinux.1 default/extlinux1.1 --boot-filesystem=/boot --add-kernel /boot/new-kernel --title Some_Title
334    extlinuxTest extlinux.1 default/extlinux1.2 --boot-filesystem=/boot --add-kernel /boot/new-kernel --title Some_Title --make-default
335    extlinuxTest extlinux.3 default/extlinux3.1 --boot-filesystem=/boot --set-default=/boot/vmlinuz-3.12.0-2.fc21.i686
336    extlinuxTest extlinux.3 default/extlinux3.2 --boot-filesystem=/boot --set-default=/boot/vmlinuz-3.12.0-2.fc21.i686+PAE
337    
338    testing="GRUB new kernel argument handling"
339  grubTest grub.1 args/g1.1 --boot-filesystem=/boot \  grubTest grub.1 args/g1.1 --boot-filesystem=/boot \
340      --add-kernel=/boot/foo --title=some_title --args="1234" --copy-default      --add-kernel=/boot/foo --title=some_title --args="1234" --copy-default
341  grubTest grub.1 args/g1.2 --boot-filesystem=/boot \  grubTest grub.1 args/g1.2 --boot-filesystem=/boot \
342      --add-kernel=/boot/foo --title=some_title --args="1234"      --add-kernel=/boot/foo --title=some_title --args="1234"
343    
344  echo "GRUB remove kernel..."  testing="Extlinux new kernel argument handling"
345    extlinuxTest extlinux.1 args/extlinux1.1 --boot-filesystem=/boot \
346        --add-kernel=/boot/foo --title=some_title --args="1234" --copy-default
347    extlinuxTest extlinux.1 args/extlinux1.2 --boot-filesystem=/boot \
348        --add-kernel=/boot/foo --title=some_title --args="1234"
349    
350    testing="GRUB remove kernel"
351  grubTest grub.7 remove/g7.1 --boot-filesystem=/ \  grubTest grub.7 remove/g7.1 --boot-filesystem=/ \
352      --remove-kernel=/boot/vmlinuz-2.4.7-2.5      --remove-kernel=/boot/vmlinuz-2.4.7-2.5
353  grubTest grub.3 remove/g3.1 --boot-filesystem=/ \  grubTest grub.3 remove/g3.1 --boot-filesystem=/ \
# Line 170  grubTest grub.3 remove/g3.1 --boot-files Line 355  grubTest grub.3 remove/g3.1 --boot-files
355  grubTest grub.9 remove/g9.1 --boot-filesystem=/boot \  grubTest grub.9 remove/g9.1 --boot-filesystem=/boot \
356      --remove-kernel=/boot/vmlinuz-2.4.7-2      --remove-kernel=/boot/vmlinuz-2.4.7-2
357    
358  echo "YABOOT remove kernel..."  testing="YABOOT remove kernel"
359  yabootTest yaboot.1 remove/y1.1 --boot-filesystem=/ --remove-kernel=DEFAULT  yabootTest yaboot.1 remove/y1.1 --boot-filesystem=/ --remove-kernel=DEFAULT
360  yabootTest yaboot.1 remove/y1.2 --boot-filesystem=/ --remove-kernel=/boot/vmlinuz-2.5.50-eepro  yabootTest yaboot.1 remove/y1.2 --boot-filesystem=/ --remove-kernel=/boot/vmlinuz-2.5.50-eepro
361  yabootTest yaboot.2 remove/y2.1 --boot-filesystem=/ --remove-kernel=/boot/vmlinux-2.5.50  yabootTest yaboot.2 remove/y2.1 --boot-filesystem=/ --remove-kernel=/boot/vmlinux-2.5.50
362    
363  echo "Z/IPL remove kernel..."  testing="Z/IPL remove kernel"
364  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
365  ziplTest zipl.1 remove/z1.2 --remove-kernel=DEFAULT  ziplTest zipl.1 remove/z1.2 --remove-kernel=DEFAULT
366    
367  echo "GRUB update kernel argument handling..."  testing="Extlinux remove kernel"
368    extlinuxTest extlinux.4 remove/extlinux4.1 --boot-filesystem=/ \
369        --remove-kernel=/boot/vmlinuz-3.11.7-301.fc20.i686
370    extlinuxTest extlinux.3 remove/extlinux3.1 --boot-filesystem=/ \
371        --remove-kernel=DEFAULT
372    
373    testing="GRUB update kernel argument handling"
374  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"
375  grubTest grub.1 updargs/g1.2 --update-kernel=DEFAULT \  grubTest grub.1 updargs/g1.2 --update-kernel=DEFAULT \
376      --args="root=/dev/hda1 hda=ide-scsi root=/dev/hda2"      --args="root=/dev/hda1 hda=ide-scsi root=/dev/hda2"
# Line 195  grubTest grub.3 updargs/g3.7 --update-ke Line 386  grubTest grub.3 updargs/g3.7 --update-ke
386      --remove-args="hdd root ro"      --remove-args="hdd root ro"
387  grubTest grub.7 updargs/g7.2 --boot-filesystem=/    \  grubTest grub.7 updargs/g7.2 --boot-filesystem=/    \
388      --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"  
389  grubTest grub.7 updargs/g7.3 --boot-filesystem=/    \  grubTest grub.7 updargs/g7.3 --boot-filesystem=/    \
390      --update-kernel=DEFAULT --args "hde=ide-scsi"      --update-kernel=DEFAULT --args "hde=ide-scsi"
391  grubTest grub.7 updargs/g7.4 --boot-filesystem=/    \  grubTest grub.7 updargs/g7.4 --boot-filesystem=/    \
392      --update-kernel=/vmlinuz-2.4.7-2 \      --update-kernel=/vmlinuz-2.4.7-2 \
393      --args "ro root=LABEL=/ console=tty0 console=ttyS1,9600n81 single"      --args "ro root=LABEL=/ console=tty0 console=ttyS1,9600n81 single"
394    grubTest grub.7 updargs/g7.5 --boot-filesystem=/    \
395        --update-kernel=ALL --args "root=/dev/hda2"
396  grubTest grub.11 updargs/g11.1 --boot-filesystem=/    \  grubTest grub.11 updargs/g11.1 --boot-filesystem=/    \
397      --update-kernel=/vmlinuz-2.4.7-2smp \      --update-kernel=/vmlinuz-2.4.7-2smp \
398      --args "ro root=LABEL=/ console=tty0 console=ttyS1,9600n81 single"      --args "ro root=LABEL=/ console=tty0 console=ttyS1,9600n81 single"
# Line 209  grubTest grub.11 updargs/g11.2 --boot-fi Line 400  grubTest grub.11 updargs/g11.2 --boot-fi
400      --update-kernel=/vmlinuz-2.4.7-2smp \      --update-kernel=/vmlinuz-2.4.7-2smp \
401      --args "ro root=LABEL=/ single"      --args "ro root=LABEL=/ single"
402    
403  echo "LILO update kernel argument handling..."  testing="GRUB lba and root information on SuSE systems"
404    GRUBBY_SUSE_RELEASE=test/grub.12-support_files/etc/SuSE-release \
405        GRUBBY_SUSE_GRUB_CONF=test/grub.12-support_files/etc/grub.conf \
406        GRUBBY_GRUB_DEVICE_MAP=test/grub.12-support_files/boot/grub/device.map \
407        grubTest grub.12 info/g12.1 --info=0
408    
409    testing="LILO update kernel argument handling"
410  liloTest lilo.1 updargs/l1.1 --update-kernel=/boot/vmlinuz-2.4.18-4 \  liloTest lilo.1 updargs/l1.1 --update-kernel=/boot/vmlinuz-2.4.18-4 \
411      --args="root=/dev/md1"      --args="root=/dev/md1"
412  liloTest lilo.1 updargs/l1.2 --update-kernel=/boot/vmlinuz-2.4.18-4smp \  liloTest lilo.1 updargs/l1.2 --update-kernel=/boot/vmlinuz-2.4.18-4smp \
# Line 223  liloTest lilo.3 updargs/l3.1 --update-ke Line 420  liloTest lilo.3 updargs/l3.1 --update-ke
420  liloTest lilo.3 updargs/l3.2 --update-kernel=ALL \  liloTest lilo.3 updargs/l3.2 --update-kernel=ALL \
421      --remove-args="single" --args "root=/dev/hda2"      --remove-args="single" --args "root=/dev/hda2"
422    
423  echo "LILO add kernel..."  testing="Extlinux update kernel argument handling"
424    extlinuxTest extlinux.1 updargs/extlinux1.1 --update-kernel=DEFAULT --args="root=/dev/hda1"
425    extlinuxTest extlinux.1 updargs/extlinux1.2 --update-kernel=DEFAULT \
426        --args="root=/dev/hda1 hda=ide-scsi root=/dev/hda2"
427    extlinuxTest extlinux.3 updargs/extlinux3.1 --update-kernel=DEFAULT --args "hdd=notide-scsi"
428    extlinuxTest extlinux.3 updargs/extlinux3.2 --update-kernel=DEFAULT \
429        --args "hdd=notide-scsi root=/dev/hdd1"
430    extlinuxTest extlinux.3 updargs/extlinux3.2 --update-kernel=DEFAULT \
431        --args "root=/dev/hdd1 hdd=notide-scsi"
432    extlinuxTest extlinux.3 updargs/extlinux3.4 --update-kernel=ALL --remove-args="hdd"
433    extlinuxTest extlinux.3 updargs/extlinux3.4 --update-kernel=ALL --remove-args="hdd=ide-scsi"
434    extlinuxTest extlinux.3 updargs/extlinux3.4 --update-kernel=ALL --remove-args="hdd=foobar"
435    extlinuxTest extlinux.3 updargs/extlinux3.7 --update-kernel=ALL \
436        --remove-args="hdd root ro"
437    extlinuxTest extlinux.4 updargs/extlinux4.2 --boot-filesystem=/    \
438        --update-kernel=ALL --args "hde=ide-scsi"
439    extlinuxTest extlinux.4 updargs/extlinux4.3 --boot-filesystem=/    \
440        --update-kernel=DEFAULT --args "hde=ide-scsi"
441    extlinuxTest extlinux.4 updargs/extlinux4.4 --boot-filesystem=/    \
442        --update-kernel=/vmlinuz-3.12.0-2.fc21.i686 \
443        --args "ro root=LABEL=/ console=tty0 console=ttyS1,9600n81 single"
444    extlinuxTest extlinux.4 updargs/extlinux4.5 --boot-filesystem=/    \
445        --update-kernel=ALL --args "root=/dev/hda2"
446    
447    testing="LILO add kernel"
448  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" \
449      --copy-default --boot-filesystem=/boot      --copy-default --boot-filesystem=/boot
450  liloTest lilo.4 add/l4.2 --add-kernel=/boot/new-kernel.img --title="linux" \  liloTest lilo.4 add/l4.2 --add-kernel=/boot/new-kernel.img --title="linux" \
# Line 238  liloTest lilo.6 add/l6.2 --add-kernel=/b Line 459  liloTest lilo.6 add/l6.2 --add-kernel=/b
459    --initrd=/boot/new-initrd --copy-default --boot-filesystem=/boot --remove-kernel "TITLE=linux"    --initrd=/boot/new-initrd --copy-default --boot-filesystem=/boot --remove-kernel "TITLE=linux"
460    
461    
462  echo "GRUB add kernel..."  testing="GRUB add kernel"
463  grubTest grub.1 add/g1.1 --add-kernel=/boot/new-kernel.img --title='title' \  grubTest grub.1 add/g1.1 --add-kernel=/boot/new-kernel.img --title='title' \
464      --initrd=/boot/new-initrd --boot-filesystem=/      --initrd=/boot/new-initrd --boot-filesystem=/
465  grubTest grub.1 add/g1.2 --add-kernel=/boot/new-kernel.img --title='title' \  grubTest grub.1 add/g1.2 --add-kernel=/boot/new-kernel.img --title='title' \
# Line 247  grubTest grub.1 add/g1.3 --add-kernel=/b Line 468  grubTest grub.1 add/g1.3 --add-kernel=/b
468      --initrd=/boot/new-initrd --boot-filesystem=/ --copy-default      --initrd=/boot/new-initrd --boot-filesystem=/ --copy-default
469  grubTest grub.1 add/g1.4 --add-kernel=/boot/new-kernel.img --title='title' \  grubTest grub.1 add/g1.4 --add-kernel=/boot/new-kernel.img --title='title' \
470      --initrd=/boot/new-initrd --boot-filesystem=/boot --copy-default      --initrd=/boot/new-initrd --boot-filesystem=/boot --copy-default
471    grubTest grub.1 add/g1.5 --add-kernel=/boot/new-kernel.img --title='title' \
472        --initrd=/boot/new-initrd --extra-initrd=/boot/extra-initrd --boot-filesystem=/
473    grubTest grub.1 add/g1.6 --add-kernel=/boot/new-kernel.img --title='title' \
474        --initrd=/boot/new-initrd --extra-initrd=/boot/extra-initrd --boot-filesystem=/boot
475  grubTest grub.2 add/g2.1 --add-kernel=/boot/vmlinuz-2.4.7-2    \  grubTest grub.2 add/g2.1 --add-kernel=/boot/vmlinuz-2.4.7-2    \
476      --initrd=/boot/initrd-2.4.7-new.img --boot-filesystem=/boot --copy-default \      --initrd=/boot/initrd-2.4.7-new.img --boot-filesystem=/boot --copy-default \
477      --title="Red Hat Linux (2.4.7-2)"    \      --title="Red Hat Linux (2.4.7-2)"    \
# Line 260  grubTest grub.11 add/g11.1 --add-kernel= Line 485  grubTest grub.11 add/g11.1 --add-kernel=
485      --initrd=/boot/new-initrd --boot-filesystem=/boot --copy-default \      --initrd=/boot/new-initrd --boot-filesystem=/boot --copy-default \
486      --args='console=tty0 console=ttyS1,9600n81 single'      --args='console=tty0 console=ttyS1,9600n81 single'
487    
488  echo "YABOOT add kernel..."  testgrub2=n
489    ARCH=$(uname -m | sed s,i[3456789]86,ia32,)
490    case $ARCH in
491        aarch64|ppc|ppc64|ia32|x86_64) testgrub2=y ;;
492    esac
493    
494    if [ "$testgrub2" == "y" ]; then
495        testing="GRUB2 add kernel"
496        grub2Test grub2.1 add/g2-1.1 --add-kernel=/boot/new-kernel.img \
497            --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
498            --copy-default
499        case $ARCH in
500            aarch64)
501                grub2Test grub2.1 add/g2-1.1 --add-kernel=/boot/new-kernel.img \
502                    --title='title' \
503                    --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
504                    --copy-default --efi
505                ;;
506            *)
507                grub2Test grub2.1 add/g2-1.6 --add-kernel=/boot/new-kernel.img \
508                    --title='title' \
509                    --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
510                    --copy-default --efi
511                ;;
512        esac
513        grub2Test grub2.6 add/g2-1.7 --add-kernel=/boot/new-kernel.img \
514            --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
515            --copy-default --efi
516        grub2Test grub2.1 add/g2-1.2 --add-kernel=/boot/new-kernel.img \
517            --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
518            --copy-default --make-default
519        grub2Test grub2.1 add/g2-1.3 --add-kernel=/boot/new-kernel.img \
520            --title='title' --boot-filesystem=/boot/ --copy-default --make-default
521        grub2Test grub2.1 remove/g2-1.4 \
522            --remove-kernel=/boot/vmlinuz-2.6.38.2-9.fc15.x86_64 \
523            --boot-filesystem=/boot/
524        grub2Test grub2.5 add/g2-1.5 --add-kernel=/boot/new-kernel.img \
525            --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
526            --copy-default
527        grub2Test grub2.12 add/g2-1.12 \
528            --add-kernel=/boot/vmlinuz-2.6.38.8-32.fc15.x86_64 \
529            --title='Linux, with Fedora 2.6.38.8-32.fc15.x86_64' \
530            --devtree='/boot/dtb-2.6.38.8-32.fc15.x86_64/foobarbaz.dtb' \
531            --initrd=/boot/initramfs-2.6.38.8-32.fc15.x86_64.img \
532            --boot-filesystem=/boot/ --copy-default --efi
533        grub2Test grub2.13 add/g2-1.13 \
534            --add-kernel=/boot/vmlinuz-2.6.38.8-32.fc15.x86_64 \
535            --title='Linux, with Fedora 2.6.38.8-32.fc15.x86_64' \
536            --devtree='/boot/dtb-2.6.38.8-32.fc15.x86_64/foobarbaz.dtb' \
537            --initrd=/boot/initramfs-2.6.38.8-32.fc15.x86_64.img \
538            --boot-filesystem=/boot/ --copy-default --efi
539        grub2Test grub2.15 add/g2-1.15 \
540            --add-kernel=/boot/vmlinuz-0-rescue-5a94251776a14678911d4ae0949500f5 \
541            --initrd /boot/initramfs-0-rescue-5a94251776a14678911d4ae0949500f5.img \
542            --copy-default --title "Fedora 21 Rescue" --args=root=/fooooo \
543            --remove-kernel=wtf --boot-filesystem=/boot/ --efi
544    
545        testing="GRUB2 add initrd"
546        grub2Test grub2.2 add/g2-1.4 --update-kernel=/boot/new-kernel.img \
547            --initrd=/boot/new-initrd --boot-filesystem=/boot/
548    
549        testing="GRUB2 display default index"
550        grub2DisplayTest grub2.1 defaultindex/0 --default-index
551        grub2DisplayTest grub2.2 defaultindex/0 --default-index
552    
553        testing="GRUB2 display default title"
554        grub2DisplayTest grub2.1 defaulttitle/g2.1 --default-title
555        grub2DisplayTest grub2.2 defaulttitle/g2.2 --default-title
556    
557        testing="GRUB2 display debug failure"
558        grub2DisplayTest grub2.1 debug/g2.1 --bad-image-bad \
559            --boot-filesystem=/boot --default-kernel --debug
560        testing="GRUB2 display debug success"
561        grub2DisplayTest grub2.1 debug/g2.1.2 --boot-filesystem=/boot \
562            --default-kernel --debug
563    
564        testing="GRUB2 remove kernel via index"
565        grub2Test grub2.3 remove/g2-1.1 --remove-kernel=1
566    
567        testing="GRUB2 remove kernel via title"
568        grub2Test grub2.3 remove/g2-1.1 --remove-kernel="TITLE=title2"
569    
570        testing="GRUB2 (submenu) remove kernel via index"
571        grub2Test grub2.4 remove/g2-1.2 --remove-kernel=2
572    
573        testing="GRUB2 (submenu) remove kernel via title"
574        grub2Test grub2.4 remove/g2-1.2 --remove-kernel="TITLE=title2"
575    
576        testing="GRUB2 default index directive"
577        grub2Test grub2.1 setdefaultindex/g2.1.0 --set-default-index=0
578        grub2Test grub2.1 setdefaultindex/g2.1.1 --set-default-index=1
579        grub2Test grub2.1 setdefaultindex/g2.1.9 --set-default-index=9
580    
581        testing="GRUB2 add kernel with default=saved_entry"
582        grub2Test grub2.7 add/g2-1.8 --env grubenv.1 \
583            --add-kernel=/boot/new-kernel.img \
584            --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
585            --copy-default
586        commandTest "saved_default output" \
587            "grub2-editenv test/grub2-support_files/env_temp list" \
588            "saved_entry=Linux, with Fedora 2.6.38.8-32.fc15.x86_64"
589    
590        testing="GRUB2 add kernel with default=saved_entry and a terrible title"
591        grub2Test grub2.7 add/g2-1.9 --env grubenv.1 \
592            --add-kernel=/boot/new-kernel.img \
593            --title='Fedora (3.10.3-300.fc19.x86_64) 19 (Schrödinger’s Cat)' \
594            --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
595            --copy-default
596    
597        testing="GRUB2 set default with default=saved_entry and a terrible name"
598        grub2Test grub2.9 add/g2-1.9 --env grubenv.1 --set-default-index=0
599        commandTest "saved_default output" \
600            "grub2-editenv test/grub2-support_files/env_temp list" \
601            'saved_entry=Fedora (3.10.3-300.fc19.x86_64) 19 (Schrödinger’s Cat)'
602    
603        testing="GRUB2 set default with default=saved_entry"
604        grub2Test grub2.8 add/g2-1.8 --env grubenv.1 --set-default-index=0
605        commandTest "saved_default output" \
606            "grub2-editenv test/grub2-support_files/env_temp list" \
607            "saved_entry=title"
608    
609        testing="GRUB2 --default-index with default=saved_entry"
610        grub2DisplayTest grub2.8 defaultindex/1 --env grubenv.1 --default-index
611    
612        testing="GRUB2 --default-index with default=saved_entry"
613        grub2DisplayTest grub2.8 defaultindex/0 --env grubenv.2 --default-index
614    
615        testing="GRUB2 --default-title with default=saved_entry"
616        grub2DisplayTest grub2.8 defaulttitle/g2.1 --env grubenv.1 --default-title
617    
618        testing="GRUB2 --default-index with default=saved_entry and empty grubenv"
619        grub2DisplayTest grub2.8 defaultindex/0 --env grubenv.0 --default-index
620    
621        testlinux16=n
622        case $ARCH in
623            ia32|x86_64) testlinux16=y ;;
624        esac
625    
626        if [ "$testlinux16" == "y" ]; then
627            testing="GRUB2 add kernel with linux16"
628            grub2Test grub2.10 add/g2-1.10 --add-kernel=/boot/new-kernel.img \
629                --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
630                --copy-default
631    
632            testing="GRUB2 add initrd with linux16"
633            grub2Test grub2.11 add/g2-1.11 --update-kernel=/boot/new-kernel.img \
634                --initrd=/boot/new-initrd --boot-filesystem=/boot/
635    
636            testing="GRUB2 add rescue with linux16"
637            grub2Test grub2.14 add/g2-1.14 \
638                --add-kernel=/boot/vmlinuz-0-rescue-5a94251776a14678911d4ae0949500f5 \
639                --initrd /boot/initramfs-0-rescue-5a94251776a14678911d4ae0949500f5.img \
640                --copy-default --title "Fedora 21 Rescue" --args=root=/fooooo \
641                --remove-kernel=wtf --boot-filesystem=/boot/
642        fi
643    fi
644    
645    testing="YABOOT add kernel"
646  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  \
647      --title=newtitle      --title=newtitle
648  yabootTest yaboot.1 add/y1.2 --add-kernel=/boot/new-kernel --boot-filesystem=/ --title=newtitle  yabootTest yaboot.1 add/y1.2 --add-kernel=/boot/new-kernel --boot-filesystem=/ --title=newtitle
649    
650  echo "YABOOT empty label..."  testing="YABOOT empty label"
651  yabootTest yaboot.3 add/y3.1 --add-kernel=/boot/new-kernel --boot-filesystem=/ --title=newtitle  yabootTest yaboot.3 add/y3.1 --add-kernel=/boot/new-kernel --boot-filesystem=/ --title=newtitle
652    
653  echo "Z/IPL add kernel..."  testing="Z/IPL add kernel"
654  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
655  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
656    
657  echo "LILO long titles..."  testing="Extlinux add kernel"
658    extlinuxTest extlinux.1 add/extlinux1.1 --add-kernel=/boot/new-kernel.img \
659        --title='title' --initrd=/boot/new-initrd --boot-filesystem=/
660    extlinuxTest extlinux.1 add/extlinux1.2 --add-kernel=/boot/new-kernel.img \
661        --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot
662    extlinuxTest extlinux.1 add/extlinux1.3 --add-kernel=/boot/new-kernel.img \
663        --title='title' --initrd=/boot/new-initrd --boot-filesystem=/ \
664        --copy-default
665    extlinuxTest extlinux.1 add/extlinux1.4 --add-kernel=/boot/new-kernel.img \
666        --title='title' --initrd=/boot/new-initrd --boot-filesystem=/boot \
667        --copy-default
668    extlinuxTest extlinux.2 add/extlinux2.1 \
669        --add-kernel=/boot/vmlinuz-3.12.0-2.fc21.i686 \
670        --initrd=/boot/initrd-3.12.0-2.fc21.i686-new.img \
671        --boot-filesystem=/boot --copy-default \
672        --title="Fedora (3.12.0-2.fc21.i686) 20 (Heisenbug)" \
673        --remove-kernel="TITLE=Fedora (3.12.0-2.fc21.i686) 20 (Heisenbug)"
674    extlinuxTest extlinux.5 add/extlinux5.1 \
675        --add-kernel=/boot/vmlinuz-3.15.0-0.rc1.git4.1.fc21.armv7hl \
676        --devtree='/boot/dtb-3.15.0-0.rc1.git4.1.fc21.armv7hl/imx6q-cubox-i.dtb' \
677        --initrd=/boot/initramfs-3.15.0-0.rc1.git4.1.fc21.armv7hl.img \
678        --boot-filesystem=/boot --copy-default \
679        --title="Fedora (3.15.0-0.rc1.git4.1.fc21.armv7hl) 21 (Rawhide)" \
680        --remove-kernel="TITLE=Fedora (3.12.0-0.fc21.armv7hl) 21 (Rawhide)"
681    extlinuxTest extlinux.6 add/extlinux6.1 \
682        --add-kernel=/boot/vmlinuz-3.15.0-0.rc1.git4.1.fc21.armv7hl \
683        --devtreedir='/boot/dtb-3.15.0-0.rc1.git4.1.fc21.armv7hl/' \
684        --initrd=/boot/initramfs-3.15.0-0.rc1.git4.1.fc21.armv7hl.img \
685        --boot-filesystem=/boot --copy-default \
686        --title="Fedora (3.15.0-0.rc1.git4.1.fc21.armv7hl) 21 (Rawhide)" \
687        --remove-kernel="TITLE=Fedora (3.12.0-0.fc21.armv7hl) 21 (Rawhide)"
688    
689    testing="LILO long titles"
690  liloTest lilo.1 longtitle/l1.1 --add-kernel=/boot/new-kernel.img \  liloTest lilo.1 longtitle/l1.1 --add-kernel=/boot/new-kernel.img \
691      --title="linux-longtitle" --copy-default --boot-filesystem=/boot      --title="linux-longtitle" --copy-default --boot-filesystem=/boot
692  liloTest lilo.1 longtitle/l1.2 --add-kernel=/boot/new-kernel.img \  liloTest lilo.1 longtitle/l1.2 --add-kernel=/boot/new-kernel.img \
# Line 280  liloTest lilo.1 longtitle/l1.2 --add-ker Line 694  liloTest lilo.1 longtitle/l1.2 --add-ker
694  liloTest lilo.7 longtitle/l7.1 --add-kernel=/boot/new-kernel.img \  liloTest lilo.7 longtitle/l7.1 --add-kernel=/boot/new-kernel.img \
695      --title="linux-longtitle-fix" --copy-default --boot-filesystem=/boot      --title="linux-longtitle-fix" --copy-default --boot-filesystem=/boot
696    
697  echo "ELILO long titles..."  testing="ELILO long titles"
698  eliloTest lilo.7 longtitle/e7.1 --add-kernel=/boot/new-kernel.img \  eliloTest lilo.7 longtitle/e7.1 --add-kernel=/boot/new-kernel.img \
699      --title="linux-longtitle-fix" --copy-default --boot-filesystem=/boot      --title="linux-longtitle-fix" --copy-default --boot-filesystem=/boot
700    
701  echo "GRUB add multiboot..."  testing="GRUB add multiboot"
702  grubTest grub.1 multiboot/g1.1 --add-multiboot=/boot/xen.gz \  grubTest grub.1 multiboot/g1.1 --add-multiboot=/boot/xen.gz \
703      --add-kernel=/boot/vmlinuz-2.6.10-1.1088_FC4 --boot-filesystem=/boot \      --add-kernel=/boot/vmlinuz-2.6.10-1.1088_FC4 --boot-filesystem=/boot \
704      --initrd=/boot/initrd-2.6.10-1.1088_FC4.img --title foo \      --initrd=/boot/initrd-2.6.10-1.1088_FC4.img --title foo \
# Line 308  grubTest grub.10 multiboot/g10.4 --add-k Line 722  grubTest grub.10 multiboot/g10.4 --add-k
722      --initrd=/boot/initrd-2.6.10-1.1088_FC4.img --title foo \      --initrd=/boot/initrd-2.6.10-1.1088_FC4.img --title foo \
723      --boot-filesystem=/boot      --boot-filesystem=/boot
724    
725  echo "GRUB remove multiboot..."  testing="GRUB remove multiboot"
726  grubTest grub.10 multiboot/g10.5 --boot-filesystem=/boot \  grubTest grub.10 multiboot/g10.5 --boot-filesystem=/boot \
727      --remove-kernel=/boot/vmlinuz-2.6.10-1.1076_FC4      --remove-kernel=/boot/vmlinuz-2.6.10-1.1076_FC4
728  grubTest grub.10 multiboot/g10.6 --boot-filesystem=/boot \  grubTest grub.10 multiboot/g10.6 --boot-filesystem=/boot \
# Line 316  grubTest grub.10 multiboot/g10.6 --boot- Line 730  grubTest grub.10 multiboot/g10.6 --boot-
730  grubTest grub.10 multiboot/g10.7 --boot-filesystem=/boot \  grubTest grub.10 multiboot/g10.7 --boot-filesystem=/boot \
731      --remove-multiboot=/boot/xen.gz      --remove-multiboot=/boot/xen.gz
732    
733  exit $RESULT  testing="ELILO add multiboot"
734    eliloTest elilo.1 multiboot/e1.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    eliloTest elilo.1 multiboot/e1.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    
743    testing="ELILO remove multiboot"
744    eliloTest elilo.2 multiboot/e2.1 --boot-filesystem=/boot \
745        --remove-kernel=/boot/vmlinuz-2.6.10-1.1076_FC4
746    eliloTest elilo.2 multiboot/e2.2 --boot-filesystem=/boot \
747        --remove-kernel=/boot/vmlinuz-2.6.10-1.1082_FC4
748    eliloTest elilo.2 multiboot/e2.3 --boot-filesystem=/boot \
749        --remove-multiboot=/boot/xen.gz
750    
751    printf "\n%d (%d%%) tests passed, %d (%d%%) tests failed\n" \
752        $pass $(((100*pass)/(pass+fail))) \
753        $fail $(((100*fail)/(pass+fail)))
754    
755    exit $(( !!fail ))

Legend:
Removed from v.532  
changed lines
  Added in v.2992