[SCM] Samba Shared Repository - branch v4-14-test updated
Jule Anger
janger at samba.org
Sun Feb 27 17:49:01 UTC 2022
The branch, v4-14-test has been updated
via 992a41e5e74 waf: re-add missing readlink test
via 26911b1489d readlink test: inverse return code
from 3d90f070894 s3:modules: Fix virusfilter_vfs_openat
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-14-test
- Log -----------------------------------------------------------------
commit 992a41e5e74debc957105d2b50c6172ce93846a0
Author: Björn Jacke <bj at sernet.de>
Date: Wed Dec 26 01:03:29 2018 +0100
waf: re-add missing readlink test
this was another portability regression that came with the moving to waf
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13631
Signed-off-by: Bjoern Jacke <bj at sernet.de>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Fri Feb 18 23:12:51 UTC 2022 on sn-devel-184
(cherry picked from commit 45cb14ac80889ac913f7f76dbfaebcb4d5ee14fd)
Autobuild-User(v4-14-test): Jule Anger <janger at samba.org>
Autobuild-Date(v4-14-test): Sun Feb 27 17:48:46 UTC 2022 on sn-devel-184
commit 26911b1489d6f6b73bfa60ac19d0c0cc4aedb745
Author: Björn Jacke <bj at sernet.de>
Date: Wed Dec 26 01:01:14 2018 +0100
readlink test: inverse return code
We need to return 0 in case readlink is *broken* here - this is because our waf
CHECK_CODE function does only allow generating defines in case the test succeeds
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13631
Signed-off-by: Bjoern Jacke <bj at sernet.de>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit e225ab70db0cc01454d319eaca5265d7e33f396c)
-----------------------------------------------------------------------
Summary of changes:
source3/wscript | 6 ++++++
tests/readlink.c | 11 +++++++----
2 files changed, 13 insertions(+), 4 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/wscript b/source3/wscript
index adc31ce57b8..c94f78c6a06 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -1406,6 +1406,12 @@ main() {
addmain=False,
execute=True)
+ conf.CHECK_CODE('''#include "../tests/readlink.c"''',
+ 'HAVE_BROKEN_READLINK',
+ msg='Checking for readlink breakage',
+ addmain=False,
+ execute=True)
+
conf.SET_TARGET_TYPE('sendfile', 'EMPTY')
conf.CHECK_LIB('sendfile')
if not Options.options.with_sendfile_support == False:
diff --git a/tests/readlink.c b/tests/readlink.c
index 65311c2ff79..a09eba4af2b 100644
--- a/tests/readlink.c
+++ b/tests/readlink.c
@@ -1,4 +1,7 @@
-/* test whether readlink returns a short buffer correctly. */
+/* test whether readlink returns a short buffer incorrectly.
+ We need to return 0 in case readlink is *broken* here - this is because our waf
+ CHECK_CODE function does only allow generating defines in case the test succeeds
+*/
#if defined(HAVE_UNISTD_H)
#include <unistd.h>
@@ -20,14 +23,14 @@ int main(void)
unlink(FNAME);
ret = symlink(DATA, FNAME);
if (ret == -1) {
- exit(1);
+ exit(0);
}
rl_ret = readlink(FNAME, buf, sizeof(buf));
if (rl_ret == -1) {
unlink(FNAME);
- exit(1);
+ exit(0);
}
unlink(FNAME);
- exit(0);
+ exit(1);
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list