[LTP] [PATCH v4 1/4] shell: Add tst_runas.c helper

Cyril Hrubis chrubis@suse.cz
Wed Dec 17 16:13:09 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
> 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 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>

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list