]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ldb: ldb_key_value_test fix
authorAaron Haslett <aaronhaslett@catalyst.net.nz>
Fri, 17 May 2019 01:27:20 +0000 (13:27 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 22 May 2019 04:42:29 +0000 (04:42 +0000)
In future commits we'll be adding more logging to LDB, which breaks the
ldb_key_value_test suite. By removing the debug handler, a bug
involving an expired debug_string variable being written to is avoided.

Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
lib/ldb/tests/ldb_mod_op_test.c

index 0e91c6db2828189e3b875099377164fbc6b86e0e..b6a0d1e4f5728fe6aa71f45de9eb181bcb82bf2b 100644 (file)
@@ -3996,6 +3996,7 @@ static void test_ldb_unique_index_duplicate_with_guid(void **state)
        assert_non_null(p);
        TALLOC_FREE(debug_string);
        talloc_free(tmp_ctx);
+       ldb_set_debug(test_ctx->ldb, NULL, NULL);
 }
 
 static void test_ldb_guid_index_duplicate_dn_logging(void **state)
@@ -4044,6 +4045,7 @@ static void test_ldb_guid_index_duplicate_dn_logging(void **state)
 
        assert_null(debug_string);
        talloc_free(tmp_ctx);
+       ldb_set_debug(test_ctx->ldb, NULL, NULL);
 }
 
 static void test_ldb_talloc_destructor_transaction_cleanup(void **state)