summaryrefslogtreecommitdiff
path: root/tests/dd/stats.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/dd/stats.sh')
-rwxr-xr-xtests/dd/stats.sh10
1 files changed, 9 insertions, 1 deletions
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