I should have checked the previous test suites because :
Mon, Aug 22, 2016 at 09:55:15AM +0200, Reda Sallahi wrote:
>
> if (in.offset > INT64_MAX / ibsz || size < in.offset * ibsz) {
> - /* We give a warning if the skip option is bigger than the input
> - * size and create an empty output disk image (i.e. like dd(1)).
> - */
> - error_report("%s: cannot skip to specified offset", in.filename);
> - in_pos = size;
> + if (!(dd.status & C_STATUS_NONE)) {
> + /* We give a warning if the skip option is bigger than the input
> + * size and create an empty output disk image (i.e. like dd(1)).
> + */
> + error_report("%s: cannot skip to specified offset", in.filename);
> + in_pos = size;
> + }
in_pos = size should have gone outside of this last block. This means in_pos
is set to size only if dd.status != C_STATUS_NONE.
> +$QEMU_IMG compare "$TEST_IMG" "$TEST_IMG.out"
And also this should have been $TEST_IMG.out.dd.
I fixed this just now (and with a test file that also adds in skip and seek)
and will send it in the next version.
--
Reda