* lisp/net/tramp-sh.el (tramp-find-shell, tramp-find-inline-compress)
(tramp-get-remote-path):
* lisp/net/tramp-smb.el (tramp-smb-handle-process-file):
Use `tramp-warning'.
* test/lisp/net/tramp-tests.el (tramp--test-container-p):
Add "kubernetes", "run0" and "nspawn".
(tramp--test-toolbox-p): New defun.
(tramp-test45-asynchronous-requests): Use it.
(tramp--test-check-files): Adapt regexp.
(cherry picked from commit
3c238f7c50427942a200d38738bd92dad98a3928)
;; Maybe it works at least for some other commands.
(prog1
default-shell
- (tramp-message
- vec 2
+ (tramp-warning
+ vec
(concat
"Couldn't find a remote shell which groks tilde "
"expansion, using `%s'")
(tramp-set-connection-property p "inline-compress" nil)
(tramp-set-connection-property p "inline-decompress" nil)
- (tramp-message
- vec 2 "Couldn't find an inline transfer compress command")))))
+ (tramp-warning
+ vec "Couldn't find an inline transfer compress command")))))
(defun tramp-ssh-option-exists-p (vec option)
"Check, whether local ssh OPTION is applicable."
(tramp-shell-quote-argument tramp-end-of-heredoc))
'noerror (rx (literal tramp-end-of-heredoc)))
(progn
- (tramp-message
- vec 2 "Could not retrieve `tramp-own-remote-path'")
+ (tramp-warning
+ vec "Could not retrieve `tramp-own-remote-path'")
nil)))))
;; Replace place holder `tramp-default-remote-path'.
((car destination)
(setq outbuf (current-buffer))))
;; stderr.
- (tramp-message v 2 "%s" "STDERR not supported"))
+ (tramp-warning v "%s" "STDERR not supported"))
;; 't
(destination
(setq outbuf (current-buffer))))
(when (and (not (tramp-compat-connection-local-p
tramp-direct-async-process))
(tramp-connection-property-p v "direct-async-process"))
- (let ((msg (concat "Connection property \"direct-async-process\" is deprecated, "
- "use connection-local variable `tramp-direct-async-process'\n"
- "See (info \"(tramp) Improving performance of "
- "asynchronous remote processes\")")))
+ (let ((msg (concat
+ "Connection property \"direct-async-process\" is deprecated, "
+ "use connection-local variable `tramp-direct-async-process'\n"
+ "See (info \"(tramp) Improving performance of "
+ "asynchronous remote processes\")")))
(if (tramp-get-connection-property
tramp-null-hop "direct-async-process-warned")
(tramp-message v 2 msg)
"Check, whether a container method is used.
This does not support some special file names."
(string-match-p
- (rx bol (| "docker" "podman" "apptainer"))
+ (rx bol (| "docker" "podman" "kubernetes" "apptainer" "run0" "nspawn"))
(file-remote-p ert-remote-temporary-file-directory 'method)))
(defun tramp--test-container-oob-p ()
(string-equal
"telnet" (file-remote-p ert-remote-temporary-file-directory 'method)))
+(defun tramp--test-toolbox-p ()
+ "Check, whether the toolbox method is used.
+This does not support `tramp-test45-asynchronous-requests'."
+ (string-equal
+ "toolbox" (file-remote-p ert-remote-temporary-file-directory 'method)))
+
(defun tramp--test-windows-nt-p ()
"Check, whether the locale host runs MS Windows."
(eq system-type 'windows-nt))
'(tramp--test-async-shell-command))))
(with-temp-buffer
(funcall this-shell-command "cat -- *" (current-buffer))
- (should (string-equal elt (buffer-string)))))))
+ (should
+ (string-match-p
+ (rx (literal elt) eol) (buffer-string)))))))
(delete-file file2)
(should-not (file-exists-p file2))
(skip-unless (tramp--test-enabled))
(skip-unless (tramp--test-supports-processes-p))
(skip-unless (not (tramp--test-container-p)))
- (skip-unless (not (tramp--test-telnet-p)))
(skip-unless (not (tramp--test-sshfs-p)))
+ (skip-unless (not (tramp--test-telnet-p)))
+ (skip-unless (not (tramp--test-toolbox-p)))
(skip-unless (not (tramp--test-windows-nt-p)))
(with-timeout