[PATCH testsuite] tests/Makefile: add kernel version check for watchkey

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The corresponding header files might be available even when the running
kernel doesn't support the tested functionality, so add a kernel version
check for this test (key notifications were introduced in kernel 5.8).

Fixes: 34b7da22ef88 ("selinux-testsuite: Add check for key changes on watch_queue")
Signed-off-by: Ondrej Mosnacek <omosnace@xxxxxxxxxx>
---
 tests/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/Makefile b/tests/Makefile
index 919335b..001639b 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -124,8 +124,10 @@ endif
 endif
 
 ifeq ($(shell grep -q all_key_perms $(POLDEV)/include/support/all_perms.spt && test -e $(INCLUDEDIR)/linux/watch_queue.h && grep -qs KEYCTL_WATCH_KEY $(INCLUDEDIR)/linux/keyctl.h && echo true),true)
+ifneq ($(shell ./kvercmp $$(uname -r) 5.8),-1)
 SUBDIRS += watchkey
 endif
+endif
 
 ifeq ($(DISTRO),RHEL4)
     SUBDIRS:=$(filter-out bounds dyntrace dyntrans inet_socket mmap nnp_nosuid overlay unix_socket, $(SUBDIRS))
-- 
2.26.2




[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux