]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
lib/msun/tests: Skip fenv_test:masking if exceptions can't be trapped
authorAlex Richardson <arichardson@FreeBSD.org>
Mon, 22 Mar 2021 11:53:40 +0000 (11:53 +0000)
committerAlex Richardson <arichardson@FreeBSD.org>
Thu, 22 Apr 2021 09:44:50 +0000 (10:44 +0100)
commit1f7e87f2d322512a055ca95fdff2e15fc21d243e
tree22e7641d7e46d65f91373df420783733f19f938b
parentb38293b480c324544535bb8efa4033e76f894d1a
lib/msun/tests: Skip fenv_test:masking if exceptions can't be trapped

Some CPUs (e.g. AArch64 QEMU) cannot trap on floating point exceptions and
therefore ignore the writes to the floating point control register inside
feenableexcept(). If no exceptions are enabled after
feenableexcept(FE_ALL_EXCEPT), we can assume that the CPU does not
support exceptions and we can then skip the test.

Reviewed By: dim
Differential Revision: https://reviews.freebsd.org/D29095

(cherry picked from commit 2b9dbcd390dfbd573d3403360a36c5ade9815266)
lib/msun/tests/fenv_test.c