svn commit: samba r25282 - in branches/SAMBA_4_0/source/torture/winbind: .

metze at samba.org metze at samba.org
Fri Sep 21 11:30:50 GMT 2007


Author: metze
Date: 2007-09-21 11:30:44 +0000 (Fri, 21 Sep 2007)
New Revision: 25282

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25282

Log:
add WINBIND-STRUCT-INTERFACE_VERSION test

metze
Modified:
   branches/SAMBA_4_0/source/torture/winbind/struct_based.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/winbind/struct_based.c
===================================================================
--- branches/SAMBA_4_0/source/torture/winbind/struct_based.c	2007-09-21 10:46:09 UTC (rev 25281)
+++ branches/SAMBA_4_0/source/torture/winbind/struct_based.c	2007-09-21 11:30:44 UTC (rev 25282)
@@ -55,6 +55,26 @@
 	DO_STRUCT_REQ_REP_EXT(op,req,rep,NSS_STATUS_SUCCESS,true,__noop=true,NULL); \
 } while (0)
 
+static bool torture_winbind_struct_interface_version(struct torture_context *torture)
+{
+	struct winbindd_request req;
+	struct winbindd_response rep;
+
+	ZERO_STRUCT(req);
+	ZERO_STRUCT(rep);
+
+	torture_comment(torture, "Running WINBINDD_INTERFACE_VERSION (struct based)\n");
+
+	DO_STRUCT_REQ_REP(WINBINDD_INTERFACE_VERSION, &req, &rep);
+
+	torture_assert_int_equal(torture,
+				 rep.data.interface_version,
+				 WINBIND_INTERFACE_VERSION,
+				 "winbind server and client doesn't match");
+
+	return true;
+}
+
 static bool torture_winbind_struct_ping(struct torture_context *torture)
 {
 	struct timeval tv = timeval_current();
@@ -258,6 +278,7 @@
 {
 	struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "STRUCT");
 
+	torture_suite_add_simple_test(suite, "INTERFACE_VERSION", torture_winbind_struct_interface_version);
 	torture_suite_add_simple_test(suite, "PING", torture_winbind_struct_ping);
 	torture_suite_add_simple_test(suite, "LIST_TRUSTDOM", torture_winbind_struct_list_trustdom);
 	torture_suite_add_simple_test(suite, "GETDCNAME", torture_winbind_struct_getdcname);



More information about the samba-cvs mailing list