1 Star 0 Fork 19

Linux_zhang/libsemanage

forked from src-openEuler/libsemanage 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
fix-test-failure-with-secilc.patch 2.36 KB
一键复制 编辑 原始数据 按行查看 历史
hugel 提交于 2021-05-22 18:18 +08:00 . enabel make test
From b4dff18c54fd666100d10581ce9215c8d5cbde93 Mon Sep 17 00:00:00 2001
From: gengqihu <gengqihu1@huawei.com>
Date: Tue, 11 May 2021 04:28:37 -0400
Subject: [PATCH] fix test failure with secilc
There's no secilc here. The SELinux CIL Compiler is a compiler that
converts the CIL language as described on the CIL design wiki into a
kernel binary policy file.
This patch deletes the testcode related to secilc.
---
tests/Makefile | 12 ++++++------
tests/libsemanage-tests.c | 16 ----------------
2 files changed, 6 insertions(+), 22 deletions(-)
diff --git a/tests/Makefile b/tests/Makefile
index 69f49a3..c98dae0 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,6 +1,5 @@
# Add your test source files here:
-SOURCES = $(sort $(wildcard *.c))
-CILS = $(sort $(wildcard *.cil))
+SOURCES = $(sort $(wildcard libsemanage-tests.c test_other.c test_semanage_store.c test_utilities.c utilities.c))
###########################################################################
@@ -10,18 +9,14 @@ override CFLAGS += -I../src -I../include
override LDLIBS += -lcunit -lbz2 -laudit -lselinux -lsepol
OBJECTS = $(SOURCES:.c=.o)
-POLICIES = $(CILS:.cil=.policy)
-all: $(EXECUTABLE) $(POLICIES)
+all: $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS) ../src/libsemanage.a
$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
-
-%.policy: %.cil
- ../../secilc/secilc $*.cil -o $*.policy -f /dev/null
clean distclean:
- rm -rf $(OBJECTS) $(POLICIES) $(EXECUTABLE)
+ rm -rf $(OBJECTS) $(EXECUTABLE)
test: all
./$(EXECUTABLE)
diff --git a/tests/libsemanage-tests.c b/tests/libsemanage-tests.c
index 2ae4a21..df2d5b2 100644
--- a/tests/libsemanage-tests.c
+++ b/tests/libsemanage-tests.c
@@ -21,14 +21,6 @@
#include "test_semanage_store.h"
#include "test_utilities.h"
-#include "test_handle.h"
-#include "test_bool.h"
-#include "test_fcontext.h"
-#include "test_iface.h"
-#include "test_ibendport.h"
-#include "test_node.h"
-#include "test_port.h"
-#include "test_user.h"
#include "test_other.h"
#include <CUnit/Basic.h>
@@ -68,14 +60,6 @@ static bool do_tests(int interactive, int verbose)
DECLARE_SUITE(semanage_store);
DECLARE_SUITE(semanage_utilities);
- DECLARE_SUITE(handle);
- DECLARE_SUITE(bool);
- DECLARE_SUITE(fcontext);
- DECLARE_SUITE(iface);
- DECLARE_SUITE(ibendport);
- DECLARE_SUITE(node);
- DECLARE_SUITE(port);
- DECLARE_SUITE(user);
DECLARE_SUITE(other);
if (verbose)
--
2.19.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/Linux_zhang2024/libsemanage.git
git@gitee.com:Linux_zhang2024/libsemanage.git
Linux_zhang2024
libsemanage
libsemanage
master

搜索帮助