summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2020-10-05 16:51:40 +0300
committerArnold D. Robbins <arnold@skeeve.com>2020-10-05 16:51:40 +0300
commit0ec8cee2eb25fa994ff21703d0443e4f56f045e0 (patch)
tree9f4f6f53e564031e42bc7fbe1d67c2ecbac10080
parent375698fca45bff1b88c6e115e433a77c04399b5c (diff)
downloadgawk-0ec8cee2eb25fa994ff21703d0443e4f56f045e0.tar.gz
Remove racy test from iolint.awk.
-rw-r--r--test/ChangeLog5
-rw-r--r--test/iolint.awk5
-rw-r--r--test/iolint.ok8
3 files changed, 10 insertions, 8 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 8563e076..8bb20553 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2020-10-05 Arnold D. Robbins <arnold@skeeve.com>
+
+ * iolint.awk, iolint.ok: Remove |& test to cat. It was
+ inherently racy.
+
2020-10-01 Arnold D. Robbins <arnold@skeeve.com>
* iolint.awk, iolint.ok: Adjust output to cat for exit status
diff --git a/test/iolint.awk b/test/iolint.awk
index b6c8eeb4..3f3bb22f 100644
--- a/test/iolint.awk
+++ b/test/iolint.awk
@@ -54,13 +54,14 @@ BEGIN {
# `%.*s' used for output file and output pipe
# `%.*s' used for output file and two-way pipe
# `%.*s' used for output pipe and two-way pipe
+ # Not doing |& due to race condition and signals. sigh
exec_cat = "exec cat"
print "/bin/cat \"$@\"" > exec_cat
print "hello" | exec_cat
- print "hello" |& exec_cat
- print close(exec_cat)
+ # print "hello" |& exec_cat
print close(exec_cat)
print close(exec_cat)
+ # print close(exec_cat)
fflush()
# `%.*s' used for input pipe and output pipe
diff --git a/test/iolint.ok b/test/iolint.ok
index 873b0244..5a4ae823 100644
--- a/test/iolint.ok
+++ b/test/iolint.ok
@@ -23,15 +23,11 @@ b1946ac92492d2347c6235b4d2611184 -
gawk: ./iolint.awk:49: warning: `echo hello' used for input pipe and output file
0
0
-gawk: ./iolint.awk:59: warning: `exec cat' used for output file and output pipe
-gawk: ./iolint.awk:60: warning: `exec cat' used for output pipe and two-way pipe
-gawk: ./iolint.awk:60: warning: `exec cat' used for output file and two-way pipe
+gawk: ./iolint.awk:60: warning: `exec cat' used for output file and output pipe
hello
-gawk: ./iolint.awk:61: warning: failure status (269) on two-way pipe close of `exec cat': Success
-269
0
0
-gawk: ./iolint.awk:68: warning: `echo hello' used for input pipe and output pipe
+gawk: ./iolint.awk:69: warning: `echo hello' used for input pipe and output pipe
hello
0
0