]> sourceware.org Git - glibc.git/commit
More thoroughly test underflow / errno in tst-strtod-round
authorJoseph Myers <josmyers@redhat.com>
Tue, 27 Aug 2024 12:38:01 +0000 (12:38 +0000)
committerJoseph Myers <josmyers@redhat.com>
Tue, 27 Aug 2024 12:38:01 +0000 (12:38 +0000)
commitd73ed2601b7c3c93c3529149a3d7f7b6177900a8
tree29d0d031d20b75b48efcccbeb689df350822e5d9
parent3de73f974fab55430177c811c9c9ba3f251d5747
More thoroughly test underflow / errno in tst-strtod-round

Add tests of underflow in tst-strtod-round, and thus also test for
errno being unchanged when there is neither overflow nor underflow.
The errno setting before the function call to test for being unchanged
is adjusted to set errno to 12345 instead of 0, so that any bugs where
strtod sets errno to 0 would be detected.

This doesn't add any new test inputs for tst-strtod-round, and in
particular doesn't cover the edge cases of underflow the way
tst-strtod-underflow does (none of the existing test inputs for
tst-strtod-round actually exercise cases that have underflow with
before-rounding tininess detection but not with after-rounding
tininess detection), but at least it provides some coverage (as per
the recent discussions) that ordinary non-overflowing non-underflowing
inputs to these functions do not set errno.

Tested for x86_64.
stdlib/gen-tst-strtod-round.c
stdlib/tst-strtod-round-data.h
stdlib/tst-strtod-round-skeleton.c
This page took 0.037822 seconds and 5 git commands to generate.