summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-06-30 08:19:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:09:39 -0500
commit4357d9f5deec7164fcb673bebe432fb7e5301cea (patch)
treeae87037ac1dd028e094bb56c3311dbdcee4db93d /source4
parentef4475adc4b8da0e3acfe6d70b2afa94a1e500cd (diff)
downloadsamba-4357d9f5deec7164fcb673bebe432fb7e5301cea.tar.gz
samba-4357d9f5deec7164fcb673bebe432fb7e5301cea.tar.bz2
samba-4357d9f5deec7164fcb673bebe432fb7e5301cea.zip
r16707: - test attrib = 0 in BASIC_INFO
- return an error when value doesn't match the expected value! metze (This used to be commit 1f0ecba77344af4dcec71143de0b14ee2565d422)
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/raw/setfileinfo.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/source4/torture/raw/setfileinfo.c b/source4/torture/raw/setfileinfo.c
index 33755e72b2..0e77c36b51 100644
--- a/source4/torture/raw/setfileinfo.c
+++ b/source4/torture/raw/setfileinfo.c
@@ -144,6 +144,7 @@ BOOL torture_raw_sfileinfo(struct torture_context *torture)
} \
if (!NT_STATUS_IS_OK(status2)) { \
printf("%s - %s\n", #call, nt_errstr(status2)); \
+ ret = False; \
} \
}} while (0)
@@ -154,6 +155,7 @@ BOOL torture_raw_sfileinfo(struct torture_context *torture)
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 @@ BOOL torture_raw_sfileinfo(struct torture_context *torture)
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 @@ BOOL torture_raw_sfileinfo(struct torture_context *torture)
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 @@ BOOL torture_raw_sfileinfo(struct torture_context *torture)
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 @@ BOOL torture_raw_sfileinfo(struct torture_context *torture)
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);