(skip-unless (tramp--test-enabled))
(skip-unless (tramp--test-sh-p))
+ ;; This test times out on hydra.
+ (with-timeout
+ (300 (ert-fail "`tramp-test36-asynchronous-requests' timed out"))
(let* ((tmp-name (tramp--test-make-temp-name))
(default-directory tmp-name)
;; Do not cache Tramp properties.
0 timer-repeat
(lambda ()
(when buffers
- (let ((file
+ (let ((default-directory tmp-name)
+ (file
(buffer-name (nth (random (length buffers)) buffers))))
- (funcall timer-operation file))))))
+ (tramp--test-message "Start timer %s %s" timer-operation file)
+ (funcall timer-operation file)
+ (tramp--test-message
+ "Stop timer %s %s" timer-operation file))))))
;; Create temporary buffers. The number of buffers
;; corresponds to the number of processes; it could be
;; Open asynchronous processes. Set process sentinel.
(dolist (buf buffers)
+ (tramp--test-message "Start process %s" buf)
(let ((proc
(start-file-process-shell-command
(buffer-name buf) buf
(set-process-filter
proc
(lambda (proc string)
+ (tramp--test-message "Process filter %s" proc)
(with-current-buffer (process-buffer proc)
(insert string))
(unless (zerop (length string))
(set-process-sentinel
proc
(lambda (proc _state)
+ (tramp--test-message "Process sentinel %s" proc)
(should-not (file-attributes (process-get proc 'foo)))))))
;; Send a string. Use a random order of the buffers. Mix
(should-not (file-attributes file))
(should (file-attributes file)))
;; Send string to process.
+ (tramp--test-message "Send string %s" proc)
(process-send-string proc (format "%s\n" (buffer-name buf)))
(accept-process-output proc 0.1 nil 0)
;; Regular operation.
(should (file-attributes file)))
(process-put proc 'bar (1+ count))
(unless (process-live-p proc)
+ (tramp--test-message "Buffer delete %s" buf)
(setq buffers (delq buf buffers))))))
;; Checks. All process output shall exists in the
;; respective buffers. All created files shall be deleted.
+ (tramp--test-message "Checks %s" buffers)
(dolist (buf buffers)
(with-current-buffer buf
(should (string-equal (format "%s\n" buf) (buffer-string)))))
(ignore-errors (delete-process (get-buffer-process buf)))
(ignore-errors (kill-buffer buf)))
(ignore-errors (cancel-timer timer))
- (ignore-errors (delete-directory tmp-name 'recursive)))))
+ (ignore-errors (delete-directory tmp-name 'recursive))))))
(ert-deftest tramp-test37-recursive-load ()
"Check that Tramp does not fail due to recursive load."