[LTP] Requested user & group [was: Re: [linux-test-project/ltp] Release 20210927 - LTP 20210927]

Martin Doucha mdoucha@suse.cz
Wed Oct 6 10:12:27 CEST 2021


On 05. 10. 21 22:24, Petr Vorel wrote:
>> On 10/4/21 11:02 AM, Petr Vorel wrote:
> Looking into tst_get_{g,u}ids() implementation it "The function will fill the
> remaining (size-start) entries with unique UID/GID values.". But the problem is
> that it expect there are no gaps in UID/GID values. While this is true for
> traditional linux distros (not sure about embedded distros), it's definitely not
> true for aosp, see AID_ definitions in libcutils source [1].
> 
> e.g. tst_get_gids(test_groups, 0, 2) (from setregid03.c) returns GID 1 and 2.
> But on aosp getpwuid(1) and getpwuid(2) fails (I verified that by running code
> on aosp 8). There is GID AID_DAEMON 1 ("daemon") and AID_BIN 2 ("bin"), which
> has been added for aosp 9 (8e8648463d7 ("libcutils: Add "daemon" and "bin" users
> for testing only")) and IMHO no use of tst_get_gids() so far does require higher
> GID that 2, but once higher ID is needed it will break (and even adding GID
> "nobody" would help much).

Actually, the tests using tst_get_uids() or tst_get_gids() currently do
not query any additional information about the returned UID/GID values.
Those tests will work just fine even if there is no corresponding user
account or group.

-- 
Martin Doucha   mdoucha@suse.cz
QA Engineer for Software Maintenance
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic


More information about the ltp mailing list