[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-469-g3b05702

Volker Lendecke vl at sernet.de
Wed Dec 5 09:14:17 GMT 2007


The branch, v3-2-test has been updated
       via  3b057022a570a1fb68e03c477a6989e7d1e7cef2 (commit)
      from  905943137c2dafca4dc946f9b1f133fc5542eb37 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit 3b057022a570a1fb68e03c477a6989e7d1e7cef2
Author: Volker Lendecke <vl at sernet.de>
Date:   Tue Dec 4 11:38:57 2007 +0100

    add SESSSETUP_BENCH

-----------------------------------------------------------------------

Summary of changes:
 source/torture/torture.c |   41 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 41 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/torture/torture.c b/source/torture/torture.c
index 1aea614..48b7aa6 100644
--- a/source/torture/torture.c
+++ b/source/torture/torture.c
@@ -4780,6 +4780,46 @@ static bool run_error_map_extract(int dummy) {
 	return True;
 }
 
+static bool run_sesssetup_bench(int dummy)
+{
+	static struct cli_state *c;
+	NTSTATUS status;
+	int i;
+
+	if (!(c = open_nbt_connection())) {
+		return false;
+	}
+
+	if (!cli_negprot(c)) {
+		printf("%s rejected the NT-error negprot (%s)\n", host,
+		       cli_errstr(c));
+		cli_shutdown(c);
+		return false;
+	}
+
+	for (i=0; i<torture_numops; i++) {
+		status = cli_session_setup(
+			c, username,
+			password, strlen(password),
+			password, strlen(password),
+			workgroup);
+		if (!NT_STATUS_IS_OK(status)) {
+			d_printf("(%s) cli_session_setup failed: %s\n",
+				 __location__, nt_errstr(status));
+			return false;
+		}
+
+		if (!cli_ulogoff(c)) {
+			d_printf("(%s) cli_ulogoff failed: %s\n",
+				 __location__, cli_errstr(c));
+			return false;
+		}
+		c->vuid = 0;
+	}
+
+	return true;
+}
+
 static bool subst_test(const char *str, const char *user, const char *domain,
 		       uid_t uid, gid_t gid, const char *expected)
 {
@@ -5070,6 +5110,7 @@ static struct {
 	{"CHKPATH",  torture_chkpath_test, 0},
 	{"FDSESS", run_fdsesstest, 0},
 	{ "EATEST", run_eatest, 0},
+	{ "SESSSETUP_BENCH", run_sesssetup_bench, 0},
 	{ "LOCAL-SUBSTITUTE", run_local_substitute, 0},
 	{ "LOCAL-GENCACHE", run_local_gencache, 0},
 	{NULL, NULL, 0}};


-- 
Samba Shared Repository


More information about the samba-cvs mailing list