]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: od: avoid outputting undefined floating point values
authorBruno Haible <bruno@clisp.org>
Wed, 27 Mar 2024 12:30:31 +0000 (12:30 +0000)
committerPádraig Brady <P@draigBrady.com>
Wed, 27 Mar 2024 12:41:33 +0000 (12:41 +0000)
od was seen to abort() on glibc on ia64 and m68k with the error:
Fatal glibc error: printf_fp.c:501 (__printf_fp_buffer_1):
assertion failed:
  cy == 1 || (p.frac[p.fracsize - 2] == 0 && p.frac[0] == 0)

* tests/od/od-multiple-t.sh: Avoid outputting long double floats
to avoid undefined behavior. 'float' and 'double' are standardized
by IEEE 754 (except on Linux/m68k) and don't have undefined values.

tests/od/od-multiple-t.sh

index 7bce73655406488658db2fe4a713584d1aefdee1..465ccc5dfe1e3f86f7d350ead155b9571e828092 100755 (executable)
@@ -26,7 +26,7 @@ seq 19 > in || framework_failure_
 test $(wc -c < in) -eq 48 || framework_failure_
 
 
-list='a c dC dS dI dL oC oS oI oL uC uS uI uL xC xS xI xL fF fD fL'
+list='a c dC dS dI dL oC oS oI oL uC uS uI uL xC xS xI xL fF fD'
 for format1 in $list; do
   for format2 in $list; do
     od -An -t${format1}z -t${format2}z in > out-raw || fail=1