!61 tests: add warning for selinux in m_rootdir_acl

From: @hifi521 
Reviewed-by: @liuzhiqiang26 
Signed-off-by: @liuzhiqiang26
This commit is contained in:
openeuler-ci-bot 2022-03-17 16:01:08 +00:00 committed by Gitee
commit c3fdcdde9b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 35 additions and 1 deletions

View File

@ -0,0 +1,30 @@
From e71489b24a49899ca016068cbe39ad0576c52eb5 Mon Sep 17 00:00:00 2001
From: zhanchengbin <zhanchengbin1@huawei.com>
Date: Thu, 17 Mar 2022 10:53:18 +0800
Subject: [PATCH] tests: skip m_rootdir_acl if selinux is not disabled
Signed-off-by: zhanchengbin <zhanchengbin1@huawei.com>
---
tests/m_rootdir_acl/script | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tests/m_rootdir_acl/script b/tests/m_rootdir_acl/script
index e81c82c..6b78d3d 100644
--- a/tests/m_rootdir_acl/script
+++ b/tests/m_rootdir_acl/script
@@ -16,6 +16,12 @@ if [ "$os" = "GNU" ]; then
return 0
fi
+selinux=`grep -nRE "^SELINUX=" /etc/selinux/config | awk -F "=" '{print $2}'`
+if [ $selinux != "disabled" ]; then
+ echo "$test_name: $test_description: skipped (selinux is not disabled)"
+ return 0
+fi
+
MKFS_DIR=$TMPFILE.dir
OUT=$test_name.log
EXP=$test_dir/expect
--
1.8.3.1

View File

@ -1,6 +1,6 @@
Name: e2fsprogs Name: e2fsprogs
Version: 1.46.4 Version: 1.46.4
Release: 6 Release: 7
Summary: Second extended file system management tools Summary: Second extended file system management tools
License: GPLv2+ and LGPLv2 and MIT License: GPLv2+ and LGPLv2 and MIT
URL: http://e2fsprogs.sourceforge.net/ URL: http://e2fsprogs.sourceforge.net/
@ -17,6 +17,7 @@ Patch8: 0008-e2fsck-add-env-param-E2FS_UNRELIABLE_IO-to-fi.patch
Patch9: 0009-e2mmpstatus.8.in-detele-filesystem-can-be-UUID-or-LA.patch Patch9: 0009-e2mmpstatus.8.in-detele-filesystem-can-be-UUID-or-LA.patch
Patch10: 0010-tests-update-expect-file-for-u_direct_io.patch Patch10: 0010-tests-update-expect-file-for-u_direct_io.patch
Patch11: 0011-libext2fs-don-t-old-the-CACHE_MTX-while-doing-I-O.patch Patch11: 0011-libext2fs-don-t-old-the-CACHE_MTX-while-doing-I-O.patch
Patch12: 0012-tests-skip-m_rootdir_acl-if-selinux-is-not-disabled.patch
BuildRequires: gcc pkgconfig texinfo BuildRequires: gcc pkgconfig texinfo
@ -139,6 +140,9 @@ exit 0
%{_mandir}/man8/* %{_mandir}/man8/*
%changelog %changelog
* Thu Feb 17 2022 zhanchengbin <zhanchengbin1@huawei.com> - 1.46.4-7
- tests: skip m_rootdir_acl if selinux is not disabled
* Wed Feb 9 2022 zhanchengbin <zhanchengbin1@huawei.com> - 1.46.4-6 * Wed Feb 9 2022 zhanchengbin <zhanchengbin1@huawei.com> - 1.46.4-6
- libext2fs: don't old the CACHE_MTX while doing I/O - libext2fs: don't old the CACHE_MTX while doing I/O