svn commit: samba r25699 - in branches/SAMBA_4_0/source: librpc/idl
torture/rpc
gd at samba.org
gd at samba.org
Thu Oct 18 21:23:25 GMT 2007
Author: gd
Date: 2007-10-18 21:23:25 +0000 (Thu, 18 Oct 2007)
New Revision: 25699
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25699
Log:
Add ForceReplication test.
Guenther
Modified:
branches/SAMBA_4_0/source/librpc/idl/frsapi.idl
branches/SAMBA_4_0/source/torture/rpc/frsapi.c
Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/frsapi.idl
===================================================================
--- branches/SAMBA_4_0/source/librpc/idl/frsapi.idl 2007-10-18 19:25:58 UTC (rev 25698)
+++ branches/SAMBA_4_0/source/librpc/idl/frsapi.idl 2007-10-18 21:23:25 UTC (rev 25699)
@@ -94,8 +94,8 @@
/* Function 0x0a */
/* not supported before w2k3 sp2 */
WERROR frsapi_ForceReplication(
- [in] uint32 unknown1,
- [in] uint32 unknown2,
+ [in,unique] GUID *guid1,
+ [in,unique] GUID *guid2,
[in,unique] [charset(UTF16),string] uint16 *replica_set,
[in,unique] [charset(UTF16),string] uint16 *partner_name
);
Modified: branches/SAMBA_4_0/source/torture/rpc/frsapi.c
===================================================================
--- branches/SAMBA_4_0/source/torture/rpc/frsapi.c 2007-10-18 19:25:58 UTC (rev 25698)
+++ branches/SAMBA_4_0/source/torture/rpc/frsapi.c 2007-10-18 21:23:25 UTC (rev 25699)
@@ -24,6 +24,7 @@
#include "torture/rpc/rpc.h"
#include "librpc/gen_ndr/ndr_frsapi_c.h"
#include "torture/util.h"
+#include "param/param.h"
static bool test_GetDsPollingIntervalW(struct torture_context *tctx,
struct dcerpc_pipe *p,
@@ -150,16 +151,17 @@
FRSAPI_REPLICA_SET_TYPE_DOMAIN,
FRSAPI_REPLICA_SET_TYPE_DFS };
int i;
+ bool ret = true;
if (!test_IsPathReplicated_err(tctx, p, NULL, 0,
WERR_FRS_INVALID_SERVICE_PARAMETER)) {
- return false;
+ ret = false;
}
for (i=0; i<ARRAY_SIZE(lvls); i++) {
if (!_test_IsPathReplicated(tctx, p, dcerpc_server_name(p),
lvls[i])) {
- return false;
+ ret = false;
}
}
@@ -167,7 +169,7 @@
const char *path = talloc_asprintf(tctx, "\\\\%s\\SYSVOL",
dcerpc_server_name(p));
if (!_test_IsPathReplicated(tctx, p, path, lvls[i])) {
- return false;
+ ret = false;
}
}
@@ -175,10 +177,33 @@
if (!_test_IsPathReplicated(tctx, p,
"C:\\windows\\sysvol\\domain",
lvls[i])) {
- return false;
+ ret = false;
}
}
+ return ret;
+}
+
+static bool test_ForceReplication(struct torture_context *tctx,
+ struct dcerpc_pipe *p)
+{
+ struct frsapi_ForceReplication r;
+
+ ZERO_STRUCT(r);
+
+ r.in.guid1 = NULL;
+ r.in.guid2 = NULL;
+ r.in.replica_set = talloc_asprintf(tctx, "%s",
+ lp_realm(global_loadparm));
+ r.in.partner_name = dcerpc_server_name(p);
+
+ torture_assert_ntstatus_ok(tctx,
+ dcerpc_frsapi_ForceReplication(p, tctx, &r),
+ "ForceReplication failed");
+
+ torture_assert_werr_ok(tctx, r.out.result,
+ "ForceReplication failed");
+
return true;
}
@@ -197,5 +222,9 @@
test = torture_rpc_tcase_add_test(tcase, "IsPathReplicated",
test_IsPathReplicated);
+ test = torture_rpc_tcase_add_test(tcase, "ForceReplication",
+ test_ForceReplication);
+
+
return suite;
}
More information about the samba-cvs
mailing list