From: Shuang Qiu <shuang.qiu@oracle.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] Skip test02 before kernel 2.6.38
Date: Wed, 13 Jan 2016 13:14:12 +0800 [thread overview]
Message-ID: <5695DD24.6000905@oracle.com> (raw)
In-Reply-To: <1452661129-3963-1-git-send-email-shuang.qiu@oracle.com>
Sorry,forgot to indicate the testcase in subject,please ignore this one.
On 01/13/2016 12:58 PM, shuang.qiu@oracle.com wrote:
> From: Shuang Qiu <shuang.qiu@oracle.com>
>
> FALLOC_FL_PUNCH_HOLE flag for fallocate syscall is available since Linux 2.6.38.
>
> Signed-off-by: Shuang Qiu <shuang.qiu@oracle.com>
> ---
> testcases/kernel/syscalls/fallocate/fallocate04.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/testcases/kernel/syscalls/fallocate/fallocate04.c b/testcases/kernel/syscalls/fallocate/fallocate04.c
> index 41453ac..f77e283 100644
> --- a/testcases/kernel/syscalls/fallocate/fallocate04.c
> +++ b/testcases/kernel/syscalls/fallocate/fallocate04.c
> @@ -142,6 +142,11 @@ static void test02(void)
> tst_resm(TINFO, "read allocated file size '%zu'", alloc_size0);
> tst_resm(TINFO, "make a hole with FALLOC_FL_PUNCH_HOLE");
>
> + if (tst_kvercmp(2, 6, 38) < 0) {
> + tst_brkm(TCONF, cleanup,
> + "Test must be run with kernel 2.6.38 or newer");
> + }
> +
> if (fallocate(fd, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE,
> block_size, block_size) == -1) {
> if (errno == EOPNOTSUPP)
prev parent reply other threads:[~2016-01-13 5:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-13 4:58 [LTP] [PATCH] Skip test02 before kernel 2.6.38 shuang.qiu
2016-01-13 5:14 ` Shuang Qiu [this message]
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=5695DD24.6000905@oracle.com \
--to=shuang.qiu@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.