[PATCH] math: Fix unsupported check in test-narrowing-trap

Yury Khrustalev yury.khrustalev@arm.com
Thu Jul 16 15:25:42 GMT 2026


On Thu, Jul 16, 2026 at 12:13:58PM -0300, Adhemerval Zanella Netto wrote:
> 
> 
> On 16/07/26 12:03, Yury Khrustalev wrote:
> > On Thu, Jul 16, 2026 at 12:00:16PM -0300, Adhemerval Zanella Netto wrote:
> >>
> >> On 16/07/26 11:01, Yury Khrustalev wrote:
> >>> ---
> >>>
> >>> Base commit: af51ed63d0
> >>>
> >>> Test change only. Passes regression on aarch64-linux-gnu,
> >>> x86_64-linux-gnu, i686-linux-gnu and build-tested for
> >>> several targets with build-many-glibcs.py.
> >>>
> >>> Andreas, I suppose we could merge this test fix now? It's OK if not.
> >>
> >> Is this fix for loongarch? If so I think you can check with cfarm401
> >> machine [1] (for some reason cfarm400 is not accepting my keys).
> >>
> >> [1] https://portal.cfarm.net/machines/list/
> > 
> > The fix is for aarch64 actually. Some hosts support these tests and
> > in this case the 'math/test-narrowing-trap' test was incorrectly
> > reported as UNSUPPORTED.
> Right, so maybe add some context on the commit message. Another option
> would to rewrite EXCEPTION_ENABLE_SUPPORTED on aarch64/arm to actually
> test whether exceptions are support (since on ARM seems to have the
> concept of being 'optional').

The fix is not aarch64-specific though. All other tests that use this
functionality use return value of feenableexcept before they decide if
the test is supported or not. In the test-narrowing-trap test, however,
the order of checks was wrong. As a side-effect of this I see spurious
UNSUPPORTED math test on some aarch64 hosts. I've asked the authors of
the these tests to fix it, but they haven't, hence this patch.



More information about the Libc-alpha mailing list