All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Kodanev <alexey.kodanev@oracle.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] syscalls/fallocate04: add 'FALLOC_FL_INSERT_RANGE' test-case
Date: Wed, 27 Jul 2016 13:45:54 +0300	[thread overview]
Message-ID: <579890E2.5010006@oracle.com> (raw)
In-Reply-To: <20160726124522.GD11679@rei.lan>

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


  reply	other threads:[~2016-07-27 10:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-22 16:15 [LTP] [PATCH] syscalls/fallocate04: add 'FALLOC_FL_INSERT_RANGE' test-case Alexey Kodanev
2016-07-26 12:45 ` Cyril Hrubis
2016-07-27 10:45   ` Alexey Kodanev [this message]
2016-07-28 10:18     ` Alexey Kodanev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=579890E2.5010006@oracle.com \
    --to=alexey.kodanev@oracle.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.