diff options
author | Andrew Bartlett <abartlet@samba.org> | 2014-10-05 16:00:47 +1300 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2014-10-06 14:57:58 +0200 |
commit | 7b4f266ef059fbab5ed1cf50ca347fb9985f02dc (patch) | |
tree | a5cfb0c0ad982374135cc614a9cca5674deec990 /source4/torture/winbind | |
parent | 88b24858d887278f4787081dacff2409259fcf42 (diff) | |
download | samba-7b4f266ef059fbab5ed1cf50ca347fb9985f02dc.tar.gz |
torture: Reorder torture_winbind_struct_domain_info tests
This tries to ensure we get enough information to debug this
intermittent failure.
I think this may be a real failure, but it is hard to tell without more info.
This patch prints out the full details of what the domain returned before
doing the assertions.
Andrew Bartlett
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source4/torture/winbind')
-rw-r--r-- | source4/torture/winbind/struct_based.c | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/source4/torture/winbind/struct_based.c b/source4/torture/winbind/struct_based.c index d47d068909f..ef27b057a28 100644 --- a/source4/torture/winbind/struct_based.c +++ b/source4/torture/winbind/struct_based.c @@ -428,22 +428,6 @@ static bool torture_winbind_struct_domain_info(struct torture_context *torture) DO_STRUCT_REQ_REP(WINBINDD_DOMAIN_INFO, &req, &rep); - torture_assert_str_equal(torture, - rep.data.domain_info.name, - listd[i].netbios_name, - "Netbios domain name doesn't match"); - - torture_assert_str_equal(torture, - rep.data.domain_info.alt_name, - listd[i].dns_name, - "DNS domain name doesn't match"); - - sid = dom_sid_parse_talloc(torture, rep.data.domain_info.sid); - torture_assert(torture, sid, "Failed to parse SID"); - - ok = dom_sid_equal(listd[i].sid, sid); - torture_assert(torture, ok, "SID's doesn't match"); - if (rep.data.domain_info.primary) { flagstr = talloc_strdup_append(flagstr, "PR "); } @@ -462,10 +446,27 @@ static bool torture_winbind_struct_domain_info(struct torture_context *torture) flagstr = talloc_strdup_append(flagstr, "NA "); } - torture_comment(torture, "DOMAIN '%s' => '%s' [%s]\n", + torture_comment(torture, "DOMAIN '%s' => '%s' [%s] [%s]\n", rep.data.domain_info.name, rep.data.domain_info.alt_name, - flagstr); + flagstr, + rep.data.domain_info.sid); + + sid = dom_sid_parse_talloc(torture, rep.data.domain_info.sid); + torture_assert(torture, sid, "Failed to parse SID"); + + ok = dom_sid_equal(listd[i].sid, sid); + torture_assert(torture, ok, "SID's doesn't match"); + + torture_assert_str_equal(torture, + rep.data.domain_info.name, + listd[i].netbios_name, + "Netbios domain name doesn't match"); + + torture_assert_str_equal(torture, + rep.data.domain_info.alt_name, + listd[i].dns_name, + "DNS domain name doesn't match"); } return true; |