* [PATCH] math: Fix test-fenv.c feupdateenv tests
@ 2024-01-09 19:40 Adhemerval Zanella
2024-01-10 8:58 ` Szabolcs Nagy
0 siblings, 1 reply; 2+ messages in thread
From: Adhemerval Zanella @ 2024-01-09 19:40 UTC (permalink / raw)
To: libc-alpha; +Cc: Szabolcs Nagy
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(+)
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] math: Fix test-fenv.c feupdateenv tests
2024-01-09 19:40 [PATCH] math: Fix test-fenv.c feupdateenv tests Adhemerval Zanella
@ 2024-01-10 8:58 ` Szabolcs Nagy
0 siblings, 0 replies; 2+ messages in thread
From: Szabolcs Nagy @ 2024-01-10 8:58 UTC (permalink / raw)
To: Adhemerval Zanella, libc-alpha
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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-10 8:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-09 19:40 [PATCH] math: Fix test-fenv.c feupdateenv tests Adhemerval Zanella
2024-01-10 8:58 ` Szabolcs Nagy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).