[LTP] [PATCH 3/3] ima_setup.sh: Use tst_supported_fs instead of df
Petr Vorel
pvorel@suse.cz
Fri Sep 23 12:55:54 CEST 2022
LTP prefers it's helpers instead of external dependency
(be friendly for embedded or other minimal environments).
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/kernel/security/integrity/ima/tests/ima_setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/kernel/security/integrity/ima/tests/ima_setup.sh b/testcases/kernel/security/integrity/ima/tests/ima_setup.sh
index 055701aff..df3fc5603 100644
--- a/testcases/kernel/security/integrity/ima/tests/ima_setup.sh
+++ b/testcases/kernel/security/integrity/ima/tests/ima_setup.sh
@@ -337,7 +337,7 @@ require_evmctl()
# 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_MOUNT_DEVICE" ]; then
+if tst_supported_fs -d $TMPDIR -s "tmpfs"; then
unset TST_MOUNT_DEVICE
fi
--
2.37.3
More information about the ltp
mailing list