summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-12-29 17:08:38 +0100
committerVolker Lendecke <vl@samba.org>2008-12-29 17:15:43 +0100
commit3dfb0e94670ebea5ab05bcf049b66c88e4601db8 (patch)
treea2ae3e72581e981b122e727ad1d45672b10ee242
parente36d64728f79087610737fa54eee69af3ab99c5b (diff)
downloadsamba-3dfb0e94670ebea5ab05bcf049b66c88e4601db8.tar.gz
samba-3dfb0e94670ebea5ab05bcf049b66c88e4601db8.tar.bz2
samba-3dfb0e94670ebea5ab05bcf049b66c88e4601db8.zip
Fix SESSSETUP_BENCH torture test for long runtimes
deadtime hits without any files open. To enable long runtimes, open a file with delete_on_close set.
-rw-r--r--source3/torture/torture.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 6bf7aa8e25..b5c1ac903e 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -4839,18 +4839,21 @@ static bool run_error_map_extract(int dummy) {
static bool run_sesssetup_bench(int dummy)
{
static struct cli_state *c;
+ const char *fname = "\\file.dat";
+ int fnum;
NTSTATUS status;
int i;
- if (!(c = open_nbt_connection())) {
+ if (!torture_open_connection(&c, 0)) {
return false;
}
- status = cli_negprot(c);
- if (!NT_STATUS_IS_OK(status)) {
- printf("%s rejected the NT-error negprot (%s)\n", host,
- nt_errstr(status));
- cli_shutdown(c);
+ fnum = cli_nt_create_full(
+ c, fname, 0, GENERIC_ALL_ACCESS|DELETE_ACCESS,
+ FILE_ATTRIBUTE_NORMAL, 0, FILE_OVERWRITE_IF,
+ FILE_DELETE_ON_CLOSE, 0);
+ if (fnum == -1) {
+ d_printf("open %s failed: %s\n", fname, cli_errstr(c));
return false;
}