summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2020-06-22 13:32:45 +0200
committerRalph Boehme <slow@samba.org>2020-12-16 09:08:30 +0000
commit436903afe2aaf6e3afe794c9ebe22081a55b9bb3 (patch)
tree7a0b3d37f4fc9949508541705190efb800cd2265
parent7a077f152aa3e1e09b4228ae24780fa613540a68 (diff)
downloadsamba-436903afe2aaf6e3afe794c9ebe22081a55b9bb3.tar.gz
CI: add samba-no-opath
Add a job that builds with O_PATH undefined. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r--.gitlab-ci.yml3
-rw-r--r--lib/replace/system/filesys.h4
-rwxr-xr-xscript/autobuild.py21
-rw-r--r--selftest/skip.opath-required9
-rw-r--r--selftest/wscript3
5 files changed, 40 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7a7582cb6db..eafd454d445 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -226,6 +226,9 @@ samba-schemaupgrade:
samba-ad-dc-1-mitkrb5:
extends: .private_template
+samba-no-opath:
+ extends: .private_template
+
# 'pages' is a special job which can publish artifacts in `public` dir to gitlab pages
pages:
image: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-${SAMBA_CI_CONTAINER_IMAGE}:${SAMBA_CI_CONTAINER_TAG}
diff --git a/lib/replace/system/filesys.h b/lib/replace/system/filesys.h
index 976b2aeec5e..034e5d5886c 100644
--- a/lib/replace/system/filesys.h
+++ b/lib/replace/system/filesys.h
@@ -199,6 +199,10 @@
#define mkdir(d,m) _mkdir(d)
#endif
+#ifdef DISABLE_OPATH
+#undef O_PATH
+#endif
+
/*
this allows us to use a uniform error handling for our xattr
wrappers
diff --git a/script/autobuild.py b/script/autobuild.py
index a76309df8a2..00ba8d727b0 100755
--- a/script/autobuild.py
+++ b/script/autobuild.py
@@ -375,6 +375,27 @@ tasks = {
("check-clean-tree", "script/clean-source-tree.sh"),
],
+ "samba-no-opath": [
+ ("random-sleep", random_sleep(300, 900)),
+ ("configure", "ADDITIONAL_CFLAGS='-DDISABLE_OPATH=1' ./configure.developer --without-ad-dc --with-selftest-prefix=./bin/ab" + samba_configure_params),
+ ("make", "make -j"),
+ ("test", make_test(
+ cmd="make test DISABLE_OPATH=1",
+ include_envs=[
+ "nt4_dc",
+ "nt4_dc_smb1",
+ "nt4_dc_smb1_done",
+ "nt4_dc_schannel",
+ "nt4_member",
+ "simpleserver",
+ "fileserver",
+ "fileserver_smb1",
+ "fileserver_smb1_done",
+ ])),
+ ("lcov", LCOV_CMD),
+ ("check-clean-tree", "script/clean-source-tree.sh"),
+ ],
+
"samba-ad-dc-1": [
("random-sleep", random_sleep(1, 1)),
("configure", "./configure.developer --with-selftest-prefix=./bin/ab" + samba_configure_params),
diff --git a/selftest/skip.opath-required b/selftest/skip.opath-required
new file mode 100644
index 00000000000..0faf0c4bd6c
--- /dev/null
+++ b/selftest/skip.opath-required
@@ -0,0 +1,9 @@
+# Opening O_RDONLY screws kernel oplocks which is not a problem
+# as only Linux has kernel oplocks and as Linux has O_PATH, we
+# don't need O_RDONLY in the first place.
+^samba3.smb2.kernel-oplocks.*
+^samba3.smbtorture_s3.plain.OPLOCK5.*
+#
+# These fail because become_root() doesn't work in make test
+^samba3.blackbox.dropbox.*
+^samba3.raw.samba3hide.*
diff --git a/selftest/wscript b/selftest/wscript
index b057702b756..60297045078 100644
--- a/selftest/wscript
+++ b/selftest/wscript
@@ -271,6 +271,9 @@ def cmd_testonly(opt):
# GSS_KRB5_CRED_NO_CI_FLAGS_X
env.OPTIONS += " --exclude=${srcdir}/selftest/skip.no-GSS_KRB5_CRED_NO_CI_FLAGS_X"
+ if os.environ.get('DISABLE_OPATH'):
+ env.OPTIONS += " --exclude=${srcdir}/selftest/skip.opath-required"
+
if env.ADDRESS_SANITIZER:
# We try to find the correct libasan automatically
libasan = Utils.cmd_output(