Message ID | 20250114112915.610297-11-pvorel@suse.cz (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | LTP tests: load predefined policy, enhancements | expand |
On Tue, 2025-01-14 at 12:29 +0100, Petr Vorel wrote: > Suggested-by: Mimi Zohar <zohar@linux.ibm.com> > Signed-off-by: Petr Vorel <pvorel@suse.cz> Thanks, Petr. Reviewed-by: Mimi Zohar <zohar@linux.ibm.com> > --- > testcases/kernel/security/integrity/ima/tests/ima_setup.sh | 1 + > testcases/lib/tst_test.sh | 4 ++-- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/testcases/kernel/security/integrity/ima/tests/ima_setup.sh > b/testcases/kernel/security/integrity/ima/tests/ima_setup.sh > index 5213763ee0..69ee5a3d65 100644 > --- a/testcases/kernel/security/integrity/ima/tests/ima_setup.sh > +++ b/testcases/kernel/security/integrity/ima/tests/ima_setup.sh > @@ -11,6 +11,7 @@ TST_CLEANUP_CALLER="$TST_CLEANUP" > TST_CLEANUP="ima_cleanup" > TST_NEEDS_ROOT=1 > TST_MOUNT_DEVICE=1 > +TST_SKIP_LSM_WARNINGS=1 > > # TST_MOUNT_DEVICE can be unset, therefore specify explicitly > TST_NEEDS_TMPDIR=1 > diff --git a/testcases/lib/tst_test.sh b/testcases/lib/tst_test.sh > index cfdae02300..2b797705e3 100644 > --- a/testcases/lib/tst_test.sh > +++ b/testcases/lib/tst_test.sh > @@ -1,6 +1,6 @@ > #!/bin/sh > # SPDX-License-Identifier: GPL-2.0-or-later > -# Copyright (c) Linux Test Project, 2014-2022 > +# Copyright (c) Linux Test Project, 2014-2025 > # Author: Cyril Hrubis <chrubis@suse.cz> > # > # LTP test library for shell. > @@ -81,7 +81,7 @@ _tst_do_exit() > fi > > if [ $TST_BROK -gt 0 -o $TST_FAIL -gt 0 -o $TST_WARN -gt 0 ]; then > - _tst_check_security_modules > + [ -z "$TST_SKIP_LSM_WARNINGS" ] && _tst_check_security_modules > fi > > cat >&2 << EOF
diff --git a/testcases/kernel/security/integrity/ima/tests/ima_setup.sh b/testcases/kernel/security/integrity/ima/tests/ima_setup.sh index 5213763ee0..69ee5a3d65 100644 --- a/testcases/kernel/security/integrity/ima/tests/ima_setup.sh +++ b/testcases/kernel/security/integrity/ima/tests/ima_setup.sh @@ -11,6 +11,7 @@ TST_CLEANUP_CALLER="$TST_CLEANUP" TST_CLEANUP="ima_cleanup" TST_NEEDS_ROOT=1 TST_MOUNT_DEVICE=1 +TST_SKIP_LSM_WARNINGS=1 # TST_MOUNT_DEVICE can be unset, therefore specify explicitly TST_NEEDS_TMPDIR=1 diff --git a/testcases/lib/tst_test.sh b/testcases/lib/tst_test.sh index cfdae02300..2b797705e3 100644 --- a/testcases/lib/tst_test.sh +++ b/testcases/lib/tst_test.sh @@ -1,6 +1,6 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0-or-later -# Copyright (c) Linux Test Project, 2014-2022 +# Copyright (c) Linux Test Project, 2014-2025 # Author: Cyril Hrubis <chrubis@suse.cz> # # LTP test library for shell. @@ -81,7 +81,7 @@ _tst_do_exit() fi if [ $TST_BROK -gt 0 -o $TST_FAIL -gt 0 -o $TST_WARN -gt 0 ]; then - _tst_check_security_modules + [ -z "$TST_SKIP_LSM_WARNINGS" ] && _tst_check_security_modules fi cat >&2 << EOF
Suggested-by: Mimi Zohar <zohar@linux.ibm.com> Signed-off-by: Petr Vorel <pvorel@suse.cz> --- testcases/kernel/security/integrity/ima/tests/ima_setup.sh | 1 + testcases/lib/tst_test.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-)