diff options
Diffstat (limited to 'tests/misc/cat-buf')
-rwxr-xr-x | tests/misc/cat-buf | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/tests/misc/cat-buf b/tests/misc/cat-buf index 2dea96cfe..cd6f9df8a 100755 --- a/tests/misc/cat-buf +++ b/tests/misc/cat-buf @@ -33,13 +33,16 @@ mkfifo fifo || framework_failure echo 1 > exp -dd count=1 if=fifo > out & -(echo 1; sleep .5; echo 2) | cat -v > fifo -wait # for dd to complete - -# Though unlikely, this test may fail because dd was starved -# between opening the fifo and reading from it until after the -# second echo. So ask to double check rather than failing. -compare out exp || skip_test_ "possible test failure. Please verify." +cat_buf_1() +{ + local delay="$1" + + dd count=1 if=fifo > out & + (echo 1; sleep $delay; echo 2) | cat -v > fifo + wait # for dd to complete + compare out exp +} + +retry_delay_ cat_buf_1 .1 6 || fail=1 Exit $fail |