[LTP] [PATCH v2 1/2] preadv/preadv01.c: add new testcase

Cyril Hrubis chrubis@suse.cz
Tue Dec 15 15:40:44 CET 2015


Hi!
> +	if (i < tc->size) {
> +		tst_resm(TFAIL, "Buffer wrong at %i have %c expected a",
> +			 i, vec[i]);

I've changed the %c to %x since more than half of the char values are
non-printable ones and will probably mess up terminal.

> +	ret = tst_fill_file("file", 0x61, CHUNK, 2);
> +	if (ret)
> +		tst_brkm(TBROK | TERRNO, cleanup, "Failed to fill test file");

Change to single tst_fill_file() is not a good one. Since that way we
cannot say that the offset parameter for the syscall is working as
expected. So I changed this part to go with memset() and SAFE_WRITE()
and pushed, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the Ltp mailing list