summaryrefslogtreecommitdiff
path: root/tests/dd
diff options
context:
space:
mode:
authorPozsár Balázs <pozsy@uhulinux.hu>2012-09-24 02:39:09 +0100
committerPádraig Brady <P@draigBrady.com>2012-09-24 15:14:23 +0100
commit7331ab55fc28ac03c18cd683b7748a07dbd63f0f (patch)
treeef1b7388c8698720657d5a60ef0c9a20c7f1b87d /tests/dd
parent2dad87f6415ec68564e934ace33496db1abc68c7 (diff)
downloadcoreutils-7331ab55fc28ac03c18cd683b7748a07dbd63f0f.tar.xz
dd: new option, status=none to suppress output statistics
* src/dd.c (STATUS_NONE): A new bitmask combining all STATUS_ options, thus used to suppress all informational output. (struct symbol_value statuses): Expose the "none" option, corresponding to the STATUS_NONE bitmask above. (print_stats): Return early if STATUS_NONE is specified. Also move the call to gethrxtime() down so that it's only called when needed. (usage): Describe the new options. * doc/coreutils.texi (dd invocation): Likewise. * NEWS: Mention the new feature. * tests/dd/misc.sh: Ensure the new option works.
Diffstat (limited to 'tests/dd')
-rwxr-xr-xtests/dd/misc.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/dd/misc.sh b/tests/dd/misc.sh
index 9a9bba1ea..f029a1116 100755
--- a/tests/dd/misc.sh
+++ b/tests/dd/misc.sh
@@ -30,6 +30,13 @@ echo data > $tmp_in || framework_failure_
ln $tmp_in $tmp_in2 || framework_failure_
ln -s $tmp_in $tmp_sym || framework_failure_
+# check status=none suppresses all output to stderr
+dd status=none if=$tmp_in of=/dev/null 2> err || fail=1
+test -s 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
+test -s err && fail=1
+
dd if=$tmp_in of=$tmp_out 2> /dev/null || fail=1
compare $tmp_in $tmp_out || fail=1