mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-04-27 16:30:42 +02:00
[test] Clear expected floating point exceptions
test/invalid-matrix deliberately feeds garbage into the API to test our error detection. This causes FPE to be raised during the course of the test - so they are deliberately disable for the duration. However, the exceptions were not being cleared and so the FPE could be triggered on the next floating point operation. This was being masked during make check, by the fact that each test is run in its own forked process and was only observed when multiple tests were run in foreground mode.
This commit is contained in:
parent
f47a93ef30
commit
477df1f550
2 changed files with 5 additions and 1 deletions
|
|
@ -65,7 +65,7 @@ AC_CHECK_HEADERS([sched.h],
|
|||
|
||||
dnl check for GNU-extensions to fenv
|
||||
AC_CHECK_HEADER(fenv.h,
|
||||
[AC_CHECK_FUNCS(feenableexcept fedisableexcept)])
|
||||
[AC_CHECK_FUNCS(feenableexcept fedisableexcept feclearexcept)])
|
||||
|
||||
dnl check for misc headers and functions
|
||||
AC_CHECK_HEADERS([libgen.h byteswap.h signal.h setjmp.h])
|
||||
|
|
|
|||
|
|
@ -363,6 +363,10 @@ if ((status) == CAIRO_STATUS_SUCCESS) { \
|
|||
CHECK_STATUS (status, "cairo_rotate(∞)");
|
||||
cairo_destroy (cr2);
|
||||
|
||||
#if HAVE_FECLEAREXCEPT
|
||||
feclearexcept (FE_INVALID);
|
||||
#endif
|
||||
|
||||
return CAIRO_TEST_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue