bug#79301: fold-spaces test failure

Bruno Haible via GNU coreutils Bug Reports <[email protected]>
Newsgroups gmane.comp.gnu.core-utils.bugs
Organization GNU
Message-ID <6087738.caWayghata@nimes>
Today's CI reports a test failure
  FAIL: tests/fold/fold-spaces
on several systems:
  - Alpine Linux,
  - macOS 13..15,
  - FreeBSD 14.

Here are the relevant parts of the log files.


Alpine Linux:

FAIL: tests/fold/fold-spaces
============================

+ initial_cwd_=/work/coreutils-2025-08-24/build
+ testdir_prefix_
+ printf gt
+ pfx_=gt
+ mktempd_ /work/coreutils-2025-08-24/build gt-fold-spaces.sh.XXXX
+ destdir_=/work/coreutils-2025-08-24/build
+ template_=gt-fold-spaces.sh.XXXX
+ MAX_TRIES_=4
+ destdir_slash_=/work/coreutils-2025-08-24/build/
+ unset TMPDIR
+ d=/work/coreutils-2025-08-24/build/gt-fold-spaces.sh.UNMl
+ :
+ test -d /work/coreutils-2025-08-24/build/gt-fold-spaces.sh.UNMl
+ ls -dgo /work/coreutils-2025-08-24/build/gt-fold-spaces.sh.UNMl
+ perms='drwx------ 2 4096 Aug 24 06:56 /work/coreutils-2025-08-24/build/gt-fold-spaces.sh.UNMl'
+ :
+ echo /work/coreutils-2025-08-24/build/gt-fold-spaces.sh.UNMl
+ return
+ test_dir_=/work/coreutils-2025-08-24/build/gt-fold-spaces.sh.UNMl
+ cd /work/coreutils-2025-08-24/build/gt-fold-spaces.sh.UNMl
+ srcdir=../..
+ builddir=..
+ export srcdir builddir
+ gl_init_sh_nl_='
'
+ IFS=' 	
'
+ expr 1 + 128
+ eval 'trap '"'"'Exit 129'"'"' 1'
+ trap 'Exit 129' 1
+ expr 2 + 128
+ eval 'trap '"'"'Exit 130'"'"' 2'
+ trap 'Exit 130' 2
+ expr 3 + 128
+ eval 'trap '"'"'Exit 131'"'"' 3'
+ trap 'Exit 131' 3
+ expr 13 + 128
+ eval 'trap '"'"'Exit 141'"'"' 13'
+ trap 'Exit 141' 13
+ expr 15 + 128
+ eval 'trap '"'"'Exit 143'"'"' 15'
+ trap 'Exit 143' 15
+ saved_IFS=' 	
'
+ IFS=:
+ new_PATH=
+ IFS=' 	
'
+ test -d /work/coreutils-2025-08-24/build/src/.
+ new_PATH=/work/coreutils-2025-08-24/build/src
+ IFS=' 	
'
+ test -d /usr/local/bin/.
+ new_PATH=/work/coreutils-2025-08-24/build/src:/usr/local/bin
+ IFS=' 	
'
+ test -d /usr/sbin/.
+ new_PATH=/work/coreutils-2025-08-24/build/src:/usr/local/bin:/usr/sbin
+ IFS=' 	
'
+ test -d /usr/bin/.
+ new_PATH=/work/coreutils-2025-08-24/build/src:/usr/local/bin:/usr/sbin:/usr/bin
+ IFS=' 	
'
+ test -d /sbin/.
+ new_PATH=/work/coreutils-2025-08-24/build/src:/usr/local/bin:/usr/sbin:/usr/bin:/sbin
+ IFS=' 	
'
+ test -d /bin/.
+ new_PATH=/work/coreutils-2025-08-24/build/src:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ IFS=' 	
'
+ PATH=/work/coreutils-2025-08-24/build/src:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ export PATH
+ trap remove_tmp_ EXIT
+ path_prepend_ ./src
+ test 1 '!=' 0
+ path_dir_=./src
+ abs_path_dir_=/work/coreutils-2025-08-24/build/./src
+ PATH=/work/coreutils-2025-08-24/build/./src:/work/coreutils-2025-08-24/build/src:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ create_exe_shims_ /work/coreutils-2025-08-24/build/./src
+ return 0
+ shift
+ test 0 '!=' 0
+ export PATH
+ print_ver_ fold printf
+ require_built_ fold printf
+ skip_=no
+ test no '=' yes
+ test yes '=' yes
+ local i
+ env fold --version
fold (GNU coreutils) 2025-08-24
Copyright (C) 2025 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David MacKenzie.
+ env printf --version
printf (GNU coreutils) 2025-08-24
Copyright (C) 2025 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David MacKenzie.
+ test fr_FR.UTF-8 '!=' none
+ LC_ALL=fr_FR.UTF-8
+ export LC_ALL
+ env printf 'abcdefghijklmnop\u2002qrstuvwxyz\n'
+ env printf 'abcdefghij\nklmnop\u2002\nqrstuvwxyz\n'
+ fold --spaces --width 10 input1
+ compare exp1 out1
+ compare_dev_null_ exp1 out1
+ test 2 '=' 2
+ test xexp1 '=' x/dev/null
+ test xout1 '=' x/dev/null
+ return 2
+ compare_ exp1 out1
+ LC_ALL=C diff -u exp1 out1
--- exp1
+++ out1
@@ -1,3 +1,3 @@
 abcdefghij
-klmnop 
-qrstuvwxyz
+klmnop qrs
+tuvwxyz
+ fail=1
+ env printf 'abcdefghijklmnop\u2003\u2003qrstuvwxyz\n'
+ env printf 'abcdefghij\nklmnop\u2003\u2003\nqrstuvwxyz\n'
+ fold --spaces --width 10 input2
+ compare exp2 out2
+ compare_dev_null_ exp2 out2
+ test 2 '=' 2
+ test xexp2 '=' x/dev/null
+ test xout2 '=' x/dev/null
+ return 2
+ compare_ exp2 out2
+ LC_ALL=C diff -u exp2 out2
--- exp2
+++ out2
@@ -1,3 +1,3 @@
 abcdefghij
-klmnop  
-qrstuvwxyz
+klmnop  qr
+stuvwxyz
+ fail=1
+ Exit 1
+ set +e
+ exit 1
+ exit 1
+ remove_tmp_
+ __st=1
+ cleanup_
+ :
+ test  '=' yes
+ cd /work/coreutils-2025-08-24/build
+ chmod -R u+rwx /work/coreutils-2025-08-24/build/gt-fold-spaces.sh.UNMl
+ rm -rf /work/coreutils-2025-08-24/build/gt-fold-spaces.sh.UNMl
+ exit 1
FAIL tests/fold/fold-spaces.sh (exit status: 1)


macOS 15:

FAIL: tests/fold/fold-spaces
============================

++ initial_cwd_=/Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build
+++ testdir_prefix_
+++ printf gt
++ pfx_=gt
+++ mktempd_ /Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build gt-fold-spaces.sh.XXXX
+++ case $# in
+++ destdir_=/Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build
+++ template_=gt-fold-spaces.sh.XXXX
+++ MAX_TRIES_=4
+++ case $destdir_ in
+++ destdir_slash_=/Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build/
+++ case $template_ in
++++ unset TMPDIR
+++ d=/Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build/gt-fold-spaces.sh.kg5a
+++ case $d in
+++ :
+++ test -d /Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build/gt-fold-spaces.sh.kg5a
++++ ls -dgo /Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build/gt-fold-spaces.sh.kg5a
+++ perms='drwx------ 2 64 Aug 24 06:59 /Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build/gt-fold-spaces.sh.kg5a'
+++ case $perms in
+++ :
+++ echo /Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build/gt-fold-spaces.sh.kg5a
+++ return
++ test_dir_=/Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build/gt-fold-spaces.sh.kg5a
++ cd /Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build/gt-fold-spaces.sh.kg5a
++ case $srcdir in
++ srcdir=../..
++ builddir=..
++ export srcdir builddir
++ gl_init_sh_nl_='
'
++ IFS=' 	
'
++ for sig_ in 1 2 3 13 15
+++ expr 1 + 128
++ eval 'trap '\''Exit 129'\'' 1'
+++ trap 'Exit 129' 1
++ for sig_ in 1 2 3 13 15
+++ expr 2 + 128
++ eval 'trap '\''Exit 130'\'' 2'
+++ trap 'Exit 130' 2
++ for sig_ in 1 2 3 13 15
+++ expr 3 + 128
++ eval 'trap '\''Exit 131'\'' 3'
+++ trap 'Exit 131' 3
++ for sig_ in 1 2 3 13 15
+++ expr 13 + 128
++ eval 'trap '\''Exit 141'\'' 13'
+++ trap 'Exit 141' 13
++ for sig_ in 1 2 3 13 15
+++ expr 15 + 128
++ eval 'trap '\''Exit 143'\'' 15'
+++ trap 'Exit 143' 15
++ saved_IFS=' 	
'
++ IFS=:
++ new_PATH=
++ for dir in '$PATH'
++ IFS=' 	
'
++ case "$dir" in
++ test -d /Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build/src/.
++ new_PATH=/Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build/src
++ for dir in '$PATH'
++ IFS=' 	
'
++ case "$dir" in
++ test -d /opt/homebrew/lib/ruby/gems/3.3.0/bin/.
++ new_PATH=/Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build/src:/opt/homebrew/lib/ruby/gems/3.3.0/bin
++ for dir in '$PATH'
++ IFS=' 	
'
++ case "$dir" in
++ test -d /opt/homebrew/opt/[email protected]/bin/.
++ new_PATH=/Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build/src:/opt/homebrew/lib/ruby/gems/3.3.0/bin:/opt/homebrew/opt/[email protected]/bin
++ for dir in '$PATH'
++ IFS=' 	
'
++ case "$dir" in
++ test -d /opt/homebrew/bin/.
++ new_PATH=/Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build/src:/opt/homebrew/lib/ruby/gems/3.3.0/bin:/opt/homebrew/opt/[email protected]/bin:/opt/homebrew/bin
++ for dir in '$PATH'
++ IFS=' 	
'
++ case "$dir" in
++ test -d /opt/homebrew/sbin/.
++ new_PATH=/Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build/src:/opt/homebrew/lib/ruby/gems/3.3.0/bin:/opt/homebrew/opt/[email protected]/bin:/opt/homebrew/bin:/opt/homebrew/sbin
++ for dir in '$PATH'
++ IFS=' 	
'
++ case "$dir" in
++ test -d /Users/runner/.cargo/bin/.
++ new_PATH=/Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build/src:/opt/homebrew/lib/ruby/gems/3.3.0/bin:/opt/homebrew/opt/[email protected]/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/runner/.cargo/bin
++ for dir in '$PATH'
++ IFS=' 	
'
++ case "$dir" in
++ test -d /usr/local/bin/.
++ new_PATH=/Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build/src:/opt/homebrew/lib/ruby/gems/3.3.0/bin:/opt/homebrew/opt/[email protected]/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/runner/.cargo/bin:/usr/local/bin
++ for dir in '$PATH'
++ IFS=' 	
'
++ case "$dir" in
++ test -d /Users/runner/.yarn/bin/.
++ new_PATH=/Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build/src:/opt/homebrew/lib/ruby/gems/3.3.0/bin:/opt/homebrew/opt/[email protected]/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/runner/.cargo/bin:/usr/local/bin:/Users/runner/.yarn/bin
++ for dir in '$PATH'
++ IFS=' 	
'
++ case "$dir" in
++ test -d /Users/runner/Library/Android/sdk/tools/.
++ new_PATH=/Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build/src:/opt/homebrew/lib/ruby/gems/3.3.0/bin:/opt/homebrew/opt/[email protected]/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/runner/.cargo/bin:/usr/local/bin:/Users/runner/.yarn/bin:/Users/runner/Library/Android/sdk/tools
++ for dir in '$PATH'
++ IFS=' 	
'
++ case "$dir" in
++ test -d /Users/runner/Library/Android/sdk/platform-tools/.
++ new_PATH=/Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build/src:/opt/homebrew/lib/ruby/gems/3.3.0/bin:/opt/homebrew/opt/[email protected]/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/runner/.cargo/bin:/usr/local/bin:/Users/runner/.yarn/bin:/Users/runner/Library/Android/sdk/tools:/Users/runner/Library/Android/sdk/platform-tools
++ for dir in '$PATH'
++ IFS=' 	
'
++ case "$dir" in
++ test -d /Library/Frameworks/Python.framework/Versions/Current/bin/.
++ new_PATH=/Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build/src:/opt/homebrew/lib/ruby/gems/3.3.0/bin:/opt/homebrew/opt/[email protected]/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/runner/.cargo/bin:/usr/local/bin:/Users/runner/.yarn/bin:/Users/runner/Library/Android/sdk/tools:/Users/runner/Library/Android/sdk/platform-tools:/Library/Frameworks/Python.framework/Versions/Current/bin
++ for dir in '$PATH'
++ IFS=' 	
'
++ case "$dir" in
++ test -d /usr/bin/.
++ new_PATH=/Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build/src:/opt/homebrew/lib/ruby/gems/3.3.0/bin:/opt/homebrew/opt/[email protected]/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/runner/.cargo/bin:/usr/local/bin:/Users/runner/.yarn/bin:/Users/runner/Library/Android/sdk/tools:/Users/runner/Library/Android/sdk/platform-tools:/Library/Frameworks/Python.framework/Versions/Current/bin:/usr/bin
++ for dir in '$PATH'
++ IFS=' 	
'
++ case "$dir" in
++ test -d /bin/.
++ new_PATH=/Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build/src:/opt/homebrew/lib/ruby/gems/3.3.0/bin:/opt/homebrew/opt/[email protected]/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/runner/.cargo/bin:/usr/local/bin:/Users/runner/.yarn/bin:/Users/runner/Library/Android/sdk/tools:/Users/runner/Library/Android/sdk/platform-tools:/Library/Frameworks/Python.framework/Versions/Current/bin:/usr/bin:/bin
++ for dir in '$PATH'
++ IFS=' 	
'
++ case "$dir" in
++ test -d /usr/sbin/.
++ new_PATH=/Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build/src:/opt/homebrew/lib/ruby/gems/3.3.0/bin:/opt/homebrew/opt/[email protected]/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/runner/.cargo/bin:/usr/local/bin:/Users/runner/.yarn/bin:/Users/runner/Library/Android/sdk/tools:/Users/runner/Library/Android/sdk/platform-tools:/Library/Frameworks/Python.framework/Versions/Current/bin:/usr/bin:/bin:/usr/sbin
++ for dir in '$PATH'
++ IFS=' 	
'
++ case "$dir" in
++ test -d /sbin/.
++ new_PATH=/Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build/src:/opt/homebrew/lib/ruby/gems/3.3.0/bin:/opt/homebrew/opt/[email protected]/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/runner/.cargo/bin:/usr/local/bin:/Users/runner/.yarn/bin:/Users/runner/Library/Android/sdk/tools:/Users/runner/Library/Android/sdk/platform-tools:/Library/Frameworks/Python.framework/Versions/Current/bin:/usr/bin:/bin:/usr/sbin:/sbin
++ IFS=' 	
'
++ PATH=/Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build/src:/opt/homebrew/lib/ruby/gems/3.3.0/bin:/opt/homebrew/opt/[email protected]/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/runner/.cargo/bin:/usr/local/bin:/Users/runner/.yarn/bin:/Users/runner/Library/Android/sdk/tools:/Users/runner/Library/Android/sdk/platform-tools:/Library/Frameworks/Python.framework/Versions/Current/bin:/usr/bin:/bin:/usr/sbin:/sbin
++ export PATH
++ trap remove_tmp_ EXIT
+ path_prepend_ ./src
+ test 1 '!=' 0
+ path_dir_=./src
+ case $path_dir_ in
+ abs_path_dir_=/Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build/./src
+ case $abs_path_dir_ in
+ PATH=/Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build/./src:/Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build/src:/opt/homebrew/lib/ruby/gems/3.3.0/bin:/opt/homebrew/opt/[email protected]/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/runner/.cargo/bin:/usr/local/bin:/Users/runner/.yarn/bin:/Users/runner/Library/Android/sdk/tools:/Users/runner/Library/Android/sdk/platform-tools:/Library/Frameworks/Python.framework/Versions/Current/bin:/usr/bin:/bin:/usr/sbin:/sbin
+ create_exe_shims_ /Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build/./src
+ case $EXEEXT in
+ return 0
+ shift
+ test 0 '!=' 0
+ export PATH
+ print_ver_ fold printf
+ require_built_ fold printf
+ skip_=no
+ for i in '"$@"'
+ case " $built_programs " in
+ for i in '"$@"'
+ case " $built_programs " in
+ test no = yes
+ test yes = yes
+ local i
+ for i in '$*'
+ env fold --version
fold (GNU coreutils) 2025-08-24
Copyright (C) 2025 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David MacKenzie.
+ for i in '$*'
+ env printf --version
printf (GNU coreutils) 2025-08-24
Copyright (C) 2025 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David MacKenzie.
+ test fr_FR.UTF-8 '!=' none
+ LC_ALL=fr_FR.UTF-8
+ export LC_ALL
+ env printf 'abcdefghijklmnop\u2002qrstuvwxyz\n'
+ env printf 'abcdefghij\nklmnop\u2002\nqrstuvwxyz\n'
+ fold --spaces --width 10 input1
+ compare exp1 out1
+ compare_dev_null_ exp1 out1
+ test 2 = 2
+ test xexp1 = x/dev/null
+ test xout1 = x/dev/null
+ return 2
+ case $? in
+ compare_ exp1 out1
+ LC_ALL=C
+ diff -u exp1 out1
--- exp1	2025-08-24 06:59:43
+++ out1	2025-08-24 06:59:43
@@ -1,3 +1,3 @@
 abcdefghij
-klmnop 
-qrstuvwxyz
+klmnop qrs
+tuvwxyz
+ fail=1
+ env printf 'abcdefghijklmnop\u2003\u2003qrstuvwxyz\n'
+ env printf 'abcdefghij\nklmnop\u2003\u2003\nqrstuvwxyz\n'
+ fold --spaces --width 10 input2
+ compare exp2 out2
+ compare_dev_null_ exp2 out2
+ test 2 = 2
+ test xexp2 = x/dev/null
+ test xout2 = x/dev/null
+ return 2
+ case $? in
+ compare_ exp2 out2
+ LC_ALL=C
+ diff -u exp2 out2
--- exp2	2025-08-24 06:59:43
+++ out2	2025-08-24 06:59:43
@@ -1,3 +1,3 @@
 abcdefghij
-klmnop  
-qrstuvwxyz
+klmnop  qr
+stuvwxyz
+ fail=1
+ Exit 1
+ set +e
+ exit 1
+ exit 1
+ remove_tmp_
+ __st=1
+ cleanup_
+ :
+ test '' = yes
+ cd /Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build
+ chmod -R u+rwx /Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build/gt-fold-spaces.sh.kg5a
+ rm -rf /Users/runner/work/ci-check/ci-check/coreutils-2025-08-24/build/gt-fold-spaces.sh.kg5a
+ exit 1
FAIL tests/fold/fold-spaces.sh (exit status: 1)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.