From 7ea084082dad3d795a7b41c957f5a420eb1603d6 Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Mon, 14 Apr 2025 11:13:39 -0700 Subject: [PATCH] Ignore pipefail alternative error when not a tty. This happens with the basic-truncate test, only. It's the only user of the `yes` program. The `yes` command normally fails gracefully under the usual runs that are attached to some terminal. But when the test script runs entirely under something else, it will throw a needless error message that pollutes the test output: `yes: standard output: Broken pipe` Adjust the redirect to omit all stderr for `yes` in this case. Signed-off-by: Auke Kok --- tests/tests/basic-truncate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tests/basic-truncate.sh b/tests/tests/basic-truncate.sh index c7a3906f..7ef030eb 100644 --- a/tests/tests/basic-truncate.sh +++ b/tests/tests/basic-truncate.sh @@ -11,7 +11,7 @@ FILE="$T_D0/file" # final block as we truncated past it. # echo "== truncate writes zeroed partial end of file block" -yes | dd of="$FILE" bs=8K count=1 status=none iflag=fullblock +yes 2>/dev/null | dd of="$FILE" bs=8K count=1 status=none iflag=fullblock sync # not passing iflag=fullblock causes the file occasionally to just be