diff options
author | Jeremy Allison <jra@samba.org> | 2004-06-08 19:25:26 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:56:37 -0500 |
commit | a125e49d6740c44a36e6d5a1af33700163a11e95 (patch) | |
tree | 7b0d8ab816568e942255b9466ca4e7ae17811a56 /source4/torture/basic | |
parent | eaae8b6f5f21c758db90a1008e91967fcfbc3513 (diff) | |
download | samba-a125e49d6740c44a36e6d5a1af33700163a11e95.tar.gz samba-a125e49d6740c44a36e6d5a1af33700163a11e95.tar.bz2 samba-a125e49d6740c44a36e6d5a1af33700163a11e95.zip |
r1086: Add defer open test to check timeout on sharing violation open.
This has found some signing errors in the Samba3.0 implementation
of the deferred open code. Still working on these...
Jeremy
(This used to be commit 0068cb12ef91515a95f17a1be7dfbc83fbb89eba)
Diffstat (limited to 'source4/torture/basic')
-rw-r--r-- | source4/torture/basic/denytest.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/source4/torture/basic/denytest.c b/source4/torture/basic/denytest.c index 102b44fbd3..13cb38633c 100644 --- a/source4/torture/basic/denytest.c +++ b/source4/torture/basic/denytest.c @@ -1409,6 +1409,7 @@ BOOL torture_denytest1(int dummy) int fnum1, fnum2; int i; BOOL correct = True; + struct timeval tv, tv_start; const char *fnames[2] = {"\\denytest1.dat", "\\denytest1.exe"}; if (!torture_open_connection(&cli1)) { @@ -1428,6 +1429,8 @@ BOOL torture_denytest1(int dummy) printf("testing %d entries\n", ARRAY_SIZE(denytable1)); + GetTimeOfDay(&tv_start); + for (i=0; i<ARRAY_SIZE(denytable1); i++) { enum deny_result res; const char *fname = fnames[denytable1[i].isexe]; @@ -1461,7 +1464,12 @@ BOOL torture_denytest1(int dummy) } if (torture_showall || res != denytable1[i].result) { - printf("%s %8s %10s %8s %10s %s (correct=%s)\n", + long long tdif; + GetTimeOfDay(&tv); + tdif = usec_time_diff(&tv, &tv_start); + tdif /= 1000; + printf("%lld: %s %8s %10s %8s %10s %s (correct=%s)\n", + tdif, fname, denystr(denytable1[i].deny1), openstr(denytable1[i].mode1), @@ -1498,6 +1506,7 @@ BOOL torture_denytest2(int dummy) int i; BOOL correct = True; const char *fnames[2] = {"\\denytest2.dat", "\\denytest2.exe"}; + struct timeval tv, tv_start; if (!torture_open_connection(&cli1) || !torture_open_connection(&cli2)) { return False; @@ -1514,6 +1523,8 @@ BOOL torture_denytest2(int dummy) cli_close(cli1->tree, fnum1); } + GetTimeOfDay(&tv_start); + for (i=0; i<ARRAY_SIZE(denytable2); i++) { enum deny_result res; const char *fname = fnames[denytable2[i].isexe]; @@ -1547,7 +1558,12 @@ BOOL torture_denytest2(int dummy) } if (torture_showall || res != denytable2[i].result) { - printf("%s %8s %10s %8s %10s %s (correct=%s)\n", + long long tdif; + GetTimeOfDay(&tv); + tdif = usec_time_diff(&tv, &tv_start); + tdif /= 1000; + printf("%lld: %s %8s %10s %8s %10s %s (correct=%s)\n", + tdif, fname, denystr(denytable2[i].deny1), openstr(denytable2[i].mode1), |