diff options
author | Kamen Mazdrashki <kamenim@samba.org> | 2010-08-19 03:08:29 +0300 |
---|---|---|
committer | Kamen Mazdrashki <kamenim@samba.org> | 2010-08-19 03:34:05 +0300 |
commit | e05027401f4733e43b62148fa5c59559f49b4c1b (patch) | |
tree | eeda0772c7de3097b8de447418ce1aa089dccd13 /source4/torture/drs/rpc | |
parent | c3cf388eaf322b7646aa464774baa324be81a56d (diff) | |
download | samba-e05027401f4733e43b62148fa5c59559f49b4c1b.tar.gz samba-e05027401f4733e43b62148fa5c59559f49b4c1b.tar.bz2 samba-e05027401f4733e43b62148fa5c59559f49b4c1b.zip |
s4-test: make better error message for ATTID checks
Diffstat (limited to 'source4/torture/drs/rpc')
-rw-r--r-- | source4/torture/drs/rpc/msds_intid.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/source4/torture/drs/rpc/msds_intid.c b/source4/torture/drs/rpc/msds_intid.c index 8a847b5cba..ea5bdc6f28 100644 --- a/source4/torture/drs/rpc/msds_intid.c +++ b/source4/torture/drs/rpc/msds_intid.c @@ -459,6 +459,22 @@ static bool _test_GetNCChanges(struct torture_context *tctx, return true; } +static char * _make_error_message(TALLOC_CTX *mem_ctx, + const struct dsdb_attribute *dsdb_attr, + const struct drsuapi_DsReplicaAttribute *drs_attr, + const struct drsuapi_DsReplicaObjectListItemEx *drs_obj) +{ + return talloc_asprintf(mem_ctx, "\nInvalid ATTID for %1$s (%2$s)\n" + " drs_attid: %3$11d (0x%3$08X)\n" + " msDS_IntId: %4$11d (0x%4$08X)\n" + " attributeId_id: %5$11d (0x%5$08X)", + dsdb_attr->lDAPDisplayName, + drs_obj->object.identifier->dn, + drs_attr->attid, + dsdb_attr->msDS_IntId, + dsdb_attr->attributeID_id); +} + /** * Fetch Schema NC and check ATTID values returned. * When Schema partition is replicated, ATTID @@ -502,11 +518,11 @@ static bool test_dsintid_schema(struct torture_context *tctx, struct DsIntIdTest torture_assert(tctx, drs_attr->attid == dsdb_attr->attributeID_id, - "ATTID must be based on prefixMap") + _make_error_message(ctx, dsdb_attr, drs_attr, cur)) if (dsdb_attr->msDS_IntId) { torture_assert(tctx, drs_attr->attid != dsdb_attr->msDS_IntId, - "ATTID must not be msDS-IntId value") + _make_error_message(ctx, dsdb_attr, drs_attr, cur)) } } } @@ -560,11 +576,11 @@ static bool test_dsintid_domain(struct torture_context *tctx, struct DsIntIdTest if (dsdb_attr->msDS_IntId) { torture_assert(tctx, drs_attr->attid == dsdb_attr->msDS_IntId, - "ATTID must be msDS-IntId value") + _make_error_message(ctx, dsdb_attr, drs_attr, cur)) } else { torture_assert(tctx, drs_attr->attid == dsdb_attr->attributeID_id, - "ATTID must be based on prefixMap") + _make_error_message(ctx, dsdb_attr, drs_attr, cur)) } } } |