All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Li Wang <liwang@redhat.com>
Cc: Petr Vorel <pvorel@suse.cz>,
	ltp@lists.linux.it, Mimi Zohar <zohar@linux.ibm.com>,
	linux-integrity@vger.kernel.org, selinux@vger.kernel.org,
	Jan Stancek <jstancek@redhat.com>
Subject: Re: [PATCH v4 1/4] shell: Add tst_runas.c helper
Date: Wed, 17 Dec 2025 16:13:09 +0100	[thread overview]
Message-ID: <aULIhXrMA4dgTwGg@yuki.lan> (raw)
In-Reply-To: <CAEemH2ej8-e_S4LgcKKkt08dUhyF0TreWp-QvXzQ1QGQYbywJg@mail.gmail.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: Cyril Hrubis <chrubis@suse.cz>
To: Li Wang <liwang@redhat.com>
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:13:09 +0100	[thread overview]
Message-ID: <aULIhXrMA4dgTwGg@yuki.lan> (raw)
In-Reply-To: <CAEemH2ej8-e_S4LgcKKkt08dUhyF0TreWp-QvXzQ1QGQYbywJg@mail.gmail.com>

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

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

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

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-09 18:55 [PATCH v4 0/4] tst_runas.c, ima_{conditionals, measurements}.sh enhancements Petr Vorel
2025-12-09 18:55 ` [LTP] " Petr Vorel
2025-12-09 18:55 ` [PATCH v4 1/4] shell: Add tst_runas.c helper Petr Vorel
2025-12-09 18:55   ` [LTP] " Petr Vorel
2025-12-15  6:57   ` Li Wang via ltp
2025-12-17 15:13     ` Cyril Hrubis [this message]
2025-12-17 15:13       ` Cyril Hrubis
2025-12-17 15:57       ` Petr Vorel
2025-12-17 15:57         ` [LTP] " Petr Vorel
2025-12-09 18:55 ` [PATCH v4 2/4] tst_test.sh: Add TST_USR_{G,U}ID variables Petr Vorel
2025-12-09 18:55   ` [LTP] " Petr Vorel
2025-12-17 15:47   ` Cyril Hrubis
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     ` [PATCH v4 2/4] tst_test.sh: Add TST_USR_{G,U}ID variables Petr Vorel
2025-12-18 11:47       ` [LTP] [PATCH v4 2/4] tst_test.sh: Add TST_USR_{G, U}ID variables Petr Vorel
2025-12-09 18:55 ` [PATCH v4 3/4] ima_{conditionals,measurements}.sh: Use tst_runas Petr Vorel
2025-12-09 18:55   ` [LTP] [PATCH v4 3/4] ima_{conditionals, measurements}.sh: " Petr Vorel
2025-12-17 16:05   ` [PATCH v4 3/4] ima_{conditionals,measurements}.sh: " Cyril Hrubis
2025-12-17 16:05     ` [LTP] [PATCH v4 3/4] ima_{conditionals, measurements}.sh: " Cyril Hrubis
2025-12-09 18:55 ` [PATCH v4 4/4] ima_conditionals.sh: Split test by request Petr Vorel
2025-12-09 18:55   ` [LTP] " Petr Vorel
2025-12-11 10:37 ` [LTP] [PATCH v4 0/4] tst_runas.c, ima_{conditionals, measurements}.sh enhancements Andrea Cervesato
2025-12-11 10:37   ` 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=aULIhXrMA4dgTwGg@yuki.lan \
    --to=chrubis@suse.cz \
    --cc=jstancek@redhat.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=liwang@redhat.com \
    --cc=ltp@lists.linux.it \
    --cc=pvorel@suse.cz \
    --cc=selinux@vger.kernel.org \
    --cc=zohar@linux.ibm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.