Linux Test Project
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: lufei <lufei@uniontech.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] unshare01: add EINVAL check
Date: Thu, 13 Mar 2025 10:35:43 +0100	[thread overview]
Message-ID: <20250313093543.GA135222@pevik> (raw)
In-Reply-To: <20250312092809.1668719-1-lufei@uniontech.com>

Hi lufei,

Please next time have a look on other tests, if the same thing is already
being tested or not.  EINVAL is already tested in unshare02.c (as -1).

That's why is this patch not needed (if really high value should be tested,
which I don't think so, it should be in unshare02.c).

Also, we try to not mixing positive tests (e.g. CLONE_FILES) with negative ones
(e.g. EINVAL), we put negative to separate test.

> ---
>  testcases/kernel/syscalls/unshare/unshare01.c | 19 ++++++++++++++-----
>  1 file changed, 14 insertions(+), 5 deletions(-)

> diff --git a/testcases/kernel/syscalls/unshare/unshare01.c b/testcases/kernel/syscalls/unshare/unshare01.c
> index 6e6315b11..ce1ed2e14 100644
> --- a/testcases/kernel/syscalls/unshare/unshare01.c
> +++ b/testcases/kernel/syscalls/unshare/unshare01.c
> @@ -28,21 +28,30 @@
>  #include "config.h"

>  #ifdef HAVE_UNSHARE
> +#define INV_FLAG 0x0123
> +

>  static struct test_case_t {
>  	int mode;
>  	const char *desc;
> +	const int eno;
nit: "eno" is not much descriptive, we usually use exp_errno.

Kind regards,
Petr

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

      reply	other threads:[~2025-03-13  9:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-12  9:28 [LTP] [PATCH] unshare01: add EINVAL check lufei
2025-03-13  9:35 ` Petr Vorel [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=20250313093543.GA135222@pevik \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=lufei@uniontech.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