* [LTP] [PATCH 1/1] ima_setup.sh: Fix loop device workaround
@ 2022-09-20 21:43 Petr Vorel
2022-09-21 2:08 ` Li Wang
0 siblings, 1 reply; 3+ messages in thread
From: Petr Vorel @ 2022-09-20 21:43 UTC (permalink / raw)
To: ltp
Since 1f6bd6e66 ("tst_test.sh: Add $TST_ALL_FILESYSTEMS") ima_keys.sh
and other following tests fail on systems with tmpfs on $TMPDIR:
ima_keys 1 TCONF: IMA policy does not specify '^measure.*func=KEY_CHECK'
tst_device.c:255: TWARN: ioctl(/dev/loop0, LOOP_CLR_FD, 0) no ENXIO for too long
Usage:
tst_device acquire [size [filename]]
tst_device release /path/to/device
tst_device clear /path/to/device
ima_keys 1 TWARN: Failed to release device '/dev/loop0'
rm: cannot remove '/tmp/LTP_ima_keys.YArl935DCg/mntpoint': Device or resource busy
unset TST_NEEDS_DEVICE should have been done before loading tst_test.sh,
as it's not a good idea to modify TST_* variables after loading tst_test.sh
(It worked before just by change).
Fixes: 04021637f ("tst_test.sh: Cleanup getopts usage")
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/kernel/security/integrity/ima/tests/ima_setup.sh | 3 +--
1 file changed, 1 insertion(+), 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 a626aae44..4b6690ce6 100644
--- a/testcases/kernel/security/integrity/ima/tests/ima_setup.sh
+++ b/testcases/kernel/security/integrity/ima/tests/ima_setup.sh
@@ -348,10 +348,9 @@ require_evmctl()
fi
}
-. tst_test.sh
-
# loop device is needed to use only for tmpfs
TMPDIR="${TMPDIR:-/tmp}"
if [ "$(df -T $TMPDIR | tail -1 | awk '{print $2}')" != "tmpfs" -a -n "$TST_NEEDS_DEVICE" ]; then
unset TST_NEEDS_DEVICE
fi
+. tst_test.sh
--
2.37.3
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [LTP] [PATCH 1/1] ima_setup.sh: Fix loop device workaround
2022-09-20 21:43 [LTP] [PATCH 1/1] ima_setup.sh: Fix loop device workaround Petr Vorel
@ 2022-09-21 2:08 ` Li Wang
2022-09-22 12:24 ` Petr Vorel
0 siblings, 1 reply; 3+ messages in thread
From: Li Wang @ 2022-09-21 2:08 UTC (permalink / raw)
To: Petr Vorel; +Cc: LTP List
[-- Attachment #1.1: Type: text/plain, Size: 64 bytes --]
Reviewed-by: Li Wang <liwang@redhat.com>
--
Regards,
Li Wang
[-- Attachment #1.2: Type: text/html, Size: 455 bytes --]
[-- Attachment #2: Type: text/plain, Size: 60 bytes --]
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [LTP] [PATCH 1/1] ima_setup.sh: Fix loop device workaround
2022-09-21 2:08 ` Li Wang
@ 2022-09-22 12:24 ` Petr Vorel
0 siblings, 0 replies; 3+ messages in thread
From: Petr Vorel @ 2022-09-22 12:24 UTC (permalink / raw)
To: Li Wang; +Cc: LTP List
Hi all,
FYI this needs more fixes (WIP).
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-22 12:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-20 21:43 [LTP] [PATCH 1/1] ima_setup.sh: Fix loop device workaround Petr Vorel
2022-09-21 2:08 ` Li Wang
2022-09-22 12:24 ` Petr Vorel
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.