summaryrefslogtreecommitdiffstats
path: root/tests/func.sh
diff options
context:
space:
mode:
authorXiao Ni <xni@redhat.com>2024-05-22 10:50:56 +0200
committerMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>2024-05-24 10:44:03 +0200
commitb914aa25ee1fe3e0bd97f58bdf2bfdd185992a79 (patch)
treeeac6296473d84690699ad6b90a56f3b5f0b53300 /tests/func.sh
parentmdadm/tests: 07changelevelintr (diff)
downloadmdadm-b914aa25ee1fe3e0bd97f58bdf2bfdd185992a79.tar.xz
mdadm-b914aa25ee1fe3e0bd97f58bdf2bfdd185992a79.zip
mdadm/tests: disable selinux
Sometimes systemd service fails because selinux. Disable selinux during testing now. We can enable it in future when having a better method. Signed-off-by: Xiao Ni <xni@redhat.com> Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Diffstat (limited to 'tests/func.sh')
-rw-r--r--tests/func.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/func.sh b/tests/func.sh
index db55542d..b2e4d122 100644
--- a/tests/func.sh
+++ b/tests/func.sh
@@ -167,6 +167,15 @@ is_raid_foreign() {
fi
}
+record_selinux() {
+ sys_selinux=`getenforce`
+ setenforce Permissive
+}
+
+restore_selinux() {
+ setenforce $sys_selinux
+}
+
do_setup() {
trap cleanup 0 1 3 15
trap ctrl_c 2
@@ -247,6 +256,7 @@ do_setup() {
echo 0 > /sys/module/md_mod/parameters/start_ro
record_system_speed_limit
is_raid_foreign
+ record_selinux
}
# check various things