--- trunk/grubby/test.sh 2012/04/16 17:48:10 1801 +++ trunk/grubby/test.sh 2012/07/02 13:14:43 1858 @@ -82,13 +82,13 @@ echo "$testing ... $mode $cfg $correct" runme=( ./grubby "$mode" $BIO -c "$cfg" "$@" ) - if "${runme[@]}" |& cmp "$correct" > /dev/null; then + if "${runme[@]}" 2>&1 | cmp "$correct" > /dev/null; then (( pass++ )) if $opt_verbose; then echo ------------------------------------------------------------- echo -n "PASS: " printf "%q " "${runme[@]}"; echo - "${runme[@]}" |& diff -U30 "$cfg" - + "${runme[@]}" 2>&1 | diff -U30 "$cfg" - echo fi else @@ -96,7 +96,7 @@ echo ------------------------------------------------------------- echo -n "FAIL: " printf "%q " "${runme[@]}"; echo - "${runme[@]}" |& diff -U30 "$correct" - + "${runme[@]}" 2>&1 | diff -U30 "$correct" - echo fi } @@ -126,6 +126,11 @@ done export MALLOC_CHECK_=2 +if [ -n "${RANDOM}" ]; then + export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) +else + export MALLOC_PERTURB_=1 +fi testing="Parse/write comparison" for n in test/*.[0-9]*; do @@ -370,6 +375,8 @@ --boot-filesystem=/boot/ --copy-default --make-default grub2Test grub2.1 remove/g2-1.4 --remove-kernel=/boot/vmlinuz-2.6.38.2-9.fc15.x86_64 \ --boot-filesystem=/boot/ +grub2Test grub2.5 add/g2-1.5 --add-kernel=/boot/new-kernel.img --title='title' \ + --initrd=/boot/new-initrd --boot-filesystem=/boot/ --copy-default testing="GRUB2 add initrd" grub2Test grub2.2 add/g2-1.4 --update-kernel=/boot/new-kernel.img \