From fa8a3ca0b8237989b3b124713fb9aabf90f9b6e2 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 16 Mar 2014 22:59:32 +1300 Subject: [PATCH] torture-samr: Do not issue a TORTURE_FAIL unless *this* test failed Change-Id: I349d8ac77a98b934cd4b11b01a96a231097eeeed Signed-off-by: Andrew Bartlett Signed-off-by: Stefan Metzmacher --- source4/torture/rpc/samr.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c index c1c4dbdbb59..45a74cbb58f 100644 --- a/source4/torture/rpc/samr.c +++ b/source4/torture/rpc/samr.c @@ -4364,7 +4364,7 @@ static bool test_Password_lockout_wrap(struct dcerpc_pipe *p, /* run tests */ for (i=0; i < ARRAY_SIZE(creds); i++) { - + bool test_passed; /* skip trust tests for now */ if (acct_flags & ACB_WSTRUST || acct_flags & ACB_SVRTRUST || @@ -4372,7 +4372,7 @@ static bool test_Password_lockout_wrap(struct dcerpc_pipe *p, continue; } - ret &= test_Password_lockout(p, np, tctx, acct_flags, acct_name, + test_passed = test_Password_lockout(p, np, tctx, acct_flags, acct_name, domain_handle, user_handle, password, machine_credentials, creds[i].comment, @@ -4380,8 +4380,10 @@ static bool test_Password_lockout_wrap(struct dcerpc_pipe *p, creds[i].interactive, creds[i].expected_success_status, &_info1, &_info12); - if (!ret) { + ret &= test_passed; + if (!test_passed) { torture_result(tctx, TORTURE_FAIL, "TEST #%d (%s) failed\n", i, creds[i].comment); + break; } else { torture_comment(tctx, "TEST #%d (%s) succeeded\n", i, creds[i].comment); } -- 2.11.4.GIT