e2fsprogs/0012-tests-add-warning-for-selinux-in-m_rootdir_acl.patch
zhanchengbin 1a14e10376 tests: add warning for selinux in m_rootdir_acl
Signed-off-by: zhanchengbin <zhanchengbin1@huawei.com>
2022-03-16 20:07:46 +08:00

29 lines
931 B
Diff

From 012560701c876c5630d5d8f17c25227b91037d0e Mon Sep 17 00:00:00 2001
From: zhanchengbin <zhanchengbin1@huawei.com>
Date: Wed, 16 Mar 2022 14:56:20 +0800
Subject: [PATCH] tests: add warning for selinux in m_rootdir_acl
Signed-off-by: zhanchengbin <zhanchengbin1@huawei.com>
---
tests/m_rootdir_acl/script | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/m_rootdir_acl/script b/tests/m_rootdir_acl/script
index e81c82c..8a52543 100644
--- a/tests/m_rootdir_acl/script
+++ b/tests/m_rootdir_acl/script
@@ -99,6 +99,10 @@ if [ "$status" = 0 ] ; then
else
echo "$test_name: $test_description: failed"
diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ selinux=`grep -nRE "^SELINUX=" /etc/selinux/config | awk -F "=" '{print $2}'`
+ if [ $selinux != "disabled" ] ; then
+ echo "m_rootdir_acl: selinux is $selinux, please disable it and try again."
+ fi
fi
rm -rf $TMPFILE.cmd $MKFS_DIR
--
1.8.3.1