From: Stefan Metzmacher Date: Wed, 14 Nov 2012 07:45:10 +0000 (+0100) Subject: s4:torture/rpc/handles: try to make the assoc_group test less flakey X-Git-Url: http://git.samba.org/?p=metze%2Fsamba%2Fwip.git;a=commitdiff_plain;h=4c3cec721431de12efe2e8c6f394bd8734f7f232 s4:torture/rpc/handles: try to make the assoc_group test less flakey --- diff --git a/source4/torture/rpc/handles.c b/source4/torture/rpc/handles.c index 6b51eb5ab485..97f4d9f55a77 100644 --- a/source4/torture/rpc/handles.c +++ b/source4/torture/rpc/handles.c @@ -504,10 +504,15 @@ static bool test_handles_random_assoc(struct torture_context *torture) status = torture_rpc_connection(torture, &p1, &ndr_table_samr); torture_assert_ntstatus_ok(torture, status, "opening samr pipe1"); - transport = p1->conn->transport.transport; - assoc_group_id = p1->assoc_group_id; + torture_comment(torture, "pipe1 uses assoc_group_id[0x%08X]\n", + p1->assoc_group_id); - torture_comment(torture, "pipe1 uses assoc_group_id[0x%08X]\n", assoc_group_id); + transport = p1->conn->transport.transport; + /* + * we use ~p1->assoc_group_id because it means we are less likely + * use an id which is already in use. + */ + assoc_group_id = ~p1->assoc_group_id; torture_comment(torture, "connect samr pipe2 with assoc_group_id[0x%08X]- should fail\n", ++assoc_group_id); status = torture_rpc_connection_transport(torture, &p2, &ndr_table_samr,