coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dd: add 'skip_bytes' and 'count_bytes' operands


From: Bernhard Voelker
Subject: Re: dd: add 'skip_bytes' and 'count_bytes' operands
Date: Mon, 13 Feb 2012 08:50:23 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20120129 Thunderbird/10.0

On 02/10/2012 05:21 PM, Jérémy Compostella wrote:

Sorry, this is a bit late, but I have 2 notes about the
new dd/bytes test:

> diff --git a/tests/dd/bytes b/tests/dd/bytes
> new file mode 100755
> index 0000000..6038742
> --- /dev/null
> +++ b/tests/dd/bytes
> @@ -0,0 +1,57 @@

> +# seek bytes
> +echo abcdefghijklm |
> + dd bs=5 seek=8 oflag=seek_bytes > out 2> /dev/null || fail=1
> +echo abcdefghijklm |
> + dd bs=4 seek=2 > expected 2> /dev/null || fail=1
> +compare expected out || fail=1

I don't know why, but I somehow do not have a good feeling
about a test comparing the result of the program to be tested
with another run. If something cowardly fails, then this test
would succeed.

> +# seek bytes on empty file
> +echo abcdefghijklm |
> + dd bs=5 seek=8 oflag=seek_bytes > out2 2> /dev/null || fail=1
> +compare expected out2 || fail=1

The comment is wrong here, isn't it?

Have a nice day,
Berny



reply via email to

[Prev in Thread] Current Thread [Next in Thread]