From: Ralph Boehme Date: Mon, 22 Jun 2020 11:32:45 +0000 (+0200) Subject: CI: add samba-no-opath X-Git-Tag: samba-4.14.0rc1~423 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=436903afe2aaf6e3afe794c9ebe22081a55b9bb3;p=thirdparty%2Fsamba.git CI: add samba-no-opath Add a job that builds with O_PATH undefined. Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- 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(