[SCM] Samba Shared Repository - branch master updated
Michael Adam
obnox at samba.org
Mon Aug 18 09:42:04 MDT 2014
The branch, master has been updated
via 335171e s4:torture: use torture_assert instead of torture_comment and return in defer_open test
via 2afacf9 build: fix configure to honour --without-dmapi
from 4f58041 tdbtorture: print details when run with -n 1
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 335171ef075fd6b66bda807841a6e275e65dabea
Author: Michael Adam <obnox at samba.org>
Date: Mon Aug 18 15:10:15 2014 +0200
s4:torture: use torture_assert instead of torture_comment and return in defer_open test
The fix missed one instance, as autobuild has just told me...
Signed-off-by: Michael Adam <obnox at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
Autobuild-User(master): Michael Adam <obnox at samba.org>
Autobuild-Date(master): Mon Aug 18 17:42:00 CEST 2014 on sn-devel-104
commit 2afacf940f21759c08bcc4a6e906428595966a19
Author: Michael Adam <obnox at samba.org>
Date: Mon Aug 18 11:42:27 2014 +0200
build: fix configure to honour --without-dmapi
Previously, --without-dmapi would still autodetect and link a useable dmapi
library. This change allows to build without dmapi support even when a dmapi
library is found.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10369
Pair-Programmed-With: Stefan Metzmacher <metze at samba.org>
Signed-off-by: Michael Adam <obnox at samba.org>
Signed-off-by: Stefan Metzmacher <metze at samba.org>
-----------------------------------------------------------------------
Summary of changes:
source3/wscript | 72 +++++++++++++++++++++++++----------------
source4/torture/basic/base.c | 16 ++++++---
2 files changed, 55 insertions(+), 33 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/wscript b/source3/wscript
index 18c3c7d..bcf14f8 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -206,27 +206,32 @@ main() {
conf.fatal('libarchive support requested, but no suitable pkgconfig found')
# check for DMAPI libs
- Logs.info("Checking for DMAPI library existence")
- conf.env['dmapi_lib'] = ''
- samba_dmapi_lib = ''
- if conf.CHECK_FUNCS_IN('dm_get_eventlist', 'dm'):
- samba_dmapi_lib = 'dm'
+ if Options.options.with_dmapi == False:
+ have_dmapi = False
else:
- if conf.CHECK_FUNCS_IN('dm_get_eventlist', 'jfsdm'):
- samba_dmapi_lib = 'jfsdm'
+ have_dmapi = True
+ Logs.info("Checking for DMAPI library existence")
+ samba_dmapi_lib = ''
+ if conf.CHECK_FUNCS_IN('dm_get_eventlist', 'dm'):
+ samba_dmapi_lib = 'dm'
else:
- if conf.CHECK_FUNCS_IN('dm_get_eventlist', 'dmapi'):
- samba_dmapi_lib = 'dmapi'
+ if conf.CHECK_FUNCS_IN('dm_get_eventlist', 'jfsdm'):
+ samba_dmapi_lib = 'jfsdm'
else:
- if conf.CHECK_FUNCS_IN('dm_get_eventlist', 'xdsm'):
- samba_dmapi_lib = 'xdsm'
- # only bother to test headers and compilation when a candidate
- # library has been found
- if Options.options.with_dmapi == True and samba_dmapi_lib == '':
- conf.fatal('DMAPI support requested, but no suitable DMAPI library found')
- else:
- conf.CHECK_HEADERS('sys/dmi.h xfs/dmapi.h sys/jfsdmapi.h sys/dmapi.h dmapi.h')
- conf.CHECK_CODE('''
+ if conf.CHECK_FUNCS_IN('dm_get_eventlist', 'dmapi'):
+ samba_dmapi_lib = 'dmapi'
+ else:
+ if conf.CHECK_FUNCS_IN('dm_get_eventlist', 'xdsm'):
+ samba_dmapi_lib = 'xdsm'
+ # only bother to test headers and compilation when a candidate
+ # library has been found
+ if samba_dmapi_lib == '':
+ have_dmapi = False
+ broken_dmapi = "no suitable DMAPI library found"
+
+ if have_dmapi:
+ conf.CHECK_HEADERS('sys/dmi.h xfs/dmapi.h sys/jfsdmapi.h sys/dmapi.h dmapi.h')
+ conf.CHECK_CODE('''
#include <time.h> /* needed by Tru64 */
#include <sys/types.h> /* needed by AIX */
#ifdef HAVE_XFS_DMAPI_H
@@ -256,17 +261,28 @@ int main(int argc, char **argv)
return 0;
}
''',
- 'USE_DMAPI',
- addmain=False,
- execute=False,
- lib=samba_dmapi_lib,
- msg='Checking whether DMAPI lib '+samba_dmapi_lib+' can be used')
-
- if conf.CONFIG_SET('USE_DMAPI'):
- conf.env['dmapi_lib'] = samba_dmapi_lib
+ 'USEABLE_DMAPI_LIBRARY',
+ addmain=False,
+ execute=False,
+ lib=samba_dmapi_lib,
+ msg='Checking whether DMAPI lib '+samba_dmapi_lib+' can be used')
+ if not conf.CONFIG_SET('USEABLE_DMAPI_LIBRARY'):
+ have_dmapi = False
+ broken_dmapi = "no usable DMAPI library found"
+
+ if have_dmapi:
+ Logs.info("Building with DMAPI support.")
+ conf.env['dmapi_lib'] = samba_dmapi_lib
+ conf.DEFINE('USE_DMAPI', 1)
+ else:
+ if Options.options.with_dmapi == False:
+ Logs.info("Building without DMAPI support (--without-dmapi).")
+ elif Options.options.with_dmapi == True:
+ Logs.error("DMAPI support not available: " + broken_dmapi)
+ conf.fatal('DMAPI support requested but not found.');
else:
- if Options.options.with_dmapi == True:
- conf.fatal('DMAPI support requested but not found');
+ Logs.warn("Building without DMAPI support: " + broken_dmapi)
+ conf.env['dmapi_lib'] = ''
# Check for various members of the stat structure
conf.CHECK_STRUCTURE_MEMBER('struct stat', 'st_blocks', define='HAVE_STAT_ST_BLOCKS',
diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c
index 1d04b35..3789081 100644
--- a/source4/torture/basic/base.c
+++ b/source4/torture/basic/base.c
@@ -654,6 +654,7 @@ static bool run_deferopen(struct torture_context *tctx, struct smbcli_state *cli
int nsec;
int msec;
double sec;
+ NTSTATUS status;
nsec = torture_setting_int(tctx, "sharedelay", 1000000);
msec = nsec / 1000;
@@ -696,10 +697,15 @@ static bool run_deferopen(struct torture_context *tctx, struct smbcli_state *cli
smb_msleep(10 * msec);
i++;
- if (NT_STATUS_IS_ERR(smbcli_close(cli->tree, fnum))) {
- torture_comment(tctx,"Failed to close %s, error=%s\n", fname, smbcli_errstr(cli->tree));
- return false;
- }
+
+ status = smbcli_close(cli->tree, fnum);
+ torture_assert(tctx, !NT_STATUS_IS_ERR(status),
+ talloc_asprintf(tctx,
+ "pid %u: Failed to close %s, "
+ "error=%s\n",
+ (unsigned)getpid(), fname,
+ smbcli_errstr(cli->tree)));
+
smb_msleep(2 * msec);
}
@@ -707,7 +713,7 @@ static bool run_deferopen(struct torture_context *tctx, struct smbcli_state *cli
/* All until the last unlink will fail with sharing violation
but also the last request can fail since the file could have
been successfully deleted by another (test) process */
- NTSTATUS status = smbcli_nt_error(cli->tree);
+ status = smbcli_nt_error(cli->tree);
if ((!NT_STATUS_EQUAL(status, NT_STATUS_SHARING_VIOLATION))
&& (!NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_NOT_FOUND))) {
torture_result(tctx, TORTURE_FAIL, "unlink of %s failed (%s)\n", fname, smbcli_errstr(cli->tree));
--
Samba Shared Repository
More information about the samba-cvs
mailing list