The cp/preserve-mode test fails on Alpine Linux 3.18. test-suite.log from Alpine Linux 3.18:
FAIL: tests/cp/preserve-mode ============================ + initial_cwd_=/home/bruno/coreutils-9.4.170-7b206/build + testdir_prefix_ + printf gt + pfx_=gt + mktempd_ /home/bruno/coreutils-9.4.170-7b206/build gt-preserve-mode.sh.XXXX + destdir_=/home/bruno/coreutils-9.4.170-7b206/build + template_=gt-preserve-mode.sh.XXXX + MAX_TRIES_=4 + destdir_slash_=/home/bruno/coreutils-9.4.170-7b206/build/ + unset TMPDIR + d=/home/bruno/coreutils-9.4.170-7b206/build/gt-preserve-mode.sh.l7wc + : + test -d /home/bruno/coreutils-9.4.170-7b206/build/gt-preserve-mode.sh.l7wc + ls -dgo /home/bruno/coreutils-9.4.170-7b206/build/gt-preserve-mode.sh.l7wc + perms='drwx--S--- 2 4096 Mar 24 14:14 /home/bruno/coreutils-9.4.170-7b206/build/gt-preserve-mode.sh.l7wc' + : + echo /home/bruno/coreutils-9.4.170-7b206/build/gt-preserve-mode.sh.l7wc + return + test_dir_=/home/bruno/coreutils-9.4.170-7b206/build/gt-preserve-mode.sh.l7wc + cd /home/bruno/coreutils-9.4.170-7b206/build/gt-preserve-mode.sh.l7wc + 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= + sep_= + test -d /home/bruno/coreutils-9.4.170-7b206/build/src/. + new_PATH=/home/bruno/coreutils-9.4.170-7b206/build/src + sep_=: + test -d /home/bruno/bin/. + new_PATH=/home/bruno/coreutils-9.4.170-7b206/build/src:/home/bruno/bin + sep_=: + test -d /usr/local/bin/. + new_PATH=/home/bruno/coreutils-9.4.170-7b206/build/src:/home/bruno/bin:/usr/local/bin + sep_=: + test -d /usr/sbin/. + new_PATH=/home/bruno/coreutils-9.4.170-7b206/build/src:/home/bruno/bin:/usr/local/bin:/usr/sbin + sep_=: + test -d /usr/bin/. + new_PATH=/home/bruno/coreutils-9.4.170-7b206/build/src:/home/bruno/bin:/usr/local/bin:/usr/sbin:/usr/bin + sep_=: + test -d /sbin/. + new_PATH=/home/bruno/coreutils-9.4.170-7b206/build/src:/home/bruno/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin + sep_=: + test -d /bin/. + new_PATH=/home/bruno/coreutils-9.4.170-7b206/build/src:/home/bruno/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin + sep_=: + IFS=' ' + PATH=/home/bruno/coreutils-9.4.170-7b206/build/src:/home/bruno/bin:/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_=/home/bruno/coreutils-9.4.170-7b206/build/./src + PATH=/home/bruno/coreutils-9.4.170-7b206/build/./src:/home/bruno/coreutils-9.4.170-7b206/build/src:/home/bruno/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin + create_exe_shims_ /home/bruno/coreutils-9.4.170-7b206/build/./src + return 0 + shift + test 0 '!=' 0 + export PATH + print_ver_ cp + require_built_ cp + skip_=no + test no '=' yes + test yes '=' yes + local i + env cp --version cp (GNU coreutils) 9.4.170-7b206 Copyright (C) 2024 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 Torbjorn Granlund, David MacKenzie, and Jim Meyering. + umask 0022 + touch a b + chmod 600 b + cp '--no-preserve=mode' b c + get_mode a + stat '-c%f' a + get_mode c + stat '-c%f' c + test 81a4 '=' 81a4 + chmod 600 c + cp '--no-preserve=mode' a b + get_mode b + stat '-c%f' b + get_mode c + stat '-c%f' c + test 8180 '=' 8180 + mkdir d1 d2 + chmod 705 d2 + cp '--no-preserve=mode' -r d2 d3 + get_mode d1 + stat '-c%f' d1 + get_mode d3 + stat '-c%f' d3 + test 45ed '=' 41ed + fail=1 + rm -f a b + touch a + chmod 600 a + cp '--no-preserve=mode' '--preserve=all' a b + get_mode a + stat '-c%f' a + get_mode b + stat '-c%f' b + test 8180 '=' 8180 + mkfifo fifo + cp -a '--no-preserve=mode' fifo fifo_copy + get_mode fifo + stat '-c%f' fifo + get_mode fifo_copy + stat '-c%f' fifo_copy + test 11a4 '=' 11a4 + rm -f a b c + touch a + chmod 660 a + cp a b + cp '--preserve=ownership' a c + get_mode b + stat '-c%f' b + get_mode c + stat '-c%f' c + test 81a0 '=' 81a0 + Exit 1 + set +e + exit 1 + exit 1 + remove_tmp_ + __st=1 + cleanup_ + : + test '=' yes + cd /home/bruno/coreutils-9.4.170-7b206/build + chmod -R u+rwx /home/bruno/coreutils-9.4.170-7b206/build/gt-preserve-mode.sh.l7wc + rm -rf /home/bruno/coreutils-9.4.170-7b206/build/gt-preserve-mode.sh.l7wc + exit 1 FAIL tests/cp/preserve-mode.sh (exit status: 1)