diff options
| author | Michael Albinus | 2021-05-07 13:04:28 +0200 |
|---|---|---|
| committer | Michael Albinus | 2021-05-07 13:04:28 +0200 |
| commit | 70bfcbcdd328775d0fcac5ec06b797e227fc032a (patch) | |
| tree | 20fb2b7bd138022b9bf1cb50fc264a74119443d9 /test | |
| parent | 704755a568300985caa9e143f46f17d364e5eda9 (diff) | |
| download | emacs-70bfcbcdd328775d0fcac5ec06b797e227fc032a.tar.gz emacs-70bfcbcdd328775d0fcac5ec06b797e227fc032a.zip | |
Tune Tramp traces
* doc/misc/tramp.texi (Traces and Profiles): Describe call traces.
* lisp/net/tramp-compat.el: Add `tramp-suppress-trace' property for all
functions.
* lisp/net/tramp.el (tramp-verbose): Adapt docstring.
(tramp-file-name-method, tramp-file-name-user)
(tramp-file-name-domain, tramp-file-name-host)
(tramp-file-name-port, tramp-file-name-localname)
(tramp-file-name-hop, tramp-file-name-user-domain)
(tramp-file-name-host-port, tramp-file-name-port-or-default)
(tramp-tramp-file-p, tramp-find-method, tramp-find-user)
(tramp-find-host, tramp-dissect-file-name)
(tramp-dissect-hop-name, tramp-debug-buffer-name)
(tramp-debug-outline-level, tramp-get-debug-buffer)
(tramp-get-debug-file-name, tramp-read-passwd)
(tramp-clear-passwd): Add `tramp-suppress-trace' property.
(tramp-debug-message): Activate call traces.
* test/lisp/net/tramp-tests.el (tramp--test-instrument-test-case): Simplify.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/net/tramp-tests.el | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 3a199469d6b..0f6f3b79800 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el | |||
| @@ -195,9 +195,6 @@ is greater than 10. | |||
| 195 | "^error with add-name-to-file") | 195 | "^error with add-name-to-file") |
| 196 | debug-ignored-errors)) | 196 | debug-ignored-errors)) |
| 197 | inhibit-message) | 197 | inhibit-message) |
| 198 | (when trace-buffer | ||
| 199 | (dolist (elt (all-completions "tramp-" obarray 'functionp)) | ||
| 200 | (trace-function-background (intern elt)))) | ||
| 201 | (unwind-protect | 198 | (unwind-protect |
| 202 | (let ((tramp--test-instrument-test-case-p t)) ,@body) | 199 | (let ((tramp--test-instrument-test-case-p t)) ,@body) |
| 203 | ;; Unwind forms. | 200 | ;; Unwind forms. |
| @@ -205,13 +202,12 @@ is greater than 10. | |||
| 205 | (untrace-all)) | 202 | (untrace-all)) |
| 206 | (when (and (null tramp--test-instrument-test-case-p) (> tramp-verbose 3)) | 203 | (when (and (null tramp--test-instrument-test-case-p) (> tramp-verbose 3)) |
| 207 | (dolist | 204 | (dolist |
| 208 | (buf (if trace-buffer | 205 | (buf (append |
| 209 | (cons (get-buffer trace-buffer) (tramp-list-tramp-buffers)) | 206 | (tramp-list-tramp-buffers) |
| 210 | (tramp-list-tramp-buffers))) | 207 | (and trace-buffer (list (get-buffer trace-buffer))))) |
| 211 | (with-current-buffer buf | 208 | (with-current-buffer buf |
| 212 | (message ";; %s\n%s" buf (buffer-string))))) | 209 | (message ";; %s\n%s" buf (buffer-string))) |
| 213 | (when trace-buffer | 210 | (kill-buffer buf)))))) |
| 214 | (kill-buffer trace-buffer))))) | ||
| 215 | 211 | ||
| 216 | (defsubst tramp--test-message (fmt-string &rest arguments) | 212 | (defsubst tramp--test-message (fmt-string &rest arguments) |
| 217 | "Emit a message into ERT *Messages*." | 213 | "Emit a message into ERT *Messages*." |