diff --git a/test/iolint.awk b/test/iolint.awk index 257678ed..826004b4 100644 --- a/test/iolint.awk +++ b/test/iolint.awk @@ -56,10 +56,12 @@ BEGIN { fflush() # `%.*s' used for input pipe and output pipe - "echo hello" | getline junk - print "hello" | "echo hello" - print close("echo hello") - print close("echo hello") + # We add the sleep, as we've seen broken pipe race conditions + # on some systems. + "sleep 2; echo hello" | getline junk + print "hello" | "sleep 2; echo hello" + print close("sleep 2; echo hello") + print close("sleep 2; echo hello") fflush() # `%.*s' used for output file and output pipe" diff --git a/test/iolint.ok b/test/iolint.ok index fbf514c2..206aa834 100644 --- a/test/iolint.ok +++ b/test/iolint.ok @@ -23,11 +23,11 @@ gawk: iolint.awk:53: warning: `cat' used for output file and output pipe 0 hello 0 -gawk: iolint.awk:60: warning: `echo hello' used for input pipe and output pipe +gawk: iolint.awk:62: warning: `sleep 2; echo hello' used for input pipe and output pipe hello 0 0 -gawk: iolint.awk:68: warning: `cksum' used for output file and output pipe +gawk: iolint.awk:70: warning: `cksum' used for output file and output pipe 3015617425 6 0 0