From 6e66d9a95c49f867da26ca897635f5e57561d0c7 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sun, 27 Oct 2019 09:36:56 +0100 Subject: [PATCH] Some Tramp trace improvements * lisp/net/tramp.el (tramp-call-process): `result' can also be nil. * test/lisp/net/tramp-tests.el (tramp--test-timeout-handler): Improve trace format. --- lisp/net/tramp.el | 4 ++-- test/lisp/net/tramp-tests.el | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 97fcf553010..0dfde734f1d 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -4660,8 +4660,8 @@ are written with verbosity of 6." (setq error (error-message-string err) result 1))) (if (zerop (length error)) - (tramp-message vec 6 "%d\n%s" result output) - (tramp-message vec 6 "%d\n%s\n%s" result output error)) + (tramp-message vec 6 "%s\n%s" result output) + (tramp-message vec 6 "%s\n%s\n%s" result output error)) result)) (defun tramp-call-process-region diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 128d099ac24..c56c7dbbca2 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -4010,7 +4010,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (let ((proc (get-buffer-process (current-buffer)))) (when (processp proc) (tramp--test-message - "cmd: %s\n%s" (process-command proc) (buffer-string)))) + "cmd: %s\nbuf:\n%s\n---" (process-command proc) (buffer-string)))) (ert-fail (format "`%s' timed out" (ert-test-name (ert-running-test))))) (ert-deftest tramp-test29-start-file-process () -- 2.39.2