r14883: add 'smbd:sharedelay' option, so that we can speed up BASE-DENY2 in make...
authorStefan Metzmacher <metze@samba.org>
Mon, 3 Apr 2006 10:43:34 +0000 (10:43 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:15:52 +0000 (11:15 -0500)
as done in samba4

metze

source/smbd/open.c

index 5de03b8dd7636ff68bf33e9efb727866642101bd..ba0a16035aa92282e03e3b5264dad89c14717d77 100644 (file)
@@ -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