From 3c731783e0e9ee4a7b4b9289544d4d8a465940b9 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 9 Dec 2013 14:25:06 +1300 Subject: [PATCH] torture-samr: Improve rpc.samr.passwords.badpwdcount test Change-Id: I89ac30d715e89f14aca049e0e5c5043a39ab93c7 Signed-off-by: Andrew Bartlett Reviewed-by: Stefan Metzmacher --- source4/torture/rpc/samr.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c index 45a74cbb58f..551cd4539fd 100644 --- a/source4/torture/rpc/samr.c +++ b/source4/torture/rpc/samr.c @@ -3903,7 +3903,9 @@ static bool test_Password_badpwdcount(struct dcerpc_pipe *p, if (!test_SamLogon_with_creds(tctx, np, machine_credentials, acct_name, passwords[i], expected_success_status, interactive)) { - torture_fail(tctx, talloc_asprintf(tctx, "succeeded to authenticate with old password (#%d of #%d in history)", i, password_history_length)); + torture_fail(tctx, talloc_asprintf(tctx, "did not successfully to obtain %s for %s login with old password (#%d of #%d in history)", + nt_errstr(expected_success_status), + interactive ? "interactive" : "network", i, password_history_length)); } torture_assert(tctx, @@ -4030,16 +4032,16 @@ static bool test_Password_badpwdcount_wrap(struct dcerpc_pipe *p, continue; } - ret &= test_Password_badpwdcount(p, np, tctx, acct_flags, acct_name, - domain_handle, user_handle, password, - machine_credentials, - creds[i].comment, - creds[i].disabled, - creds[i].interactive, - creds[i].expected_success_status, - &_info1, &_info12); - if (!ret) { + if (!test_Password_badpwdcount(p, np, tctx, acct_flags, acct_name, + domain_handle, user_handle, password, + machine_credentials, + creds[i].comment, + creds[i].disabled, + creds[i].interactive, + creds[i].expected_success_status, + &_info1, &_info12)) { torture_result(tctx, TORTURE_FAIL, "TEST #%d (%s) failed\n", i, creds[i].comment); + ret = false; } else { torture_comment(tctx, "TEST #%d (%s) succeeded\n", i, creds[i].comment); } -- 2.11.4.GIT