emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 2b1e81df06d: Tweak tramp-test45-asynchronous-requests


From: Michael Albinus
Subject: master 2b1e81df06d: Tweak tramp-test45-asynchronous-requests
Date: Tue, 16 May 2023 11:19:38 -0400 (EDT)

branch: master
commit 2b1e81df06dcca5212dd4887ea09db0544f6e11b
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>

    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(+)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]