From: Ralph Boehme Date: Tue, 15 Dec 2020 06:20:55 +0000 (+0100) Subject: CI: skip kernel-oplocks tests on older kernels X-Git-Tag: samba-4.14.0rc1~422 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=703c18980348add3414f7bb27f3b9c770f5bed6e;p=thirdparty%2Fsamba.git CI: skip kernel-oplocks tests on older kernels The kernel of the gitlab shared runners container host has a bug in the interaction between kernel oplocks and O_PATH opens which was fixed by 387e3746d01c34457d6a73688acd90428725070b in 5.3.1: Don't actually start the OPLOCK5 test is kernel oplocks are not available, instead of relying on the #ifdef HAVE_KERNEL_OPLOCKS_LINUX magic in torture.c. Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py index dd6f2a9010a..71a79e9c73e 100755 --- a/source3/selftest/tests.py +++ b/source3/selftest/tests.py @@ -20,6 +20,7 @@ import os import sys +import re sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), "../../selftest"))) import selftesthelpers from selftesthelpers import bindir, srcdir, scriptdir, binpath @@ -46,6 +47,15 @@ def plansmbtorture4testsuite(name, env, options, description=''): selftesthelpers.plansmbtorture4testsuite( name, env, options, target='samba3', modname=modname) +def compare_versions(version1, version2): + for i in range(max(len(version1),len(version2))): + v1 = version1[i] if i < len(version1) else 0 + v2 = version2[i] if i < len(version2) else 0 + if v1 > v2: + return 1 + elif v1 = 0: + have_linux_kernel_oplocks = True + have_inotify = ("HAVE_INOTIFY" in config_hash) have_ldwrap = ("HAVE_LDWRAP" in config_hash) with_pthreadpool = ("WITH_PTHREADPOOL" in config_hash)