selinux-testsuite: only add the infiniband tests to SUBDIRS if they are enabled
PATCH 1/1 selinux-testsuite: only add the infiniband tests to SUBDIRS if they are enabled
From: Paul Moore <[email protected]>
It was difficult to tell if the InfiniBand tests were actually being run as they were always added to SUBDIRS regardless of the configuration; this patch should make this more obvious.
It is worth nothing that most of the changes to the tests themselves are simply due to reformatting (./tools/check-syntax -f) due to the removal of the enabled check.
Signed-off-by Paul Moore <[email protected]>
--- tests/Makefile | 11 +++- tests/infiniband_endport/test | 52 ++++++++--------- tests/infiniband_pkey/Makefile | 9 --- tests/infiniband_pkey/test | 121 ++++++++++++++++++---------------------- 4 files changed, 90 insertions(+), 103 deletions(-)
tests/Makefile +9 -2
@@ -10,8 +10,7 @@ SUBDIRS:= domain_trans entrypoint execshare exectrace execute_no_trans \ task_setnice task_setscheduler task_getscheduler task_getsid \ task_getpgid task_setpgid file ioctl capable_file capable_net \ capable_sys dyntrans dyntrace bounds nnp_nosuid mmap unix_socket \ - inet_socket overlay checkreqprot mqueue mac_admin infiniband_pkey \ - infiniband_endport atsecure + inet_socket overlay checkreqprot mqueue mac_admin atsecure ifeq ($(shell grep -q cap_userns $(POLDEV)/include/support/all_perms.spt && echo true),true) ifneq ($(shell ./kvercmp $$(uname -r) 4.7),-1)
@@ -31,6 +30,14 @@ ifeq ($(shell grep -q getrlimit $(POLDEV)/include/support/all_perms.spt && echo SUBDIRS += prlimit endif +ifeq ($(shell grep "^SELINUX_INFINIBAND_ENDPORT_TEST=" infiniband_endport/ibendport_test.conf | cut -d'=' -f 2),1) +SUBDIRS += infiniband_endport +endif + +ifeq ($(shell grep "^SELINUX_INFINIBAND_PKEY_TEST=" infiniband_pkey/ibpkey_test.conf | cut -d'=' -f 2),1) +SUBDIRS += infiniband_pkey +endif + ifeq ($(DISTRO),RHEL4) SUBDIRS:=$(filter-out bounds dyntrace dyntrans inet_socket mmap nnp_nosuid overlay unix_socket, $(SUBDIRS)) endif
tests/infiniband_endport/test +25 -27
71 lines not on this page · raw message
tests/infiniband_pkey/Makefile +1 -8
@@ -2,14 +2,7 @@ TARGETS=create_modify_qp LDLIBS+= -libverbs -RESULT=$(shell grep "SELINUX_INFINIBAND_PKEY_TEST=0" ./ibpkey_test.conf) - -ifeq ($(RESULT), ) - all: $(TARGETS) -else - all: - @echo "Infiniband test disabled" -endif +all: $(TARGETS) clean: rm -f $(TARGETS)
tests/infiniband_pkey/test +55 -66
148 lines not on this page · raw message