svn commit: samba r16737 - in branches/SAMBA_4_0/source/torture/smb2: .

metze at samba.org metze at samba.org
Sat Jul 1 14:21:23 GMT 2006


Author: metze
Date: 2006-07-01 14:21:21 +0000 (Sat, 01 Jul 2006)
New Revision: 16737

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16737

Log:
if an error happens report it

metze
Modified:
   branches/SAMBA_4_0/source/torture/smb2/getinfo.c
   branches/SAMBA_4_0/source/torture/smb2/setinfo.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/smb2/getinfo.c
===================================================================
--- branches/SAMBA_4_0/source/torture/smb2/getinfo.c	2006-07-01 14:20:14 UTC (rev 16736)
+++ branches/SAMBA_4_0/source/torture/smb2/getinfo.c	2006-07-01 14:21:21 UTC (rev 16737)
@@ -113,13 +113,17 @@
 		file_levels[i].finfo.generic.in.file.handle = hfile;
 		file_levels[i].fstatus = smb2_getinfo_file(tree, tree, &file_levels[i].finfo);
 		if (!NT_STATUS_IS_OK(file_levels[i].fstatus)) {
-			printf("%s failed on file - %s\n", file_levels[i].name, nt_errstr(file_levels[i].fstatus));
+			printf("(%s) %s failed on file - %s\n", __location__,
+				file_levels[i].name, nt_errstr(file_levels[i].fstatus));
+			goto failed;
 		}
 		file_levels[i].dinfo.generic.level = file_levels[i].level;
 		file_levels[i].dinfo.generic.in.file.handle = hdir;
 		file_levels[i].dstatus = smb2_getinfo_file(tree, tree, &file_levels[i].dinfo);
 		if (!NT_STATUS_IS_OK(file_levels[i].dstatus)) {
-			printf("%s failed on dir - %s\n", file_levels[i].name, nt_errstr(file_levels[i].dstatus));
+			printf("(%s) %s failed on dir - %s\n", __location__,
+				file_levels[i].name, nt_errstr(file_levels[i].dstatus));
+			goto failed;
 		}
 	}
 
@@ -152,6 +156,7 @@
 		fs_levels[i].status = smb2_getinfo_fs(tree, tree, &fs_levels[i].info);
 		if (!NT_STATUS_IS_OK(fs_levels[i].status)) {
 			printf("%s failed - %s\n", fs_levels[i].name, nt_errstr(fs_levels[i].status));
+			return False;
 		}
 	}
 

Modified: branches/SAMBA_4_0/source/torture/smb2/setinfo.c
===================================================================
--- branches/SAMBA_4_0/source/torture/smb2/setinfo.c	2006-07-01 14:20:14 UTC (rev 16736)
+++ branches/SAMBA_4_0/source/torture/smb2/setinfo.c	2006-07-01 14:21:21 UTC (rev 16737)
@@ -89,6 +89,7 @@
 		printf("(%s) %s - %s (should be %s)\n", __location__, #call, \
 			nt_errstr(status), nt_errstr(rightstatus)); \
 		ret = False; \
+		goto done; \
 	} \
 	} while (0)
 
@@ -99,6 +100,8 @@
 		status2 = smb2_getinfo_file(tree, mem_ctx, &finfo2); \
 		if (!NT_STATUS_IS_OK(status2)) { \
 			printf("(%s) %s - %s\n", __location__, #call, nt_errstr(status2)); \
+		ret = False; \
+		goto done; \
 		} \
 	}} while (0)
 
@@ -109,6 +112,8 @@
 		       call_name, #stype, #field, \
 		       (uint_t)value, (uint_t)finfo2.stype.out.field); \
 		torture_smb2_all_info(tree, handle); \
+		ret = False; \
+		goto done; \
 	}} while (0)
 
 #define CHECK_TIME(call, stype, field, value) do { \
@@ -121,6 +126,8 @@
 		printf("\t%s", timestring(mem_ctx, value)); \
 		printf("\t%s\n", nt_time_string(mem_ctx, finfo2.stype.out.field)); \
 		torture_smb2_all_info(tree, handle); \
+		ret = False; \
+		goto done; \
 	}} while (0)
 
 #define CHECK_STR(call, stype, field, value) do { \
@@ -131,6 +138,8 @@
 		        value, \
 			finfo2.stype.out.field); \
 		torture_smb2_all_info(tree, handle); \
+		ret = False; \
+		goto done; \
 	}} while (0)
 
 #define CHECK_STATUS(status, correct) do { \



More information about the samba-cvs mailing list