82 |
|
|
83 |
echo "$testing ... $mode $cfg $correct" |
echo "$testing ... $mode $cfg $correct" |
84 |
runme=( ./grubby "$mode" $BIO -c "$cfg" "$@" ) |
runme=( ./grubby "$mode" $BIO -c "$cfg" "$@" ) |
85 |
if "${runme[@]}" |& cmp "$correct" > /dev/null; then |
if "${runme[@]}" 2>&1 | cmp "$correct" > /dev/null; then |
86 |
(( pass++ )) |
(( pass++ )) |
87 |
if $opt_verbose; then |
if $opt_verbose; then |
88 |
echo ------------------------------------------------------------- |
echo ------------------------------------------------------------- |
89 |
echo -n "PASS: " |
echo -n "PASS: " |
90 |
printf "%q " "${runme[@]}"; echo |
printf "%q " "${runme[@]}"; echo |
91 |
"${runme[@]}" |& diff -U30 "$cfg" - |
"${runme[@]}" 2>&1 | diff -U30 "$cfg" - |
92 |
echo |
echo |
93 |
fi |
fi |
94 |
else |
else |
96 |
echo ------------------------------------------------------------- |
echo ------------------------------------------------------------- |
97 |
echo -n "FAIL: " |
echo -n "FAIL: " |
98 |
printf "%q " "${runme[@]}"; echo |
printf "%q " "${runme[@]}"; echo |
99 |
"${runme[@]}" |& diff -U30 "$correct" - |
"${runme[@]}" 2>&1 | diff -U30 "$correct" - |
100 |
echo |
echo |
101 |
fi |
fi |
102 |
} |
} |
126 |
done |
done |
127 |
|
|
128 |
export MALLOC_CHECK_=2 |
export MALLOC_CHECK_=2 |
129 |
|
if [ -n "${RANDOM}" ]; then |
130 |
|
export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) |
131 |
|
else |
132 |
|
export MALLOC_PERTURB_=1 |
133 |
|
fi |
134 |
|
|
135 |
testing="Parse/write comparison" |
testing="Parse/write comparison" |
136 |
for n in test/*.[0-9]*; do |
for n in test/*.[0-9]*; do |
375 |
--boot-filesystem=/boot/ --copy-default --make-default |
--boot-filesystem=/boot/ --copy-default --make-default |
376 |
grub2Test grub2.1 remove/g2-1.4 --remove-kernel=/boot/vmlinuz-2.6.38.2-9.fc15.x86_64 \ |
grub2Test grub2.1 remove/g2-1.4 --remove-kernel=/boot/vmlinuz-2.6.38.2-9.fc15.x86_64 \ |
377 |
--boot-filesystem=/boot/ |
--boot-filesystem=/boot/ |
378 |
|
grub2Test grub2.5 add/g2-1.5 --add-kernel=/boot/new-kernel.img --title='title' \ |
379 |
|
--initrd=/boot/new-initrd --boot-filesystem=/boot/ --copy-default |
380 |
|
|
381 |
testing="GRUB2 add initrd" |
testing="GRUB2 add initrd" |
382 |
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 \ |