1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
#
# Common code for checking VTOP translation
#
totalrc=0
for tst in $list; do
input="${tst%:*}"
expect="${tst#*:}"
echo -n "Checking $input... "
output=$( ./addrxlat -p -f $pf -r MACHPHYSADDR:0 $ptes $input )
rc=$?
if [ $rc -gt 1 ]; then
echo ERROR
echo "Cannot translate $input" >&2
exit $rc
elif [ $rc -ne 0 ]; then
echo FAILED
totalrc=$rc
elif [ "$output" != "$expect" ]; then
echo FAILED
echo "Result does not match for $input: $output" >&2
totalrc=1
else
echo OK
fi
done
exit $totalrc
|