From 3dfb0e94670ebea5ab05bcf049b66c88e4601db8 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 29 Dec 2008 17:08:38 +0100 Subject: 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. --- source3/torture/torture.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'source3/torture/torture.c') 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; } -- cgit