public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v1 1/2] Refactor getegid01 using new LTP API
Date: Fri, 1 Sep 2023 14:21:04 +0200	[thread overview]
Message-ID: <ZPHXMGNqT6WQUmyg@yuki> (raw)
In-Reply-To: <ace7a77a-f187-45ed-91e5-c19b8d240a39@suse.com>

Hi!
> >> +	TST_EXP_EQ_LI(gid, st_egid);
> > So the code here should really do:
> >
> > 	if (GID16_CHECK(st_egid))
> > 		TST_EXP_EQ_LI(gid, st_egid);
> > 	else
> > 		tst_res(TPASS, "getgid() passed");
> 
> Mmmh, this would make sense if GID16_CHECK only checked for 16bit 
> compatibility, because at the moment it's way different:
> 
> 
> #define GID16_CHECK(gid, sys_name, cleanup) \
> if (!GID_SIZE_CHECK(gid)) { \
>      tst_brkm(TBROK, cleanup, \
>          "gid %d of %s is too large for testing 16-bit version " \
>          "of %s()", gid, #gid, #sys_name); \
> }
> 
> Am I missing something?

It seems that I confused GID16_CHECK with GID_SIZE_CHECK(), so it should
have been:

	if (GID_SIZE_CHECK(st_egid))

> > Which skips the check on 16bit syscall in the case that the GID
> > overflows 16bit, however we still have to report at least single TPASS
> > otherwise the test will be failed by the test library.
> >
> >>   }
> >>   
> >> -static void cleanup(void)
> >> -{
> >> -}
> >> +static struct tst_test test = {
> >> +	.test_all = run,
> >> +};
> >> -- 
> >> 2.35.3
> >>
> >>
> >> -- 
> >> Mailing list info: https://lists.linux.it/listinfo/ltp
> 
> Andrea
> 

-- 
Cyril Hrubis
chrubis@suse.cz

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

  reply	other threads:[~2023-09-01 12:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-31 10:42 [LTP] [PATCH v1 0/2] Refactor getegid testing suite Andrea Cervesato
2023-08-31 10:42 ` [LTP] [PATCH v1 1/2] Refactor getegid01 using new LTP API Andrea Cervesato
2023-08-31 13:32   ` Cyril Hrubis
2023-09-01 11:46     ` Andrea Cervesato via ltp
2023-09-01 12:21       ` Cyril Hrubis [this message]
2023-09-01 11:57     ` Andrea Cervesato via ltp
2023-09-01 12:22       ` Cyril Hrubis
2023-09-01 12:47         ` Andrea Cervesato via ltp
2023-08-31 10:42 ` [LTP] [PATCH v1 2/2] Refactor getegid02 " Andrea Cervesato
2023-09-08  9:37   ` Richard Palethorpe
2023-09-08 10:25     ` 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=ZPHXMGNqT6WQUmyg@yuki \
    --to=chrubis@suse.cz \
    --cc=andrea.cervesato@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox