linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH ima-evm-utils] fsverity.test: Add /usr/sbin into $PATH
@ 2023-03-10 10:47 Petr Vorel
  2023-03-10 19:38 ` Mimi Zohar
  0 siblings, 1 reply; 3+ messages in thread
From: Petr Vorel @ 2023-03-10 10:47 UTC (permalink / raw)
  To: linux-integrity; +Cc: Petr Vorel, Mimi Zohar

Unlike GitHub CI, tests which run by packaging tools often run as non-root,
thus required tools aren't visible:

./functions.sh: line 45: type: mkfs: not found
mkfs is required for test
./functions.sh: line 45: type: blkid: not found
blkid is required for test
./functions.sh: line 45: type: e2fsck: not found
e2fsck is required for test
./functions.sh: line 45: type: tune2fs: not found
tune2fs is required for test

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Hi Mimi,

some would maybe appreciate option to skip all tests,
but this is enough for me.

Kind regards,
Petr

 tests/fsverity.test | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/fsverity.test b/tests/fsverity.test
index 01d5c35..a274158 100755
--- a/tests/fsverity.test
+++ b/tests/fsverity.test
@@ -30,7 +30,7 @@
 # custom policy rules might take precedence.
 
 cd "$(dirname "$0")" || exit 1
-PATH=../src:../fsverity-utils:$PATH
+PATH=../src:../fsverity-utils:/usr/sbin:$PATH
 source ./functions.sh
 
 # Base VERBOSE on the environment variable, if set.
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH ima-evm-utils] fsverity.test: Add /usr/sbin into $PATH
  2023-03-10 10:47 [PATCH ima-evm-utils] fsverity.test: Add /usr/sbin into $PATH Petr Vorel
@ 2023-03-10 19:38 ` Mimi Zohar
  2023-03-13  7:22   ` Petr Vorel
  0 siblings, 1 reply; 3+ messages in thread
From: Mimi Zohar @ 2023-03-10 19:38 UTC (permalink / raw)
  To: Petr Vorel, linux-integrity

On Fri, 2023-03-10 at 11:47 +0100, Petr Vorel wrote:
> Unlike GitHub CI, tests which run by packaging tools often run as non-root,
> thus required tools aren't visible:
> 
> ./functions.sh: line 45: type: mkfs: not found
> mkfs is required for test
> ./functions.sh: line 45: type: blkid: not found
> blkid is required for test
> ./functions.sh: line 45: type: e2fsck: not found
> e2fsck is required for test
> ./functions.sh: line 45: type: tune2fs: not found
> tune2fs is required for test
> 
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> Hi Mimi,
> 
> some would maybe appreciate option to skip all tests,
> but this is enough for me.

Hi Petr,

Thank you for the patch.  It's now queued in next-testing.

The UML kernel opens up a lot of options going forward.  For now all
the tests are lumped together, but they should be separated based on
ima-evm-utils selftests vs. the kernel tests.  Even that might not be
granular enough.

For now from the command line, the environment variable "TESTS"
overrides the set of tests as defined in the Makefile to execute.  For
example, "export TESTS="ima_sign.test sign_verify.test"; make -e check"
executes just the two tests.

Also commit b573b7d4a186 ("Introduce TST_LIST variable to select a test
to execute")  can define the set of tests to execute.

-- 
thanks,

Mimi


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH ima-evm-utils] fsverity.test: Add /usr/sbin into $PATH
  2023-03-10 19:38 ` Mimi Zohar
@ 2023-03-13  7:22   ` Petr Vorel
  0 siblings, 0 replies; 3+ messages in thread
From: Petr Vorel @ 2023-03-13  7:22 UTC (permalink / raw)
  To: Mimi Zohar; +Cc: linux-integrity

Hi Mimi,

> On Fri, 2023-03-10 at 11:47 +0100, Petr Vorel wrote:
> > Unlike GitHub CI, tests which run by packaging tools often run as non-root,
> > thus required tools aren't visible:

> > ./functions.sh: line 45: type: mkfs: not found
> > mkfs is required for test
> > ./functions.sh: line 45: type: blkid: not found
> > blkid is required for test
> > ./functions.sh: line 45: type: e2fsck: not found
> > e2fsck is required for test
> > ./functions.sh: line 45: type: tune2fs: not found
> > tune2fs is required for test

> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> > ---
> > Hi Mimi,

> > some would maybe appreciate option to skip all tests,
> > but this is enough for me.

> Hi Petr,

> Thank you for the patch.  It's now queued in next-testing.
Thank you.

> The UML kernel opens up a lot of options going forward.  For now all
> the tests are lumped together, but they should be separated based on
> ima-evm-utils selftests vs. the kernel tests.  Even that might not be
> granular enough.
Thanks for info, sounds reasonable.

> For now from the command line, the environment variable "TESTS"
> overrides the set of tests as defined in the Makefile to execute.  For
> example, "export TESTS="ima_sign.test sign_verify.test"; make -e check"
> executes just the two tests.
Also, TESTS= would skip all the tests (but prefer to run them).

> Also commit b573b7d4a186 ("Introduce TST_LIST variable to select a test
> to execute")  can define the set of tests to execute.
Good to know (this one is hidden in test functions).

Kind regards,
Petr

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-13  7:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-10 10:47 [PATCH ima-evm-utils] fsverity.test: Add /usr/sbin into $PATH Petr Vorel
2023-03-10 19:38 ` Mimi Zohar
2023-03-13  7:22   ` Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).