From: Bruno Haible Date: Wed, 27 Mar 2024 12:30:31 +0000 (+0000) Subject: tests: od: avoid outputting undefined floating point values X-Git-Tag: v9.5~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bec53850b76f1240c566dfeb59db6ed6928bdf57;p=thirdparty%2Fcoreutils.git tests: od: avoid outputting undefined floating point values 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. --- diff --git a/tests/od/od-multiple-t.sh b/tests/od/od-multiple-t.sh index 7bce736554..465ccc5dfe 100755 --- a/tests/od/od-multiple-t.sh +++ b/tests/od/od-multiple-t.sh @@ -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