summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKamil Dudka <kdudka@redhat.com>2008-07-23 11:29:21 +0200
committerJim Meyering <meyering@redhat.com>2008-07-23 15:55:45 +0200
commitf674a10f7ebc55de6181007a5216a297e3dc3365 (patch)
tree656d939f65f7bb6263a1648f6152fd9fb4c5f437 /tests
parent4fff95cfe1b1c11501759d8cb5386489628dfabb (diff)
downloadcoreutils-f674a10f7ebc55de6181007a5216a297e3dc3365.tar.xz
dd: new option: iflag=fullblock to accumulate full input blocks
* src/dd.c (iread_fullblock): New function for reading full blocks. (scanargs): Check for new parameter iflag=fullblock. (skip): Use iread_fnc pointer instead of iread function. (dd_copy): Use iread_fnc pointer instead of iread function. * tests/dd/misc: Add test for dd - read full blocks. * doc/coretuils.texi: Mention new parameter iflag=fullblock. * NEWS: Mentioned the change.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/dd/misc9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/dd/misc b/tests/dd/misc
index d54fbfaee..24e5eba55 100755
--- a/tests/dd/misc
+++ b/tests/dd/misc
@@ -88,6 +88,15 @@ fi
outbytes=`echo x | dd bs=3 ibs=10 obs=10 conv=sync 2>/dev/null | wc -c`
test "$outbytes" -eq 3 || fail=1
+(echo a; sleep .1; echo b) \
+ | LC_ALL=C dd bs=4 status=noxfer iflag=fullblock >out 2>err || fail=1
+echo "a
+b" > out_ok
+echo "1+0 records in
+1+0 records out" > err_ok
+compare out out_ok || fail=1
+compare err err_ok || fail=1
+
test $fail -eq 0 && fail=$warn
(exit $fail); exit $fail