Fix test hang when running under ninja

The psub tests create a fifo and launch a background job to write to it.
However fifos have this obnoxious behavior where opening the file blocks
until both sides are ready. In one of the tests we don't actually read
from the fifo we create, so the background job hangs, and the tests
never complete. Fix this by just reading from the fifo.
This commit is contained in:
ridiculousfish 2017-12-21 15:47:09 -08:00
parent a2114233ac
commit 9907a8df4d

View File

@ -12,6 +12,10 @@ rm $filename
set -l filename (echo foo | psub --testing --fifo)
test -p $filename
or echo 'psub is not a fifo' >&2
# hack: the background write that psub peforms may block
# until someone opens the fifo for reading. So make sure we
# actually read it.
cat $filename > /dev/null
rm $filename
cat (echo foo | psub)