Branch
Hash :
fe2c2458
Author :
Date :
2023-11-05T14:50:08
fenv-exceptions-tracking-c99 tests: Enhance tests. * tests/test-fenv-except-tracking-3.sh: Test not only FE_INVALID, but also FE_DIVBYZERO, FE_OVERFLOW, FE_UNDERFLOW, FE_INEXACT. * tests/test-fenv-except-tracking-3.c: Include <stdlib.h>, <string.h>. Don't include fpe-trapping.h. Assume HAVE_FPE_TRAPPING is 1. (main): Receive the exception to test as first argument.
#!/bin/sh
# Test that feraiseexcept() can trigger a trap.
final_rc=0
for arg in FE_INVALID FE_DIVBYZERO FE_OVERFLOW FE_UNDERFLOW FE_INEXACT; do
${CHECKER} ./test-fenv-except-tracking-3${EXEEXT} $arg
rc=$?
if test $rc = 77; then
final_rc=77
else
if test $rc = 0; then
echo "Failed: ./test-fenv-except-tracking-3 $arg" 1>&2
exit 1
fi
fi
done
exit $final_rc