svn commit: samba r16707 - in branches/SAMBA_4_0/source/torture/raw: .

metze at samba.org metze at samba.org
Fri Jun 30 08:19:45 GMT 2006


Author: metze
Date: 2006-06-30 08:19:44 +0000 (Fri, 30 Jun 2006)
New Revision: 16707

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

Log:
- test attrib = 0 in BASIC_INFO
- return an error when value doesn't match the expected value!

metze
Modified:
   branches/SAMBA_4_0/source/torture/raw/setfileinfo.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/raw/setfileinfo.c
===================================================================
--- branches/SAMBA_4_0/source/torture/raw/setfileinfo.c	2006-06-30 08:16:59 UTC (rev 16706)
+++ branches/SAMBA_4_0/source/torture/raw/setfileinfo.c	2006-06-30 08:19:44 UTC (rev 16707)
@@ -144,6 +144,7 @@
 		} \
 		if (!NT_STATUS_IS_OK(status2)) { \
 			printf("%s - %s\n", #call, nt_errstr(status2)); \
+			ret = False; \
 		} \
 	}} while (0)
 
@@ -154,6 +155,7 @@
 		       call_name, #stype, #field, \
 		       (uint_t)value, (uint_t)finfo2.stype.out.field); \
 		dump_all_info(mem_ctx, &finfo1); \
+		ret = False; \
 	}} while (0)
 
 #define CHECK_TIME(call, stype, field, value) do { \
@@ -166,6 +168,7 @@
 		printf("\t%s", timestring(mem_ctx, value)); \
 		printf("\t%s\n", nt_time_string(mem_ctx, finfo2.stype.out.field)); \
 		dump_all_info(mem_ctx, &finfo1); \
+		ret = False; \
 	}} while (0)
 
 #define CHECK_STR(call, stype, field, value) do { \
@@ -176,6 +179,7 @@
 		        value, \
 			finfo2.stype.out.field); \
 		dump_all_info(mem_ctx, &finfo1); \
+		ret = False; \
 	}} while (0)
 
 #define CHECK_STATUS(status, correct) do { \
@@ -253,13 +257,13 @@
 	unix_to_nt_time(&sfinfo.basic_info.in.access_time, 0);
 	unix_to_nt_time(&sfinfo.basic_info.in.write_time,  0);
 	unix_to_nt_time(&sfinfo.basic_info.in.change_time, 0);
-	sfinfo.basic_info.in.attrib = FILE_ATTRIBUTE_NORMAL;
+	sfinfo.basic_info.in.attrib = 0;
 	CHECK_CALL_FNUM(BASIC_INFO, NT_STATUS_OK);
 	CHECK_TIME(ALL_INFO, all_info, create_time, basetime + 100);
 	CHECK_TIME(ALL_INFO, all_info, access_time, basetime + 200);
 	CHECK_TIME(ALL_INFO, all_info, write_time,  basetime + 300);
 	CHECK_TIME(ALL_INFO, all_info, change_time, basetime + 400);
-	CHECK_VALUE(ALL_INFO, all_info, attrib,     FILE_ATTRIBUTE_NORMAL);
+	CHECK_VALUE(ALL_INFO, all_info, attrib,     FILE_ATTRIBUTE_READONLY);
 
 	printf("test basic_information level\n");
 	basetime += 86400;
@@ -267,20 +271,20 @@
 	unix_to_nt_time(&sfinfo.basic_info.in.access_time, basetime + 200);
 	unix_to_nt_time(&sfinfo.basic_info.in.write_time,  basetime + 300);
 	unix_to_nt_time(&sfinfo.basic_info.in.change_time, basetime + 400);
-	sfinfo.basic_info.in.attrib = FILE_ATTRIBUTE_READONLY;
+	sfinfo.basic_info.in.attrib = FILE_ATTRIBUTE_NORMAL;
 	CHECK_CALL_FNUM(BASIC_INFORMATION, NT_STATUS_OK);
 	CHECK_TIME(ALL_INFO, all_info, create_time, basetime + 100);
 	CHECK_TIME(ALL_INFO, all_info, access_time, basetime + 200);
 	CHECK_TIME(ALL_INFO, all_info, write_time,  basetime + 300);
 	CHECK_TIME(ALL_INFO, all_info, change_time, basetime + 400);
-	CHECK_VALUE(ALL_INFO, all_info, attrib,     FILE_ATTRIBUTE_READONLY);
+	CHECK_VALUE(ALL_INFO, all_info, attrib,     FILE_ATTRIBUTE_NORMAL);
 
 	CHECK_CALL_PATH(BASIC_INFORMATION, NT_STATUS_OK);
 	CHECK_TIME(ALL_INFO, all_info, create_time, basetime + 100);
 	CHECK_TIME(ALL_INFO, all_info, access_time, basetime + 200);
 	CHECK_TIME(ALL_INFO, all_info, write_time,  basetime + 300);
 	CHECK_TIME(ALL_INFO, all_info, change_time, basetime + 400);
-	CHECK_VALUE(ALL_INFO, all_info, attrib,     FILE_ATTRIBUTE_READONLY);
+	CHECK_VALUE(ALL_INFO, all_info, attrib,     FILE_ATTRIBUTE_NORMAL);
 
 	printf("a zero time means don't change\n");
 	unix_to_nt_time(&sfinfo.basic_info.in.create_time, 0);



More information about the samba-cvs mailing list