From 2b1e81df06dcca5212dd4887ea09db0544f6e11b Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Tue, 16 May 2023 17:19:20 +0200 Subject: Tweak tramp-test45-asynchronous-requests * test/lisp/net/tramp-tests.el (tramp-use-connection-share): Declare. (tramp--test-putty-p): New defun. (tramp-test45-asynchronous-requests): Tweak test. --- test/lisp/net/tramp-tests.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test') diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 840decbf5d5..6c773908e26 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -73,6 +73,7 @@ (defvar tramp-persistency-file-name) (defvar tramp-remote-path) (defvar tramp-remote-process-environment) +(defvar tramp-use-connection-share) ;; Needed for Emacs 27. (defvar lock-file-name-transforms) @@ -6933,6 +6934,13 @@ This does not support external Emacs calls." "Check, whether an out-of-band method is used." (tramp-method-out-of-band-p tramp-test-vec 1)) +(defun tramp--test-putty-p () + "Check, whether the method method usaes PuTTY. +This does not support connection share for more than two connections." + (member + (file-remote-p ert-remote-temporary-file-directory 'method) + '("plink" "plinkx" "pscp" "psftp"))) + (defun tramp--test-rclone-p () "Check, whether the remote host is offered by rclone. This requires restrictions of file name syntax." @@ -7486,6 +7494,10 @@ process sentinels. They shall not disturb each other." (string-to-number (getenv "REMOTE_PARALLEL_PROCESSES")))) ((getenv "EMACS_HYDRA_CI") 5) (t 10))) + ;; PuTTY-based methods can only share up to 10 connections. + (tramp-use-connection-share + (if (and (tramp--test-putty-p) (>= number-proc 10)) + 'suppress (bound-and-true-p tramp-use-connection-share))) ;; On hydra, timings are bad. (timer-repeat (cond -- cgit v1.2.1