summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-04-03 10:43:34 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:15:52 -0500
commit18e93247aa417eaf7c8fbf649ce45726ccba7433 (patch)
treee3fd9a1d826e930375c64a3796f80b35a94b4b17
parent570b49f33faf99491220faeca98c36086fe9f71f (diff)
downloadsamba-18e93247aa417eaf7c8fbf649ce45726ccba7433.tar.gz
samba-18e93247aa417eaf7c8fbf649ce45726ccba7433.tar.bz2
samba-18e93247aa417eaf7c8fbf649ce45726ccba7433.zip
r14883: add 'smbd:sharedelay' option, so that we can speed up BASE-DENY2 in make test
as done in samba4 metze (This used to be commit b98dd258a74a1e1b4e967e6176a5a92986d03123)
-rw-r--r--source3/smbd/open.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 5de03b8dd7..ba0a16035a 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1440,6 +1440,13 @@ files_struct *open_file_ntcreate(connection_struct *conn,
lp_defer_sharing_violations()) {
struct timeval timeout;
struct deferred_open_record state;
+ int timeout_usecs;
+
+ /* this is a hack to speed up torture tests
+ in 'make test' */
+ timeout_usecs = lp_parm_int(conn->service,
+ "smbd","sharedelay",
+ SHARING_VIOLATION_USEC_WAIT);
/* This is a relative time, added to the absolute
request_time value to get the absolute timeout time.
@@ -1449,7 +1456,7 @@ files_struct *open_file_ntcreate(connection_struct *conn,
time this request mid was processed. This is what allows
the request to eventually time out. */
- timeout = timeval_set(0, SHARING_VIOLATION_USEC_WAIT);
+ timeout = timeval_set(0, timeout_usecs);
/* Nothing actually uses state.delayed_for_oplocks
but it's handy to differentiate in debug messages