From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/2] syscalls/sync_file_range: add partial file sync test-case
Date: Mon, 4 Mar 2019 15:40:00 +0100 [thread overview]
Message-ID: <20190304144000.GA15696@rei> (raw)
In-Reply-To: <1551428901-30162-1-git-send-email-sumit.garg@linaro.org>
Hi!
> +static void verify_sync_partial_file(void)
> +{
> + int fd;
> + unsigned long written;
> +
> + fd = SAFE_OPEN(FNAME, O_RDWR|O_CREAT, MODE);
> +
> + lseek(fd, FILE_SIZE/4, SEEK_SET);
> +
> + tst_dev_bytes_written(tst_device->dev);
> +
> + tst_fill_fd(fd, 0xff, TST_MB, FILE_SIZE_MB/2);
Any reason why we don't do full FILE_SIZE_MB write here and then check
that the result was somewhere between FILE_SIZE/2 +-10% ?
Other than that the patch looks good.
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2019-03-04 14:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-01 8:28 [LTP] [PATCH 1/2] syscalls/sync_file_range: add partial file sync test-case Sumit Garg
2019-03-01 8:28 ` [LTP] [PATCH 2/2] doc: document new library functions Sumit Garg
2019-03-01 15:54 ` Cyril Hrubis
2019-03-04 14:40 ` Cyril Hrubis [this message]
2019-03-05 6:35 ` [LTP] [PATCH 1/2] syscalls/sync_file_range: add partial file sync test-case Sumit Garg
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=20190304144000.GA15696@rei \
--to=chrubis@suse.cz \
--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.