diff options
Diffstat (limited to 'tests/dd')
-rwxr-xr-x | tests/dd/misc.sh | 7 | ||||
-rwxr-xr-x | tests/dd/stats.sh | 10 |
2 files changed, 14 insertions, 3 deletions
diff --git a/tests/dd/misc.sh b/tests/dd/misc.sh index f877fddfa..34dfba722 100755 --- a/tests/dd/misc.sh +++ b/tests/dd/misc.sh @@ -35,9 +35,12 @@ dd status=none if=$tmp_in of=/dev/null 2> err || fail=1 compare /dev/null err || fail=1 dd status=none if=$tmp_in skip=2 of=/dev/null 2> err || fail=1 compare /dev/null err || fail=1 -# check status=none is cumulative with status=noxfer -dd status=none status=noxfer if=$tmp_in of=/dev/null 2> err || fail=1 +# check later status=none overrides earlier status=noxfer +dd status=noxfer status=none if=$tmp_in of=/dev/null 2> err || fail=1 compare /dev/null err || fail=1 +# check later status=noxfer overrides earlier status=none +dd status=none status=noxfer if=$tmp_in of=/dev/null 2> err || fail=1 +compare /dev/null err && fail=1 dd if=$tmp_in of=$tmp_out 2> /dev/null || fail=1 compare $tmp_in $tmp_out || fail=1 diff --git a/tests/dd/stats.sh b/tests/dd/stats.sh index 386752e77..24b8c496b 100755 --- a/tests/dd/stats.sh +++ b/tests/dd/stats.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Check robust handling of SIG{INFO,USR1} +# Check stats output for SIG{INFO,USR1} and status=progress # Copyright (C) 2014 Free Software Foundation, Inc. @@ -54,4 +54,12 @@ for open in '' '1'; do grep '500000000 bytes .* copied' err || { cat err; fail=1; } done +progress_output() +{ + { sleep "$1"; echo 1; } | dd bs=1 status=progress of=/dev/null 2>err + # Progress output should be for "byte ... copied", while final is "bytes ..." + grep 'byte .* copied' err +} +retry_delay_ progress_output 1 4 || { cat err; fail=1; } + Exit $fail |