diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2023-05-04 20:42:24 +0200 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2023-05-04 20:42:24 +0200 |
commit | 5f79d821a0651b74268cc1a27a8396a7e524a8c8 (patch) | |
tree | cb8f6ba2e47202157491658d8692c3f16275739b /test | |
parent | d3ec68f5e433e5792c1c63672c7b437bb29c5759 (diff) | |
download | emacs-5f79d821a0651b74268cc1a27a8396a7e524a8c8.tar.gz |
Suspend timers when reading Tramp process output
* lisp/net/tramp-compat.el (xdg): Require.
(tramp-compat-temporary-file-directory): Set it to
$XDG_CACHE_HOME/emacs if possible.
* lisp/net/tramp.el (tramp-debug-to-file): Fix docstring.
(tramp-wrong-passwd-regexp): Add "Authentication failed" string
(from doas).
(tramp-debug-message): Simplify backtrace check.
(with-tramp-locked-connection): Suppress timers. (Bug#49954, Bug60534)
* test/lisp/net/tramp-tests.el (tramp-test09-insert-file-contents):
Adapt test.
(tramp-test45-asynchronous-requests): Remove :unstable tag.
Adapt test.
Diffstat (limited to 'test')
-rw-r--r-- | test/lisp/net/tramp-tests.el | 39 |
1 files changed, 18 insertions, 21 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 8e4e7122a27..840decbf5d5 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -2440,15 +2440,19 @@ This checks also `file-name-as-directory', `file-name-directory', `(,(expand-file-name tmp-name) 0))) (should (string-equal (buffer-string) "foo")) (should (= point (point)))) - (let ((point (point))) - (replace-string-in-region "foo" "bar" (point-min) (point-max)) - (goto-char point) - (should - (equal - (insert-file-contents tmp-name nil nil nil 'replace) - `(,(expand-file-name tmp-name) 3))) - (should (string-equal (buffer-string) "foo")) - (should (= point (point)))) + ;; Insert another string. + ;; `replace-string-in-region' was introduced in Emacs 28.1. + (when (tramp--test-emacs28-p) + (let ((point (point))) + (with-no-warnings + (replace-string-in-region "foo" "bar" (point-min) (point-max))) + (goto-char point) + (should + (equal + (insert-file-contents tmp-name nil nil nil 'replace) + `(,(expand-file-name tmp-name) 3))) + (should (string-equal (buffer-string) "foo")) + (should (= point (point))))) ;; Error case. (delete-file tmp-name) (should-error @@ -7444,12 +7448,7 @@ This is needed in timer functions as well as process filters and sentinels." "Check parallel asynchronous requests. Such requests could arrive from timers, process filters and process sentinels. They shall not disturb each other." - ;; :tags (append '(:expensive-test :tramp-asynchronous-processes) - ;; (and (or (getenv "EMACS_HYDRA_CI") - ;; (getenv "EMACS_EMBA_CI")) - ;; '(:unstable))) - ;; It doesn't work sufficiently. - :tags '(:expensive-test :tramp-asynchronous-processes :unstable) + :tags '(:expensive-test :tramp-asynchronous-processes) (skip-unless (tramp--test-enabled)) (skip-unless (tramp--test-supports-processes-p)) (skip-unless (not (tramp--test-container-p))) @@ -7517,14 +7516,12 @@ process sentinels. They shall not disturb each other." (when buffers (let ((time (float-time)) (default-directory tmp-name) - (file (buffer-name (seq-random-elt buffers))) - ;; A remote operation in a timer could - ;; confuse Tramp heavily. So we ignore this - ;; error here. - (debug-ignored-errors - (cons 'remote-file-error debug-ignored-errors))) + (file (buffer-name (seq-random-elt buffers)))) (tramp--test-message "Start timer %s %s" file (current-time-string)) + (dired-uncache file) + (tramp--test-message + "Continue timer %s %s" file (file-attributes file)) (vc-registered file) (tramp--test-message "Stop timer %s %s" file (current-time-string)) |