diff options
author | Jeremy Allison <jra@samba.org> | 2004-06-09 00:07:59 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:56:37 -0500 |
commit | 73c077d37b69267646986ea3fc2ed99d7ef15d4c (patch) | |
tree | d4aee29b98cbb3d6068c6234a78fbc3206ab9d94 /source4/torture | |
parent | a125e49d6740c44a36e6d5a1af33700163a11e95 (diff) | |
download | samba-73c077d37b69267646986ea3fc2ed99d7ef15d4c.tar.gz samba-73c077d37b69267646986ea3fc2ed99d7ef15d4c.tar.bz2 samba-73c077d37b69267646986ea3fc2ed99d7ef15d4c.zip |
r1091: Added in timing tests for deferred opens. Added extra debug info to signing
mistakes.
Jeremy.
(This used to be commit 5c3a2417cfe1bdbdfb35d933d49f77f6696790b3)
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/torture.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source4/torture/torture.c b/source4/torture/torture.c index 4da9592479..4d8fbd0a69 100644 --- a/source4/torture/torture.c +++ b/source4/torture/torture.c @@ -1777,13 +1777,26 @@ static BOOL run_deferopen(struct cli_state *cli, int dummy) while (i < 4) { int fnum = -1; + do { + struct timeval tv_start, tv_end; + GetTimeOfDay(&tv_start); fnum = cli_nt_create_full(cli->tree, fname, 0, GENERIC_RIGHTS_FILE_ALL_ACCESS, FILE_ATTRIBUTE_NORMAL, NTCREATEX_SHARE_ACCESS_NONE, NTCREATEX_DISP_OPEN_IF, 0, 0); if (fnum != -1) { break; } + GetTimeOfDay(&tv_end); + if (NT_STATUS_EQUAL(cli_nt_error(cli->tree),NT_STATUS_SHARING_VIOLATION)) { + /* Sharing violation errors need to be 1 second apart. */ + long long tdif = usec_time_diff(&tv_end, &tv_start); + if (tdif < 500000 || tdif > 1500000) { + fprintf(stderr,"Timing incorrect %lld.%lld for share violation\n", + tdif / (long long)1000000, + tdif % (long long)1000000); + } + } } while (NT_STATUS_EQUAL(cli_nt_error(cli->tree),NT_STATUS_SHARING_VIOLATION)); if (fnum == -1) { |