public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: selinux@vger.kernel.org, linux-integrity@vger.kernel.org,
	ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v4 1/4] shell: Add tst_runas.c helper
Date: Wed, 17 Dec 2025 16:57:44 +0100	[thread overview]
Message-ID: <20251217155744.GA75994@pevik> (raw)
In-Reply-To: <aULIhXrMA4dgTwGg@yuki.lan>

> 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>

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2025-12-17 15:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-09 18:55 [LTP] [PATCH v4 0/4] tst_runas.c, ima_{conditionals, measurements}.sh enhancements Petr Vorel
2025-12-09 18:55 ` [LTP] [PATCH v4 1/4] shell: Add tst_runas.c helper Petr Vorel
2025-12-15  6:57   ` Li Wang via ltp
2025-12-17 15:13     ` Cyril Hrubis
2025-12-17 15:57       ` Petr Vorel [this message]
2025-12-09 18:55 ` [LTP] [PATCH v4 2/4] tst_test.sh: Add TST_USR_{G,U}ID variables Petr Vorel
2025-12-17 15:47   ` [LTP] [PATCH v4 2/4] tst_test.sh: Add TST_USR_{G, U}ID variables Cyril Hrubis
2025-12-18 11:47     ` Petr Vorel
2025-12-09 18:55 ` [LTP] [PATCH v4 3/4] ima_{conditionals, measurements}.sh: Use tst_runas Petr Vorel
2025-12-17 16:05   ` Cyril Hrubis
2025-12-09 18:55 ` [LTP] [PATCH v4 4/4] ima_conditionals.sh: Split test by request Petr Vorel
2025-12-11 10:37 ` [LTP] [PATCH v4 0/4] tst_runas.c, ima_{conditionals, measurements}.sh enhancements Andrea Cervesato via ltp

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=20251217155744.GA75994@pevik \
    --to=pvorel@suse.cz \
    --cc=chrubis@suse.cz \
    --cc=linux-integrity@vger.kernel.org \
    --cc=ltp@lists.linux.it \
    --cc=selinux@vger.kernel.org \
    /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