Probing further at printf-surprise.sh, it appears that the problem is: * musl is unaffected by the printf bug being tested
* therefore, it does successfully output 20 MiB of blank space * `head -c 10 fifo` will read the first 10 characters of the fifo * the rest of the 20 MiB cannot be written, so SIGPIPE is received * 'exit=141' (- 128 = 13 = SIGPIPE) I have attached a patch that fixes both csplit-io-err and printf-surprise on my test box. -- A. Wilcox (awilfox) Project Lead, Adélie Linux http://adelielinux.org
--- coreutils-8.27/tests/misc/csplit-io-err.sh.old 2017-01-01 22:34:24.000000000 +0000
+++ coreutils-8.27/tests/misc/csplit-io-err.sh 2017-08-11 20:07:31.094710635 +0000
@@ -54,6 +54,6 @@
# Get the wording of the OS-dependent ENOSPC message
returns_ 1 seq 1 >/dev/full 2>msgt || framework_failure_
-sed 's/seq: write error: //' msgt > msg || framework_failure_
+sed 's/seq: .*: //' msgt > msg || framework_failure_
# Create the expected error message
{ printf "%s" "csplit: write error for 'xx01': " ; cat msg ; } > exp \
--- coreutils-8.27/tests/misc/printf-surprise.sh.old 2017-01-21 14:53:43.000000000 +0000
+++ coreutils-8.27/tests/misc/printf-surprise.sh 2017-08-11 20:20:00.769708921 +0000
@@ -80,6 +80,7 @@
n_out=$(wc -c < out)
case $n_out:$diagnostic:$exit in
+ 10:n:141) ;; # ok, succeeds w/SIGPIPE due to lots of output: Linux
10:n:0) ;; # ok, succeeds w/no diagnostic: FreeBSD 6.1
0:y:1) ;; # ok, glibc-2.8 and newer, when printf(3) fails with ENOMEM
signature.asc
Description: OpenPGP digital signature
