s4:torture: print ntstatus on failure of setup complex file in smb2 setinfo/getinfo...
authorGregor Beck <gbeck@sernet.de>
Fri, 2 Mar 2012 11:05:59 +0000 (12:05 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 6 Mar 2012 22:53:07 +0000 (23:53 +0100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
source4/torture/smb2/scan.c

index c16dd3a..92fbc68 100644 (file)
@@ -51,14 +51,16 @@ bool torture_smb2_getinfo_scan(struct torture_context *torture)
 
        status = torture_setup_complex_file(tree, FNAME);
        if (!NT_STATUS_IS_OK(status)) {
-               printf("Failed to setup complex file '%s'\n", FNAME);
+               printf("Failed to setup complex file '%s': %s\n",
+                      FNAME, nt_errstr(status));
                return false;
        }
        torture_setup_complex_file(tree, FNAME2);
 
        status = torture_setup_complex_dir(tree, DNAME);
        if (!NT_STATUS_IS_OK(status)) {
-               printf("Failed to setup complex dir  '%s'\n", DNAME);
+               printf("Failed to setup complex dir '%s': %s\n",
+                      DNAME, nt_errstr(status));
                smb2_util_unlink(tree, FNAME);
                return false;
        }
@@ -123,7 +125,8 @@ bool torture_smb2_setinfo_scan(struct torture_context *torture)
 
        status = torture_setup_complex_file(tree, FNAME);
        if (!NT_STATUS_IS_OK(status)) {
-               printf("Failed to setup complex file '%s'\n", FNAME);
+               printf("Failed to setup complex file '%s': %s\n",
+                      FNAME, nt_errstr(status));
                return false;
        }
        torture_setup_complex_file(tree, FNAME2);