]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
torture/bind_dlz: return the right kind of failure
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Wed, 13 Apr 2022 23:40:43 +0000 (11:40 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 17 Jun 2022 01:28:30 +0000 (01:28 +0000)
torture_fail() is a macro that returns false, which evaluates to ISC_R_SUCCESS
in int context.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15040

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/torture/dns/dlz_bind9.c

index 6ace33849641fea7bb9542badcb1b7bcdb276592..de6bd57fd5ca084bcb45ba595fd467c5b9d4c8b7 100644 (file)
@@ -113,7 +113,7 @@ static isc_result_t dlz_bind9_writeable_zone_hook(dns_view_t *view,
                NULL
        };
        if (ret != LDB_SUCCESS) {
-               torture_fail(tctx, "Failed to connect to samdb");
+               torture_comment(tctx, "Failed to connect to samdb");
                return ISC_R_FAILURE;
        }
 
@@ -121,7 +121,10 @@ static isc_result_t dlz_bind9_writeable_zone_hook(dns_view_t *view,
                              LDB_SCOPE_SUBTREE, attrs, DSDB_SEARCH_SEARCH_ALL_PARTITIONS,
                              "(&(objectClass=dnsZone)(name=%s))", zone_name);
        if (ret != LDB_SUCCESS) {
-               torture_fail(tctx, talloc_asprintf(tctx, "Failed to search for %s: %s", zone_name, ldb_errstring(samdb)));
+               torture_comment(tctx,
+                               "Failed to search for %s: %s",
+                               zone_name,
+                               ldb_errstring(samdb));
                return ISC_R_FAILURE;
        }
        talloc_free(msg);