(or (null program) tramp-process-connection-type))
(bmp (and (buffer-live-p buffer) (buffer-modified-p buffer)))
(name1 name)
- (i 0))
+ (i 0)
+ ;; We do not want to run timers.
+ timer-list timer-idle-list)
(while (get-process name1)
;; NAME must be unique as process name.
;; The default directory must be remote.
(let ((default-directory
(file-name-directory (if t1 filename newname)))
- (process-environment (copy-sequence process-environment)))
+ (process-environment (copy-sequence process-environment))
+ ;; We do not want to run timers.
+ timer-list timer-idle-list)
;; Set the transfer process properties.
(tramp-set-connection-property
v "process-name" (buffer-name (current-buffer)))
;; We do not want to raise an error when
;; `start-file-process' has been started several times in
;; `eshell' and friends.
- (tramp-current-connection nil)
+ tramp-current-connection
+ ;; We do not want to run timers.
+ timer-list timer-idle-list
p)
(while (get-process name1)
(expand-file-name
tramp-temp-name-prefix
(tramp-compat-temporary-file-directory))))
- (args (list (concat "//" host "/" share) "-E")))
+ (args (list (concat "//" host "/" share) "-E"))
+ ;; We do not want to run timers.
+ timer-list timer-idle-list)
(if (not (zerop (length user)))
(setq args (append args (list "-U" user)))
(let* ((share (tramp-smb-get-share v))
(localname (replace-regexp-in-string
"\\\\" "/" (tramp-smb-get-localname v)))
- (args (list (concat "//" host "/" share) "-E")))
+ (args (list (concat "//" host "/" share) "-E"))
+ ;; We do not want to run timers.
+ timer-list timer-idle-list)
(if (not (zerop (length user)))
(setq args (append args (list "-U" user)))
(let* ((name (file-name-nondirectory program))
(name1 name)
(i 0)
+ ;; We do not want to run timers.
+ timer-list timer-idle-list
input tmpinput outbuf command ret)
;; Determine input.
"\\\\" "/" (tramp-smb-get-localname v)))
(args (list (concat "//" host "/" share) "-E" "-S"
(replace-regexp-in-string
- "\n" "," acl-string))))
+ "\n" "," acl-string)))
+ ;; We do not want to run timers.
+ timer-list timer-idle-list)
(if (not (zerop (length user)))
(setq args (append args (list "-U" user)))
(command (mapconcat 'identity (cons program args) " "))
(bmp (and (buffer-live-p buffer) (buffer-modified-p buffer)))
(name1 name)
- (i 0))
+ (i 0)
+ ;; We do not want to run timers.
+ timer-list timer-idle-list)
(unwind-protect
(save-excursion
(save-restriction
This is needed in order to hide `last-coding-system-used', which is set
for process communication also."
(with-current-buffer (process-buffer proc)
- (let (buffer-read-only last-coding-system-used)
+ (let (buffer-read-only last-coding-system-used
+ ;; We do not want to run timers.
+ timer-list timer-idle-list)
;; Under Windows XP, `accept-process-output' doesn't return
;; sometimes. So we add an additional timeout. JUST-THIS-ONE
;; is set due to Bug#12145. It is an integer, in order to avoid
;; remote host, set this environment variable to "/dev/null" or
;; whatever is appropriate on your system.
+;; For slow remote connections, `tramp-test41-asynchronous-requests'
+;; might be too heavy. Setting $REMOTE_PARALLEL_PROCESSES to a proper
+;; value less than 10 could help.
+
;; A whole test run can be performed calling the command `tramp-test-all'.
;;; Code:
(inhibit-message t)
;; Do not run delayed timers.
(timer-max-repeats 0)
- ;; Number of asynchronous processes for test.
- (number-proc 10)
+ ;; Number of asynchronous processes for test. Tests on
+ ;; some machines handle less parallel processes.
+ (number-proc
+ (or
+ (ignore-errors
+ (string-to-number (getenv "REMOTE_PARALLEL_PROCESSES")))
+ 10))
;; On hydra, timings are bad.
(timer-repeat
(cond
(set-process-filter
proc
(lambda (proc string)
+ (tramp--test-message
+ "Process filter %s %s %s" proc string (current-time-string))
(with-current-buffer (process-buffer proc)
(insert string))
(unless (zerop (length string))
+ (dired-uncache (process-get proc 'foo))
(should (file-attributes (process-get proc 'foo))))))
;; Add process sentinel.
(set-process-sentinel
proc
(lambda (proc _state)
+ (tramp--test-message
+ "Process sentinel %s %s" proc (current-time-string))
+ (dired-uncache (process-get proc 'foo))
(should-not (file-attributes (process-get proc 'foo)))))))
;; Send a string. Use a random order of the buffers. Mix
(tramp--test-message
"Start action %d %s %s" count buf (current-time-string))
;; Regular operation prior process action.
+ (dired-uncache file)
(if (= count 0)
(should-not (file-attributes file))
(should (file-attributes file)))
(accept-process-output proc 0.1 nil 0)
;; Give the watchdog a chance.
(read-event nil nil 0.01)
+ (tramp--test-message
+ "Continue action %d %s %s" count buf (current-time-string))
;; Regular operation post process action.
+ (dired-uncache file)
(if (= count 2)
(should-not (file-attributes file))
(should (file-attributes file)))