summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/raw/close.c2
-rw-r--r--source4/torture/raw/open.c4
-rw-r--r--source4/torture/raw/qfileinfo.c8
-rw-r--r--source4/torture/raw/search.c2
-rw-r--r--source4/torture/raw/setfileinfo.c2
-rw-r--r--source4/torture/torture_util.c17
6 files changed, 14 insertions, 21 deletions
diff --git a/source4/torture/raw/close.c b/source4/torture/raw/close.c
index 909c8f6c95..0180f43dd2 100644
--- a/source4/torture/raw/close.c
+++ b/source4/torture/raw/close.c
@@ -79,7 +79,7 @@ BOOL torture_raw_close(int dummy)
if (basetime != nt_time_to_unix(&finfo.all_info.out.write_time)) {
printf("Incorrect write time on file - %s - %s\n",
- time_string(mem_ctx, basetime),
+ timestring(mem_ctx, basetime),
nt_time_string(mem_ctx, &finfo.all_info.out.write_time));
dump_all_info(mem_ctx, &finfo);
ret = False;
diff --git a/source4/torture/raw/open.c b/source4/torture/raw/open.c
index d2055536a1..7c575fbe9a 100644
--- a/source4/torture/raw/open.c
+++ b/source4/torture/raw/open.c
@@ -88,8 +88,8 @@ static const char *rdwr_string(enum rdwr_mode m)
if (ABS(t1-t2) > 2) { \
printf("(%d) wrong time for field %s %s - %s\n", \
__LINE__, #field, \
- time_string(mem_ctx, t1), \
- time_string(mem_ctx, t2)); \
+ timestring(mem_ctx, t1), \
+ timestring(mem_ctx, t2)); \
dump_all_info(mem_ctx, &finfo); \
ret = False; \
}} while (0)
diff --git a/source4/torture/raw/qfileinfo.c b/source4/torture/raw/qfileinfo.c
index 15e358673d..9c1c3a9e5c 100644
--- a/source4/torture/raw/qfileinfo.c
+++ b/source4/torture/raw/qfileinfo.c
@@ -336,14 +336,14 @@ BOOL torture_raw_qfileinfo(int dummy)
s1 = fnum_find(sname); \
if (s1 && dos_nt_time_cmp(s1->stype.out.tfield, &correct_time) != 0) { \
printf("(%d) handle %s/%s incorrect - %s should be %s\n", __LINE__, #stype, #tfield, \
- time_string(mem_ctx, s1->stype.out.tfield), \
+ timestring(mem_ctx, s1->stype.out.tfield), \
nt_time_string(mem_ctx, &correct_time)); \
ret = False; \
} \
s1 = fname_find(sname); \
if (s1 && dos_nt_time_cmp(s1->stype.out.tfield, &correct_time) != 0) { \
printf("(%d) path %s/%s incorrect - %s should be %s\n", __LINE__, #stype, #tfield, \
- time_string(mem_ctx, s1->stype.out.tfield), \
+ timestring(mem_ctx, s1->stype.out.tfield), \
nt_time_string(mem_ctx, &correct_time)); \
ret = False; \
}} while (0)
@@ -352,14 +352,14 @@ BOOL torture_raw_qfileinfo(int dummy)
s1 = fnum_find(sname); \
if (s1 && unx_nt_time_cmp(s1->stype.out.tfield, &correct_time) != 0) { \
printf("(%d) handle %s/%s incorrect - %s should be %s\n", __LINE__, #stype, #tfield, \
- time_string(mem_ctx, s1->stype.out.tfield), \
+ timestring(mem_ctx, s1->stype.out.tfield), \
nt_time_string(mem_ctx, &correct_time)); \
ret = False; \
} \
s1 = fname_find(sname); \
if (s1 && unx_nt_time_cmp(s1->stype.out.tfield, &correct_time) != 0) { \
printf("(%d) path %s/%s incorrect - %s should be %s\n", __LINE__, #stype, #tfield, \
- time_string(mem_ctx, s1->stype.out.tfield), \
+ timestring(mem_ctx, s1->stype.out.tfield), \
nt_time_string(mem_ctx, &correct_time)); \
ret = False; \
}} while (0)
diff --git a/source4/torture/raw/search.c b/source4/torture/raw/search.c
index 9881a45cb1..1753d3dd37 100644
--- a/source4/torture/raw/search.c
+++ b/source4/torture/raw/search.c
@@ -198,7 +198,7 @@ static BOOL test_one_file(struct cli_state *cli, TALLOC_CTX *mem_ctx)
if (s->sname1.field1 != (~1 & nt_time_to_unix(&v.sname2.out.field2))) { \
printf("(%d) %s/%s [%s] != %s/%s [%s]\n", \
__LINE__, \
- #sname1, #field1, time_string(mem_ctx, s->sname1.field1), \
+ #sname1, #field1, timestring(mem_ctx, s->sname1.field1), \
#sname2, #field2, nt_time_string(mem_ctx, &v.sname2.out.field2)); \
ret = False; \
} \
diff --git a/source4/torture/raw/setfileinfo.c b/source4/torture/raw/setfileinfo.c
index fa286ae4da..247e54a4b0 100644
--- a/source4/torture/raw/setfileinfo.c
+++ b/source4/torture/raw/setfileinfo.c
@@ -157,7 +157,7 @@ BOOL torture_raw_sfileinfo(int dummy)
call_name, #stype, #field, \
(uint_t)value, \
(uint_t)nt_time_to_unix(&finfo2.stype.out.field)); \
- printf("\t%s", http_timestring(mem_ctx, value)); \
+ 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); \
}} while (0)
diff --git a/source4/torture/torture_util.c b/source4/torture/torture_util.c
index 57add86602..96579999c3 100644
--- a/source4/torture/torture_util.c
+++ b/source4/torture/torture_util.c
@@ -114,13 +114,14 @@ int create_complex_file(struct cli_state *cli, TALLOC_CTX *mem_ctx, const char *
printf("Failed to setup EAs\n");
}
- /* make sure all the timestamps aren't the same */
+ /* make sure all the timestamps aren't the same, and are also
+ in different DST zones*/
setfile.generic.level = RAW_SFILEINFO_SETATTRE;
setfile.generic.file.fnum = fnum;
- setfile.setattre.in.create_time = t + 60;
- setfile.setattre.in.access_time = t + 120;
- setfile.setattre.in.write_time = t + 180;
+ setfile.setattre.in.create_time = t + 9*30*24*60*60;
+ setfile.setattre.in.access_time = t + 6*30*24*60*60;
+ setfile.setattre.in.write_time = t + 3*30*24*60*60;
status = smb_raw_setfileinfo(cli->tree, &setfile);
if (!NT_STATUS_IS_OK(status)) {
@@ -212,14 +213,6 @@ BOOL wire_bad_flags(WIRE_STRING *str, int flags)
}
/*
- return a talloced string representing a time_t for human consumption
-*/
-const char *time_string(TALLOC_CTX *mem_ctx, time_t t)
-{
- return talloc_strdup(mem_ctx, http_timestring(mem_ctx, t));
-}
-
-/*
check if 2 NTTIMEs are equal
*/
BOOL nt_time_equal(NTTIME *t1, NTTIME *t2)