[PATCH] testsuite: fix test-narrowing-trap failure on platforms where FE_INVALID is not defined
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Thu Mar 26 12:22:32 GMT 2026
On 26/03/26 07:54, Xi Ruoyao wrote:
> I didn't realize it can be undefined at all instead of simply
> unsupported :(.
>
> Signed-off-by: Xi Ruoyao <xry111@xry111.site>
LGTM, thanks.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
> ---
> math/test-narrowing-trap.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/math/test-narrowing-trap.c b/math/test-narrowing-trap.c
> index a483c4bf1a..6d21357913 100644
> --- a/math/test-narrowing-trap.c
> +++ b/math/test-narrowing-trap.c
> @@ -26,6 +26,7 @@
> static int
> do_test (void)
> {
> +#ifdef FE_INVALID
> pid_t pid;
>
> if (!EXCEPTION_ENABLE_SUPPORTED (FE_INVALID))
> @@ -50,6 +51,9 @@ do_test (void)
> }
>
> return 0;
> +#else
> + FAIL_UNSUPPORTED ("FE_INVALID is not defined");
> +#endif
> }
>
> #include <support/test-driver.c>
More information about the Libc-alpha
mailing list