[PATCH] Small fix to the ldb tests
jra at samba.org
Tue Aug 14 00:06:59 UTC 2018
On Tue, Aug 14, 2018 at 10:47:30AM +1200, Douglas Bagnall via samba-technical wrote:
> Thanks Timur,
> On 14/08/18 09:03, Timur I. Bakeyev via samba-technical wrote:
> > I came across this wrong assertion while ago and, seems, it still there, at
> > least in ldb 1.4.1.
> > We are allocating msg02, but check in assertion msg01, which makes no sense
> > here.
> There is an instance of that in master, but it isn't here:
> > @@ -3529,7 +3529,7 @@ static void test_ldb_unique_index_duplic
> and the patch would be easier to deal with if these paths started with
> > --- tests/ldb_mod_op_test.c.orig 2018-03-02 23:35:09 UTC
> > +++ tests/ldb_mod_op_test.c
> ...and it had a commit message.
> I have attached a fixed version; all you need to do is add your
> sign-off above the reviewed-by and get someone else to review it.
RB+ by me, obvious goodness. Timur, give me your permission
to add your Signed-off-by: and I'll push.
> From 860ff61a665b27b0c9a8cc3da4f83d2b3ee4ed93 Mon Sep 17 00:00:00 2001
> From: "Timur I. Bakeyev" <timur at freebsd.org>
> Date: Tue, 14 Aug 2018 10:40:33 +1200
> Subject: [PATCH] ldb tests: fix assertion on wrong pointer
> We are allocating msg02, but check in assertion msg01, which makes no
> sense here.
> Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
> lib/ldb/tests/ldb_mod_op_test.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> diff --git a/lib/ldb/tests/ldb_mod_op_test.c b/lib/ldb/tests/ldb_mod_op_test.c
> index 01667af3865..924c80a14b7 100644
> --- a/lib/ldb/tests/ldb_mod_op_test.c
> +++ b/lib/ldb/tests/ldb_mod_op_test.c
> @@ -3973,7 +3973,7 @@ static void test_ldb_unique_index_duplicate_with_guid(void **state)
> assert_int_equal(ret, LDB_SUCCESS);
> msg02 = ldb_msg_new(tmp_ctx);
> - assert_non_null(msg01);
> + assert_non_null(msg02);
> msg02->dn = ldb_dn_new_fmt(msg02, test_ctx->ldb, "dc=test02");
More information about the samba-technical