All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.com>
Cc: ltp@lists.linux.it, linux-integrity@vger.kernel.org
Subject: Re: [LTP] [PATCH 2/4] ima_conditionals.sh: Split test by request
Date: Mon, 6 Oct 2025 13:21:36 +0200	[thread overview]
Message-ID: <20251006112136.GA82874@pevik> (raw)
In-Reply-To: <DDB27F9FQ4B3.11FGF9PVV0DAE@suse.com>

Hi Andrea,

> Hi!

> On Thu Oct 2, 2025 at 10:36 AM CEST, Petr Vorel wrote:
> > This helps to run all testcases on systems without CONFIG_IMA_WRITE_POLICY=y
> > (disabled by default in mainline, therefore disabled for some distros,
> > e.g. openSUSE Tumbleweed), if SUT reboots.

> > The downside is creating user account 4x instead just once.

> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> > ---
> >  runtest/ima                                   |  5 +-
> >  .../integrity/ima/tests/ima_conditionals.sh   | 67 ++++++++++++-------
> >  2 files changed, 47 insertions(+), 25 deletions(-)

> > diff --git a/runtest/ima b/runtest/ima
> > index 01942eefa3..c8d0c6801e 100644
> > --- a/runtest/ima
> > +++ b/runtest/ima
> > @@ -6,5 +6,8 @@ ima_violations ima_violations.sh
> >  ima_keys ima_keys.sh
> >  ima_kexec ima_kexec.sh
> >  ima_selinux ima_selinux.sh
> > -ima_conditionals ima_conditionals.sh
> > +ima_conditionals_uid ima_conditionals.sh -r uid
> > +ima_conditionals_fowner ima_conditionals.sh -r fowner
> > +ima_conditionals_gid ima_conditionals.sh -r gid
> > +ima_conditionals_fgroup ima_conditionals.sh -r fgroup

> Why not using multiple test cases inside the test?

That would not help. I hoped I explained the reason well in the commit message
but obviously I didn't.

verify_measurement() writes into /sys/kernel/security/ima/policy which on
kernels without CONFIG_IMA_WRITE_POLICY requires SUT reboot. Because LTP does
not support any reboot, this needs to be handled after test finishes. That's why
I separated the tests. This helps to cover more than the first test case out of
four.

Kind regards,
Petr

WARNING: multiple messages have this Message-ID (diff)
From: Petr Vorel <pvorel@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.com>
Cc: linux-integrity@vger.kernel.org, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 2/4] ima_conditionals.sh: Split test by request
Date: Mon, 6 Oct 2025 13:21:36 +0200	[thread overview]
Message-ID: <20251006112136.GA82874@pevik> (raw)
In-Reply-To: <DDB27F9FQ4B3.11FGF9PVV0DAE@suse.com>

Hi Andrea,

> Hi!

> On Thu Oct 2, 2025 at 10:36 AM CEST, Petr Vorel wrote:
> > This helps to run all testcases on systems without CONFIG_IMA_WRITE_POLICY=y
> > (disabled by default in mainline, therefore disabled for some distros,
> > e.g. openSUSE Tumbleweed), if SUT reboots.

> > The downside is creating user account 4x instead just once.

> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> > ---
> >  runtest/ima                                   |  5 +-
> >  .../integrity/ima/tests/ima_conditionals.sh   | 67 ++++++++++++-------
> >  2 files changed, 47 insertions(+), 25 deletions(-)

> > diff --git a/runtest/ima b/runtest/ima
> > index 01942eefa3..c8d0c6801e 100644
> > --- a/runtest/ima
> > +++ b/runtest/ima
> > @@ -6,5 +6,8 @@ ima_violations ima_violations.sh
> >  ima_keys ima_keys.sh
> >  ima_kexec ima_kexec.sh
> >  ima_selinux ima_selinux.sh
> > -ima_conditionals ima_conditionals.sh
> > +ima_conditionals_uid ima_conditionals.sh -r uid
> > +ima_conditionals_fowner ima_conditionals.sh -r fowner
> > +ima_conditionals_gid ima_conditionals.sh -r gid
> > +ima_conditionals_fgroup ima_conditionals.sh -r fgroup

> Why not using multiple test cases inside the test?

That would not help. I hoped I explained the reason well in the commit message
but obviously I didn't.

verify_measurement() writes into /sys/kernel/security/ima/policy which on
kernels without CONFIG_IMA_WRITE_POLICY requires SUT reboot. Because LTP does
not support any reboot, this needs to be handled after test finishes. That's why
I separated the tests. This helps to cover more than the first test case out of
four.

Kind regards,
Petr

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

  reply	other threads:[~2025-10-06 11:21 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-02  8:36 [PATCH 0/4] ima_{conditionals,measurements}.sh enhancements Petr Vorel
2025-10-02  8:36 ` [LTP] " Petr Vorel
2025-10-02  8:36 ` [PATCH 1/4] ima_{conditionals,measurements}.sh: Add temporary user Petr Vorel
2025-10-02  8:36   ` [LTP] [PATCH 1/4] ima_{conditionals, measurements}.sh: " Petr Vorel
2025-10-02  8:36 ` [PATCH 2/4] ima_conditionals.sh: Split test by request Petr Vorel
2025-10-02  8:36   ` [LTP] " Petr Vorel
2025-10-06  7:26   ` Andrea Cervesato
2025-10-06  7:26     ` Andrea Cervesato via ltp
2025-10-06 11:21     ` Petr Vorel [this message]
2025-10-06 11:21       ` Petr Vorel
2025-10-06 11:40       ` Andrea Cervesato
2025-10-06 11:40         ` Andrea Cervesato via ltp
2025-10-08  4:38         ` Petr Vorel
2025-10-08  4:38           ` Petr Vorel
2025-10-02  8:37 ` [PATCH 3/4] ima_conditionals.sh: Use 'sg' without 'sudo' Petr Vorel
2025-10-02  8:37   ` [LTP] " Petr Vorel
2025-10-02  8:37 ` [PATCH 4/4] ima_{conditionals,measurements}.sh: Use 'su' instead of 'sudo' Petr Vorel
2025-10-02  8:37   ` [LTP] [PATCH 4/4] ima_{conditionals, measurements}.sh: " Petr Vorel
2025-10-06  7:26 ` [LTP] [PATCH 0/4] ima_{conditionals,measurements}.sh enhancements Andrea Cervesato
2025-10-06  7:26   ` [LTP] [PATCH 0/4] ima_{conditionals, measurements}.sh enhancements Andrea Cervesato via ltp
2025-10-06  9:35   ` [LTP] [PATCH 0/4] ima_{conditionals,measurements}.sh enhancements Petr Vorel
2025-10-06  9:35     ` [LTP] [PATCH 0/4] ima_{conditionals, measurements}.sh enhancements Petr Vorel

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=20251006112136.GA82874@pevik \
    --to=pvorel@suse.cz \
    --cc=andrea.cervesato@suse.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=ltp@lists.linux.it \
    /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.