s4:torture: Use 65520 for maxopenfiles
authorAndreas Schneider <asn@samba.org>
Mon, 12 Nov 2018 10:51:17 +0000 (11:51 +0100)
committerJeremy Allison <jra@samba.org>
Thu, 15 Nov 2018 00:47:23 +0000 (01:47 +0100)
The socket_wrapper limit is 65535 open sockets.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/torture/smb2/maxfid.c

index dbe3fac9d397a84794ef575473854555f2182b1a..853b13de6ded3568d54e692e402aa7c65083a6e3 100644 (file)
@@ -36,7 +36,15 @@ bool torture_smb2_maxfid(struct torture_context *tctx)
        struct smb2_handle *handles,  dir_handle = { };
        size_t max_handles;
 
-       max_handles = torture_setting_int(tctx, "maxopenfiles", 0x11000);
+       /*
+        * We limited this to 65520 as socket_wrapper has a limit of
+        * 65535 (0xfff0) open sockets.
+        *
+        * It could be increased by setting the following env variable:
+        *
+        * SOCKET_WRAPPER_MAX_SOCKETS=100000
+        */
+       max_handles = torture_setting_int(tctx, "maxopenfiles", 65520);
 
        if (!torture_smb2_connection(tctx, &tree)) {
                return false;