Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Drat, Test/A05 still hanging sometimes



On Oct 13,  5:03am, Axel Beckert wrote:
} 
} On Sun, Oct 12, 2014 at 11:47:39AM -0700, Bart Schaefer wrote:
} > Tests in each of A01, A04, and A05 use "coproc".  How does this match up
} > with the hung builds you have encountered?
} 
} Quite well -- as far as I can see there was only one exception so far:
} Once it also hung inside X02zlevi.ztst. All others were either in one
} of the three tests you mentioned, with A05 being the most often one
} (and IIRC also the one you experience twice or so).

Give the following a try?  With the "sleep" in there, I am unable to
make the A05 test hang.  Without it, I get one hang in each 20 repeats
of the test, pretty reliably.

Although why putting the sleep at that particular place has the right
side-effect, I do not know.

diff --git a/Test/A05execution.ztst b/Test/A05execution.ztst
index ca97f4f..0b40a73 100644
--- a/Test/A05execution.ztst
+++ b/Test/A05execution.ztst
@@ -208,6 +208,7 @@ F:This similar test was triggering a reproducible failure with pipestatus.
   print -u $ZTST_fd 'This test takes 5 seconds to fail...'
   { printf "%d\n" {1..20000} } | ( read -e )
   hang(){ printf "%d\n" {2..20000} | cat }; hang | ( read -e )
+  sleep 1 ;: avoid coproc exit race condition
   print -p done
   read -et 6 -p
 0:Bug regression: piping a shell construct to an external process may hang



Messages sorted by: Reverse Date, Date, Thread, Author