[LTP] [PATCH v4 1/4] shell: Add tst_runas.c helper
Petr Vorel
pvorel@suse.cz
Wed Dec 17 16:57:44 CET 2025
> Jo!
:)
> > > + char *uid_env = getenv(TST_TO_STR_(LTP_USR_UID));
> > > + char *gid_env = getenv(TST_TO_STR_(LTP_USR_GID));
> > So far this format is correct.
> > But as I pointed in the last thread, here using TST_TO_STR_ might be a
> > potential
I'm sorry to overlook this.
> > issue if someday we make changes on that to become two-level macro.
> > It likely to interpreted as getenv("65534");
> > So on the safe side, I’d still recommend writing it explicitly:
> > char *uid_env = getenv("LTP_USR_UID");
> > char *gid_env = getenv("LTP_USR_GID");
> +1
The reason I used the macro is that I prefer to use constants instead of a plain
text (also danger of typo). But changed to your proposal and merged whole
patchset.
Thanks all for your review.
Kind regards,
Petr
> > The rest whole patch set looks good:
> > Reviewed-by: Li Wang <liwang@redhat.com>
> For the rest also from me:
> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
More information about the ltp
mailing list