#
# Main loop for checking invalid VTOP translations
#

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 1 ]; then
        echo FAILED
	echo "Expected error, got $output"
        totalrc=1
    else
        echo OK
    fi
done

exit $totalrc
