From 4047b1a09d07ba9d66ca8d5f36aa4ebcbfe83a62 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 22 Oct 2009 01:17:47 -0700 Subject: tests: hopefully fix stalls in input trailer tests 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. --- t/lib-input-trailer.sh | 16 ++++++++-------- 1 file 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)" -- cgit v1.2.3-24-ge0c7