From b914aa25ee1fe3e0bd97f58bdf2bfdd185992a79 Mon Sep 17 00:00:00 2001 From: Xiao Ni Date: Wed, 22 May 2024 16:50:56 +0800 Subject: 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 Signed-off-by: Mariusz Tkaczyk --- tests/func.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests') 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 -- cgit v1.2.3