Linux Test Project
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Yang Xu <xuyang2018.jy@fujitsu.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/2] syscalls/pidfd_open: Simplify code
Date: Wed, 9 Feb 2022 15:19:04 +0100	[thread overview]
Message-ID: <YgPNWHc+xwKCRcvv@pevik> (raw)
In-Reply-To: <1644399738-2155-1-git-send-email-xuyang2018.jy@fujitsu.com>

Hi Xu,

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Nice cleanup.
+1 for Cyril's note to TST_EXP_FD_SILENT().

> diff --git a/testcases/kernel/syscalls/pidfd_open/pidfd_open01.c b/testcases/kernel/syscalls/pidfd_open/pidfd_open01.c
> +static void setup(void)
> +{
> +	pidfd_open_supported();
> +}
> +
>  static struct tst_test test = {
> -	.min_kver = "5.3",
> +	.setup = setup,
>  	.test_all = run,
why not just .setup = pidfd_open_supported; ?

...

> diff --git a/testcases/kernel/syscalls/pidfd_open/pidfd_open03.c b/testcases/kernel/syscalls/pidfd_open/pidfd_open03.c
> index 48470e5e1..f41afa2fc 100644
> --- a/testcases/kernel/syscalls/pidfd_open/pidfd_open03.c
> +++ b/testcases/kernel/syscalls/pidfd_open/pidfd_open03.c
...
> +static void setup(void)
> +{
> +	pidfd_open_supported();
> +}
> +
And here as well.

Kind regards,
Petr

>  static struct tst_test test = {
> -	.min_kver = "5.3",
> +	.setup = setup,
>  	.test_all = run,
>  	.forks_child = 1,
>  	.needs_checkpoints = 1,

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

  parent reply	other threads:[~2022-02-09 14:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-09  9:42 [LTP] [PATCH 1/2] syscalls/pidfd_open: Simplify code Yang Xu
2022-02-09  9:42 ` [LTP] [PATCH 2/2] syscalls/pidfd_open04: Add new test with PIDFD_NONBLOCK flag Yang Xu
2022-02-09 13:47   ` Cyril Hrubis
2022-02-10  1:49     ` xuyang2018.jy
2022-02-09 10:00 ` [LTP] [PATCH 1/2] syscalls/pidfd_open: Simplify code xuyang2018.jy
2022-02-09 13:23 ` Cyril Hrubis
2022-02-09 14:19 ` Petr Vorel [this message]
2022-02-10  1:50   ` xuyang2018.jy
2022-02-10  3:41   ` [LTP] [PATCH v2 " Yang Xu
2022-02-10  3:41     ` [LTP] [PATCH v2 2/2] syscalls/pidfd_open04: Add new test with PIDFD_NONBLOCK flag Yang Xu
2022-02-10 15:04       ` Cyril Hrubis
2022-02-11  2:00         ` xuyang2018.jy

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=YgPNWHc+xwKCRcvv@pevik \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=xuyang2018.jy@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