[LTP] [PATCH] syscalls/fallocate04: add 'FALLOC_FL_INSERT_RANGE' test-case

Alexey Kodanev alexey.kodanev@oracle.com
Wed Jul 27 12:45:54 CEST 2016


Hi,

On 07/26/2016 03:45 PM, Cyril Hrubis wrote:
> ...
> +
> +	size_t size = buf_size;
> +	char tmp_buf[buf_size];
> +	char exp_buf[size];
> +
> +	fill_tst_buf(tmp_buf);
> +
> +	memcpy(exp_buf, tmp_buf, block_size);
> +	memcpy(exp_buf +  2 * block_size, tmp_buf + 2 * block_size,
> +	       buf_size - block_size * 2);
> +	memset(exp_buf + block_size - 1, 0, block_size + 2);
> +
> +	check_file_data(exp_buf, size);
> Why not just:
>
>          fill_tst_buf(exp_buf);
> 	memset(exp_buf + block_size - 1, 0, block_size + 2);

Correct, we returned to the state that was after test-case 3.


Thanks,
Alexey



More information about the ltp mailing list