From: Petr Vorel <pvorel@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.de>
Cc: Richard Palethorpe <rpalethorpe@suse.com>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 2/2] Refactor getegid02 using new LTP API
Date: Tue, 17 Oct 2023 13:35:09 +0200 [thread overview]
Message-ID: <20231017113509.GA931108@pevik> (raw)
In-Reply-To: <20230908141414.28359-3-andrea.cervesato@suse.de>
Hi all,
This code is based on Cyril's suggestion in v1 [1]
if (GID_SIZE_CHECK(st_egid))
TST_EXP_EQ_LI(gid, st_egid);
else
tst_res(TPASS, "getegid() passed");
I wonder which system returns 16 bit gid?
man getgid(2) says that originally there was only 16 bit, than kernel 2.4 added
support for 32 bit and the glibc getegid() wrapper transparently deal with this.
Because even I compile as 32 bit:
$ file getegid01_16
getegid01_16: ELF 32-bit LSB pie executable, Intel 80386
I get comparison, thus 32 bit:
$ ./getegid01_16
...
getegid01.c:25: TPASS: gid == st_egid (1000)
What am I missing?
Kind regards,
Petr
[1] https://lore.kernel.org/ltp/ZPCWWXXHG-oEB5qO@yuki/
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2023-10-17 11:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-08 14:14 [LTP] [PATCH v2 0/2] Refactor getegid testing suite Andrea Cervesato
2023-09-08 14:14 ` [LTP] [PATCH v2 1/2] Refactor getegid01 using new LTP API Andrea Cervesato
2023-09-08 14:14 ` [LTP] [PATCH v2 2/2] Refactor getegid02 " Andrea Cervesato
2023-10-17 11:35 ` Petr Vorel [this message]
2023-10-17 12:41 ` Cyril Hrubis
2023-10-17 12:41 ` Petr Vorel
2023-10-17 11:40 ` Petr Vorel
2023-10-17 8:24 ` [LTP] [PATCH v2 0/2] Refactor getegid testing suite Richard Palethorpe
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=20231017113509.GA931108@pevik \
--to=pvorel@suse.cz \
--cc=andrea.cervesato@suse.de \
--cc=ltp@lists.linux.it \
--cc=rpalethorpe@suse.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