public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Dai Shili <daisl.fnst@fujitsu.com>
Cc: xuyang2018.jy@cn.fujitsu.com, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v4] syscalls/statx09: Add new test
Date: Mon, 7 Feb 2022 12:26:47 +0100	[thread overview]
Message-ID: <YgEB9/BvNhgIAl2n@pevik> (raw)
In-Reply-To: <1643365754-5366-1-git-send-email-daisl.fnst@fujitsu.com>

Hi all,

> +++ b/testcases/kernel/syscalls/statx/statx09.c
> @@ -0,0 +1,160 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
> +/*
> + * Copyright (c) 2022 FUJITSU LIMITED. All rights reserved.
> + * Author: Dai Shili <daisl.fnst@fujitsu.com>
> + */
> +
> +/*\
> + * [Description]
> + *
> + * This code tests if the attributes field of statx received expected value.
> + * File set with following flags by using SAFE_IOCTL:
> + *
> + * - STATX_ATTR_VERITY: statx() system call sets STATX_ATTR_VERITY if the file
> + * has fs-verity enabled. This can perform better than FS_IOC_GETFLAGS and
> + * FS_IOC_MEASURE_VERITY because it doesn't require opening the file,
> + * and opening verity files can be expensive.
> + *
> + * Minimum Linux version required is v5.5.
I know this has been merged, this probably not worth of fixing it,
but the "required" is misleading when we detect via EOPNOTSUPP and EINVAL
and thus not use .min_kver. If it was due possible backport,
thus it should have been e.g. "functionality has been merged in kernel v5.5".

> + */
> +
...
> +static struct test_cases {
> +	void (*tfunc)(void);
> +} tcases[] = {
> +	{&test_flagged},
> +	{&test_unflagged},
> +};
> +
> +static void run(unsigned int i)
> +{
> +	tcases[i].tfunc();
> +}
OT: we may lack something in the API, when function like this need to be
defined.

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  parent reply	other threads:[~2022-02-07 11:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-24  5:19 [LTP] [RESEND] syscalls/statx09: Add new test Dai Shili
2022-01-24 13:40 ` Cyril Hrubis
2022-01-26  2:37   ` daisl.fnst
2022-01-26  3:00   ` [LTP] [PATCH v2] " Dai Shili
2022-01-27 13:57     ` Cyril Hrubis
2022-01-28  3:02       ` [LTP] [PATCH v3] " Dai Shili
2022-01-28  4:07         ` xuyang2018.jy
2022-01-28 10:29           ` [LTP] [PATCH v4] " Dai Shili
2022-01-30  2:33             ` xuyang2018.jy
2022-02-04 13:42             ` Cyril Hrubis
2022-02-07 11:26             ` Petr Vorel [this message]
2022-02-07 11:31               ` Cyril Hrubis
2022-02-07 11:55                 ` Petr Vorel
2022-02-07 13:45                   ` Andrea Cervesato via ltp

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=YgEB9/BvNhgIAl2n@pevik \
    --to=pvorel@suse.cz \
    --cc=daisl.fnst@fujitsu.com \
    --cc=ltp@lists.linux.it \
    --cc=xuyang2018.jy@cn.fujitsu.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox