From 18e93247aa417eaf7c8fbf649ce45726ccba7433 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 3 Apr 2006 10:43:34 +0000 Subject: 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) --- source3/smbd/open.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source3/smbd') 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 -- cgit