math: Fix test-fenv.c feupdateenv tests
Checks
Context |
Check |
Description |
redhat-pt-bot/TryBot-apply_patch |
success
|
Patch applied to master at the time it was sent
|
linaro-tcwg-bot/tcwg_glibc_build--master-arm |
success
|
Testing passed
|
redhat-pt-bot/TryBot-32bit |
success
|
Build for i686
|
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_glibc_check--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 |
success
|
Testing passed
|
Commit Message
The feupdateenv tests added by 802aef27b2 do not restore the floating
point mask, which might keep some floating point exception enabled and
thus make the feupdateenv_single_test raise an unexpected signal.
Checked on x86_64-linux-gnu and aarch64-linux-gnu (on Apple M1 trapping
is supported).
---
math/test-fenv.c | 1 +
1 file changed, 1 insertion(+)
Comments
The 01/09/2024 16:40, Adhemerval Zanella wrote:
> The feupdateenv tests added by 802aef27b2 do not restore the floating
> point mask, which might keep some floating point exception enabled and
> thus make the feupdateenv_single_test raise an unexpected signal.
>
> Checked on x86_64-linux-gnu and aarch64-linux-gnu (on Apple M1 trapping
> is supported).
looks good.
Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
> ---
> math/test-fenv.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/math/test-fenv.c b/math/test-fenv.c
> index 9db6789e64..8d39181b14 100644
> --- a/math/test-fenv.c
> +++ b/math/test-fenv.c
> @@ -659,6 +659,7 @@ static void
> feupdate_single_test (const char *flag_name, int fe_exc)
> {
> feenv_nomask_test (flag_name, fe_exc, feupdateenv);
> + fesetenv (FE_DFL_ENV);
> feenv_mask_test (flag_name, fe_exc, feupdateenv);
> }
> #endif
> --
> 2.34.1
>
@@ -659,6 +659,7 @@ static void
feupdate_single_test (const char *flag_name, int fe_exc)
{
feenv_nomask_test (flag_name, fe_exc, feupdateenv);
+ fesetenv (FE_DFL_ENV);
feenv_mask_test (flag_name, fe_exc, feupdateenv);
}
#endif