[SCM] Samba Shared Repository - branch v4-0-test updated -
release-4-0-0alpha3-79-g9c18cf6
Stefan Metzmacher
metze at samba.org
Tue Apr 8 17:43:07 GMT 2008
The branch, v4-0-test has been updated
via 9c18cf670889c9eb8c12b505c3b9ce5f9a516839 (commit)
from 751ab2992afd13548af6e67a03d3ced566cb136f (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test
- Log -----------------------------------------------------------------
commit 9c18cf670889c9eb8c12b505c3b9ce5f9a516839
Author: Stefan Metzmacher <metze at samba.org>
Date: Tue Apr 8 19:04:44 2008 +0200
BASE-DELAYWRITE: be more friendly to filesystems without high resolution timestamps
metze
-----------------------------------------------------------------------
Summary of changes:
source/torture/basic/delaywrite.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/torture/basic/delaywrite.c b/source/torture/basic/delaywrite.c
index bc1cdbc..84adfef 100644
--- a/source/torture/basic/delaywrite.c
+++ b/source/torture/basic/delaywrite.c
@@ -632,9 +632,20 @@ static bool test_finfo_after_write(struct torture_context *tctx, struct smbcli_s
}
#define COMPARE_WRITE_TIME_CMP(given, correct, cmp) do { \
+ uint64_t r = 10*1000*1000; \
NTTIME g = (given).basic_info.out.write_time; \
+ NTTIME gr = (g / r) * r; \
NTTIME c = (correct).basic_info.out.write_time; \
- if (g cmp c) { \
+ NTTIME cr = (c / r) * r; \
+ bool strict = torture_setting_bool(tctx, "strict mode", false); \
+ bool err = false; \
+ if (strict && (g cmp c)) { \
+ err = true; \
+ } else if (gr cmp cr) { \
+ /* handle filesystem without high resolution timestamps */ \
+ err = true; \
+ } \
+ if (err) { \
torture_result(tctx, TORTURE_FAIL, __location__": wrong write_time (%s)%s(%llu) %s (%s)%s(%llu)", \
#given, nt_time_string(tctx, g), (unsigned long long)g, \
#cmp, #correct, nt_time_string(tctx, c), (unsigned long long)c); \
--
Samba Shared Repository
More information about the samba-cvs
mailing list