From 0bff2ced790fb9ff352b848246338999099f7f5f Mon Sep 17 00:00:00 2001 From: Aravind Srinivasan Date: Tue, 6 Oct 2009 20:12:09 -0700 Subject: [PATCH] s4/torture: convert all printf to torture_comments --- source4/torture/smb2/create.c | 52 +++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 20 deletions(-) diff --git a/source4/torture/smb2/create.c b/source4/torture/smb2/create.c index febfbe03ec4..3f9e29ad702 100644 --- a/source4/torture/smb2/create.c +++ b/source4/torture/smb2/create.c @@ -31,15 +31,20 @@ #define CHECK_STATUS(status, correct) do { \ if (!NT_STATUS_EQUAL(status, correct)) { \ - printf("(%s) Incorrect status %s - should be %s\n", \ - __location__, nt_errstr(status), nt_errstr(correct)); \ + torture_result(torture, TORTURE_FAIL, \ + "(%s) Incorrect status %s - should be %s\n", \ + __location__, nt_errstr(status), nt_errstr(correct)); \ return false; \ }} while (0) #define CHECK_EQUAL(v, correct) do { \ if (v != correct) { \ - printf("(%s) Incorrect value for %s 0x%08llx - should be 0x%08llx\n", \ - __location__, #v, (unsigned long long)v, (unsigned long long)correct); \ + torture_result(torture, TORTURE_FAIL, \ + "(%s) Incorrect value for %s 0x%08llx - " \ + "should be 0x%08llx\n", \ + __location__, #v, \ + (unsigned long long)v, \ + (unsigned long long)correct); \ return false; \ }} while (0) @@ -131,7 +136,9 @@ static bool test_create_gentest(struct torture_context *torture, struct smb2_tre CHECK_STATUS(status, NT_STATUS_OK); } else { unexpected_mask |= 1<dacl, sd2->dacl)) { - printf("%s: security descriptors don't match!\n", __location__); - printf("got:\n"); + torture_comment(torture, + "%s: security descriptors don't match!\n", __location__); + torture_comment(torture, "got:\n"); NDR_PRINT_DEBUG(security_descriptor, sd2); - printf("expected:\n"); + torture_comment(torture, "expected:\n"); NDR_PRINT_DEBUG(security_descriptor, sd); return false; } -- 2.34.1