s4:torture: avoid reporting error on failure of smb2.streams tests
authorGregor Beck <gbeck@sernet.de>
Tue, 28 Feb 2012 11:54:35 +0000 (12:54 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 6 Mar 2012 22:53:06 +0000 (23:53 +0100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
source4/torture/smb2/streams.c

index a679ee2..8e7fb22 100644 (file)
                ok = false; \
        } \
        if (!ok) { \
-               torture_comment(tctx,"(%s) Incorrect value %s='%s' - " \
-                   "should be '%s'\n", \
-                   __location__, #v, (v)?(v):"NULL", \
-                   (correct)?(correct):"NULL"); \
-               ret = false; \
+               torture_result(tctx, TORTURE_FAIL, \
+                              "(%s) Incorrect value %s='%s' - "        \
+                              "should be '%s'\n",                      \
+                              __location__, #v, (v)?(v):"NULL",        \
+                              (correct)?(correct):"NULL");             \
+               ret = false;                                            \
        }} while (0)
 
 
@@ -1128,17 +1129,19 @@ done:
        sfinfo.generic.in.file.handle = h1; \
        status = smb2_setinfo_file(tree, &sfinfo); \
        if (!NT_STATUS_EQUAL(status, rightstatus)) { \
-               torture_comment(tctx,"(%s) %s - %s (should be %s)\n", \
-                   __location__, #call, \
-                   nt_errstr(status), nt_errstr(rightstatus)); \
-               ret = false; \
+               torture_result(tctx, TORTURE_FAIL,                      \
+                              "(%s) %s - %s (should be %s)\n",         \
+                              __location__, #call,                     \
+                              nt_errstr(status), nt_errstr(rightstatus)); \
+               ret = false;                                            \
        } \
        finfo1.generic.level = RAW_FILEINFO_ALL_INFORMATION; \
        finfo1.generic.in.file.handle = h1; \
        status2 = smb2_getinfo_file(tree, tctx, &finfo1); \
        if (!NT_STATUS_IS_OK(status2)) { \
-               torture_comment(tctx,"(%s) %s pathinfo - %s\n", \
-                   __location__, #call, nt_errstr(status)); \
+               torture_result(tctx, TORTURE_FAIL,           \
+                              "(%s) %s pathinfo - %s\n",    \
+                              __location__, #call, nt_errstr(status)); \
                ret = false; \
        }} while (0)