public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Richard Palethorpe <rpalethorpe@suse.de>
To: Avinesh Kumar <akumar@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] setregid01.c: Turn comment into docparse format and use TST_EXP_PASS macro
Date: Tue, 10 Jan 2023 14:41:22 +0000	[thread overview]
Message-ID: <87ilheh2p3.fsf@suse.de> (raw)
In-Reply-To: <20230110130135.27979-1-akumar@suse.de>

Hello,

Merged, thanks!

Avinesh Kumar <akumar@suse.de> writes:

> Signed-off-by: Avinesh Kumar <akumar@suse.de>
> ---
>  .../kernel/syscalls/setregid/setregid01.c     | 19 ++++++++-----------
>  1 file changed, 8 insertions(+), 11 deletions(-)
>
> diff --git a/testcases/kernel/syscalls/setregid/setregid01.c b/testcases/kernel/syscalls/setregid/setregid01.c
> index 8c9e11918..741028a4a 100644
> --- a/testcases/kernel/syscalls/setregid/setregid01.c
> +++ b/testcases/kernel/syscalls/setregid/setregid01.c
> @@ -15,14 +15,16 @@
>   * Co-pilot: Dave Fenner
>   */
>  
> -/*
> - * Testcase to test the basic functionality of setregid(2) systemm call.
> +/*\
> + * [Description]
> + *
> + * Verify the basic functionality of setregid(2) system call.
>   */
>  
>  #include "tst_test.h"
>  #include "compat_tst_16.h"
>  
> -static gid_t gid, egid;	    /* current real and effective group id */
> +static gid_t gid, egid;
>  static gid_t neg_one = -1;
>  
>  static struct tcase {
> @@ -30,23 +32,18 @@ static struct tcase {
>  	gid_t *arg2;
>  	const char *msg;
>  } tcases[] = {
> -	{&neg_one, &neg_one, "Dont change either real or effective gid" },
> +	{&neg_one, &neg_one, "Leave real and effective both gids unchanged" },
>  	{&neg_one, &egid,    "Change effective to effective gid" },
>  	{&gid,     &neg_one, "Change real to real gid" },
>  	{&neg_one, &gid,     "Change effective to real gid" },
> -	{&gid,     &gid,     "Try to change real to current real" }
> +	{&gid,     &gid,     "Change real and effective both gids to current real gid" }
>  };
>  
>  static void run(unsigned int n)
>  {
>  	struct tcase *tc = &tcases[n];
>  
> -	TEST(SETREGID(*tc->arg1, *tc->arg2));
> -
> -	if (TST_RET == -1)
> -		tst_res(TFAIL | TTERRNO, "%s", tc->msg);
> -	else
> -		tst_res(TPASS, "%s", tc->msg);
> +	TST_EXP_PASS(SETREGID(*tc->arg1, *tc->arg2), "%s:", tc->msg);
>  }
>  
>  static void setup(void)
> -- 
> 2.39.0


-- 
Thank you,
Richard.

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

      reply	other threads:[~2023-01-10 14:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-10 13:01 [LTP] [PATCH] setregid01.c: Turn comment into docparse format and use TST_EXP_PASS macro Avinesh Kumar
2023-01-10 14:41 ` Richard Palethorpe [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=87ilheh2p3.fsf@suse.de \
    --to=rpalethorpe@suse.de \
    --cc=akumar@suse.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox