CI: add samba-no-opath
authorRalph Boehme <slow@samba.org>
Mon, 22 Jun 2020 11:32:45 +0000 (13:32 +0200)
committerRalph Boehme <slow@samba.org>
Wed, 16 Dec 2020 09:08:30 +0000 (09:08 +0000)
Add a job that builds with O_PATH undefined.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
.gitlab-ci.yml
lib/replace/system/filesys.h
script/autobuild.py
selftest/skip.opath-required [new file with mode: 0644]
selftest/wscript

index 7a7582cb6dbeac403f6c17874b95a3fe2d0a1863..eafd454d44584ee63c22d45606db99cada97e85d 100644 (file)
@@ -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}
index 976b2aeec5ea3656e6ed0611ff51e77e7732bb14..034e5d5886cb8e1300ad968337383348f5dde1cb 100644 (file)
 #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
index a76309df8a203f0aa525c506114169f9c9368117..00ba8d727b0e436ee5b5486ee4d5acfa657c4a52 100755 (executable)
@@ -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 (file)
index 0000000..0faf0c4
--- /dev/null
@@ -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.*
index b057702b756e685698600d1b0be5e88aec73ec2c..60297045078919bb191aec8318f48427694b6128 100644 (file)
@@ -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(