summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-11-14 08:45:10 +0100
committerMichael Adam <obnox@samba.org>2012-11-20 17:37:19 +0100
commit6568a26f0142950300ae8503b8bc2bffb8a77352 (patch)
treea924bd2589fa4160a4a7e77afb7a1863cac53037 /source4/torture
parent14ee2cd938a963d5b3398eed4f21ff64630afdcd (diff)
downloadsamba-6568a26f0142950300ae8503b8bc2bffb8a77352.tar.gz
samba-6568a26f0142950300ae8503b8bc2bffb8a77352.tar.bz2
samba-6568a26f0142950300ae8503b8bc2bffb8a77352.zip
s4:torture/rpc/handles: try to make the assoc_group test less flakey
Just incrementing the assoc_group_id makes it too likely to hit a number that is already in use. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/handles.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/torture/rpc/handles.c b/source4/torture/rpc/handles.c
index 9dfa1c0238..3fdce5672e 100644
--- a/source4/torture/rpc/handles.c
+++ b/source4/torture/rpc/handles.c
@@ -508,7 +508,11 @@ static bool test_handles_random_assoc(struct torture_context *torture)
p1->assoc_group_id);
transport = p1->conn->transport.transport;
- assoc_group_id = p1->assoc_group_id;
+ /*
+ * We use ~p1->assoc_group_id instead of p1->assoc_group_id, because
+ * this way we are less likely to 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,