git: 5d55553e160a - main - sh tests: Fix racy test11.0
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 07 Nov 2025 17:37:30 UTC
The branch main has been updated by bdrewery:
URL: https://cgit.FreeBSD.org/src/commit/?id=5d55553e160a93788372785300f5bd07c2451f93
commit 5d55553e160a93788372785300f5bd07c2451f93
Author: Bryan Drewery <bdrewery@FreeBSD.org>
AuthorDate: 2025-11-07 17:28:37 +0000
Commit: Bryan Drewery <bdrewery@FreeBSD.org>
CommitDate: 2025-11-07 17:37:19 +0000
sh tests: Fix racy test11.0
This was sometimes exiting while the child fifo was created resulting in
[ENOTEMPTY] from rm. The child fifo isn't needed, just sleep.
PR: 290837
Fixes: e31fb97148f ("read builtin: Empty variables on timeout")
MFC after: 3 days
---
bin/sh/tests/builtins/read11.0 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bin/sh/tests/builtins/read11.0 b/bin/sh/tests/builtins/read11.0
index c75ed9c92a83..5bae80318b15 100644
--- a/bin/sh/tests/builtins/read11.0
+++ b/bin/sh/tests/builtins/read11.0
@@ -5,8 +5,8 @@ T=$(mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX)
trap 'rm -rf "$T"' 0
cd $T
mkfifo fifo1
-# Open fifo1 for writing and then read block on a dummy fifo
-{ mkfifo fifo2; read dummy <fifo2; } >fifo1 &
+# Open fifo1 for writing
+{ sleep 10; } >fifo1 &
# Wait for the child to open fifo1 for writing
exec 3<fifo1
v=original_value