[LTP] [PATCH v12 2/3] lib: New library function tst_get_free_uid
Wei Gao
wegao@suse.com
Fri Jul 24 01:54:05 CEST 2026
On Thu, Jul 23, 2026 at 12:43:24PM +0000, Andrea Cervesato wrote:
> Hi Wei,
>
> > +/**
> > + * tst_get_free_gid() - Find a GID not assigned to any group.
> > + * @skip: GID value to skip (pass 0 to skip none).
> > + *
> > + * Scans the group database for the first unused GID starting from 1,
> > + * skipping @skip. The @skip argument can be used to ignore e.g. the main
> > + * group of a specific user in case it's not listed in the group file.
> > + * Calls tst_brk(TBROK) if no free GID is found or a lookup error occurs.
> > + *
> > + * Return: An unused gid_t value.
> > + */
>
> This documentation is out of scope and should be sent from an another
> patch-set.
>
> > + errno = 0;
> > + if (getpwuid(ret))
> > + continue;
> > +
> > + if (errno == 0 || errno == ENOENT || errno == ESRCH) {
>
> This contradicts the patch 1/3.
This line is same as patch 1/3, could you give more detail where
contradicts?
>
> --
> Andrea Cervesato
> SUSE QE Automation Engineer Linux
> andrea.cervesato@suse.com
More information about the ltp
mailing list