From 95a12cdf21ba86f460c2ffa51223e8564fd25014 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 12 Nov 2009 15:37:34 +1100 Subject: [PATCH] s4:torture Use (some) torture_assert() calls in RPC-DSSYNC test --- source4/torture/rpc/dssync.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/source4/torture/rpc/dssync.c b/source4/torture/rpc/dssync.c index 705d060d3b0..907474fc579 100644 --- a/source4/torture/rpc/dssync.c +++ b/source4/torture/rpc/dssync.c @@ -506,12 +506,9 @@ static bool test_analyse_objects(struct torture_context *tctx, if (ret != LDB_SUCCESS) { DEBUG(0, ("Could not re-fetch object just delivered over DRS: %s", ldb_errstring(ldb))); - return false; - } - if (res->count != 1) { - DEBUG(0, ("Could not re-fetch object just delivered over DRS")); - return false; + torture_assert_int_equal(tctx, ret, LDB_SUCCESS, "Could not re-fetch object just delivered over DRS"); } + torture_assert_int_equal(tctx, res->count, 1, "Could not re-fetch object just delivered over DRS"); ldap_msg = res->msgs[0]; for (j=0; j < ldap_msg->num_elements; j++) { ldap_msg->elements[j].flags = LDB_FLAG_MOD_ADD; @@ -562,6 +559,8 @@ static bool test_analyse_objects(struct torture_context *tctx, ldif.msg = new_msg; s = ldb_ldif_write_string(ldb, new_msg, &ldif); DEBUG(0, ("Difference in between DRS and LDAP objects: %s\n", s)); + talloc_free(search_req); + torture_assert_int_equal(tctx, new_msg->num_elements, 0, "Should have no objects in 'difference' message"); } talloc_free(search_req); } -- 2.11.4.GIT