From 0eb304d536f27bcb647d7f8c0e57d187b59c0caa Mon Sep 17 00:00:00 2001 From: Matthieu Patou Date: Tue, 30 Jul 2013 21:45:59 -0700 Subject: torture-drsuapi: Make the name of the dc variable In case some tests fails or if the removal takes sometime to replicate to all the DCs Reviewed-By: Andrew Bartlett --- source4/torture/rpc/drsuapi.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source4') diff --git a/source4/torture/rpc/drsuapi.c b/source4/torture/rpc/drsuapi.c index 86b0d32768..46f9505ef2 100644 --- a/source4/torture/rpc/drsuapi.c +++ b/source4/torture/rpc/drsuapi.c @@ -774,7 +774,9 @@ bool torture_rpc_drsuapi_get_dcinfo(struct torture_context *torture, */ bool torture_drsuapi_tcase_setup_common(struct torture_context *tctx, struct DsPrivate *priv) { - NTSTATUS status; + NTSTATUS status; + int rnd = rand() % 1000; + char *name = talloc_asprintf(tctx, "%s%d", TEST_MACHINE_NAME, rnd); struct cli_credentials *machine_credentials; torture_assert(tctx, priv, "Invalid argument"); @@ -785,8 +787,8 @@ bool torture_drsuapi_tcase_setup_common(struct torture_context *tctx, struct DsP &ndr_table_drsuapi); torture_assert(tctx, NT_STATUS_IS_OK(status), "Unable to connect to DRSUAPI pipe"); - torture_comment(tctx, "About to join domain\n"); - priv->join = torture_join_domain(tctx, TEST_MACHINE_NAME, ACB_SVRTRUST, + torture_comment(tctx, "About to join domain with name %s\n", name); + priv->join = torture_join_domain(tctx, name, ACB_SVRTRUST, &machine_credentials); torture_assert(tctx, priv->join, "Failed to join as BDC"); -- cgit