diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-10-22 01:17:47 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-10-22 01:17:47 -0700 |
commit | 4047b1a09d07ba9d66ca8d5f36aa4ebcbfe83a62 (patch) | |
tree | f3d7b7ab7919668eb103e7548d56deb74ff6905f /t | |
parent | 98f928bb4949129b2d96617919ac7a6e51a69323 (diff) | |
download | rainbows-4047b1a09d07ba9d66ca8d5f36aa4ebcbfe83a62.tar.gz |
utee is line-oriented on _read_, so avoid messing with that for this. Additionally, spawn our FIFO cats before we start writing gobs of data out since it could cause the writers to block otherwise.
Diffstat (limited to 't')
-rw-r--r-- | t/lib-input-trailer.sh | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/t/lib-input-trailer.sh b/t/lib-input-trailer.sh index 758da4e..072dd60 100644 --- a/t/lib-input-trailer.sh +++ b/t/lib-input-trailer.sh @@ -18,11 +18,11 @@ wait_for_pid $pid echo "small blob" ( - echo hello world | content-md5-put cat $fifo > $tmp & + echo hello world | content-md5-put wait echo ok > $ok -) | socat - TCP:$listen | utee $fifo +) | socat - TCP:$listen > $fifo fgrep 'HTTP/1.1 200 OK' $tmp test xok = x"$(cat $ok)" @@ -30,11 +30,11 @@ check_stderr echo "big blob" ( - content-md5-put < random_blob cat $fifo > $tmp & + content-md5-put < random_blob wait echo ok > $ok -) | socat - TCP:$listen | utee $fifo +) | socat - TCP:$listen > $fifo fgrep 'HTTP/1.1 200 OK' $tmp test xok = x"$(cat $ok)" @@ -42,19 +42,19 @@ check_stderr echo "staggered blob" ( + cat $fifo > $tmp & ( dd bs=164 count=1 < random_blob sleep 2 dd bs=4545 count=1 < random_blob sleep 2 dd bs=1234 count=1 < random_blob - echo ok > $ok + echo subok > $ok ) 2>/dev/null | content-md5-put - test xok = x"$(cat $ok)" - cat $fifo > $tmp & + test xsubok = x"$(cat $ok)" wait echo ok > $ok -) | socat - TCP:$listen | utee $fifo +) | socat - TCP:$listen > $fifo fgrep 'HTTP/1.1 200 OK' $tmp test xok = x"$(cat $ok)" |