diff options
| author | Michael Albinus | 2020-06-09 13:43:30 +0200 |
|---|---|---|
| committer | Michael Albinus | 2020-06-09 13:43:30 +0200 |
| commit | 4b21759b6f06f4560e5c8d7e4c52ce5c55393957 (patch) | |
| tree | daaec99610479ff2e0494630396bcd3bcea2c7c6 | |
| parent | 3b93549597f187989e5508b638f297d0244e5cc6 (diff) | |
| download | emacs-4b21759b6f06f4560e5c8d7e4c52ce5c55393957.tar.gz emacs-4b21759b6f06f4560e5c8d7e4c52ce5c55393957.zip | |
Continue implementation of tramp-crypt.el
* lisp/net/tramp-crypt.el (tramp-crypt-do-encrypt-or-decrypt-file):
Add leading "/" to infile.
(tramp-crypt-add-directory): Fix docstring. Expand NAME.
(tramp-crypt-remove-directory)
(tramp-crypt-handle-file-name-all-completions)
(tramp-crypt-handle-set-file-times): New defuns.
(tramp-crypt-handle-file-executable-p)
(tramp-crypt-handle-file-readable-p)
(tramp-crypt-handle-file-system-info)
(tramp-crypt-handle-set-file-modes): Fix implementation.
* test/lisp/net/tramp-tests.el: Adapt call convention
for (tramp--test-crypt-p).
| -rw-r--r-- | lisp/net/tramp-crypt.el | 87 | ||||
| -rw-r--r-- | test/lisp/net/tramp-tests.el | 32 |
2 files changed, 80 insertions, 39 deletions
diff --git a/lisp/net/tramp-crypt.el b/lisp/net/tramp-crypt.el index 220a4add91f..d9ba2e49f76 100644 --- a/lisp/net/tramp-crypt.el +++ b/lisp/net/tramp-crypt.el | |||
| @@ -67,8 +67,6 @@ | |||
| 67 | 67 | ||
| 68 | ;; If a remote directory shall not include crypted files anymore, it | 68 | ;; If a remote directory shall not include crypted files anymore, it |
| 69 | ;; must be indicated by the command `tramp-crypt-remove-directory'. | 69 | ;; must be indicated by the command `tramp-crypt-remove-directory'. |
| 70 | ;; Existing crypted files will be transformed into their unencrypted | ||
| 71 | ;; file names and contents. | ||
| 72 | 70 | ||
| 73 | ;;; Code: | 71 | ;;; Code: |
| 74 | 72 | ||
| @@ -160,7 +158,7 @@ If NAME doesn't belong to a crypted remote directory, retun nil." | |||
| 160 | (directory-files-and-attributes | 158 | (directory-files-and-attributes |
| 161 | . tramp-handle-directory-files-and-attributes) | 159 | . tramp-handle-directory-files-and-attributes) |
| 162 | (dired-compress-file . ignore) | 160 | (dired-compress-file . ignore) |
| 163 | ;; (dired-uncache . tramp-crypt-handle-dired-uncache) | 161 | (dired-uncache . tramp-handle-dired-uncache) |
| 164 | (exec-path . ignore) | 162 | (exec-path . ignore) |
| 165 | ;; `expand-file-name' performed by default handler. | 163 | ;; `expand-file-name' performed by default handler. |
| 166 | (file-accessible-directory-p . tramp-handle-file-accessible-directory-p) | 164 | (file-accessible-directory-p . tramp-handle-file-accessible-directory-p) |
| @@ -173,10 +171,10 @@ If NAME doesn't belong to a crypted remote directory, retun nil." | |||
| 173 | (file-in-directory-p . tramp-handle-file-in-directory-p) | 171 | (file-in-directory-p . tramp-handle-file-in-directory-p) |
| 174 | (file-local-copy . tramp-handle-file-local-copy) | 172 | (file-local-copy . tramp-handle-file-local-copy) |
| 175 | (file-modes . tramp-handle-file-modes) | 173 | (file-modes . tramp-handle-file-modes) |
| 176 | ;; (file-name-all-completions . tramp-crypt-handle-file-name-all-completions) | 174 | (file-name-all-completions . tramp-crypt-handle-file-name-all-completions) |
| 177 | ;; `file-name-as-directory' performed by default handler. | 175 | ;; `file-name-as-directory' performed by default handler. |
| 178 | ;; (file-name-case-insensitive-p . ignore) | 176 | (file-name-case-insensitive-p . ignore) |
| 179 | ;; (file-name-completion . tramp-handle-file-name-completion) | 177 | (file-name-completion . tramp-handle-file-name-completion) |
| 180 | ;; `file-name-directory' performed by default handler. | 178 | ;; `file-name-directory' performed by default handler. |
| 181 | ;; `file-name-nondirectory' performed by default handler. | 179 | ;; `file-name-nondirectory' performed by default handler. |
| 182 | ;; `file-name-sans-versions' performed by default handler. | 180 | ;; `file-name-sans-versions' performed by default handler. |
| @@ -193,11 +191,11 @@ If NAME doesn't belong to a crypted remote directory, retun nil." | |||
| 193 | (file-system-info . tramp-crypt-handle-file-system-info) | 191 | (file-system-info . tramp-crypt-handle-file-system-info) |
| 194 | ;; (file-truename . tramp-crypt-handle-file-truename) | 192 | ;; (file-truename . tramp-crypt-handle-file-truename) |
| 195 | ;; (file-writable-p . ignore) | 193 | ;; (file-writable-p . ignore) |
| 196 | (find-backup-file-name . ignore) | 194 | (find-backup-file-name . tramp-handle-find-backup-file-name) |
| 197 | ;; `get-file-buffer' performed by default handler. | 195 | ;; `get-file-buffer' performed by default handler. |
| 198 | (insert-directory . tramp-crypt-handle-insert-directory) | 196 | (insert-directory . tramp-crypt-handle-insert-directory) |
| 199 | ;; `insert-file-contents' performed by default handler. | 197 | ;; `insert-file-contents' performed by default handler. |
| 200 | ;; (load . tramp-crypt-handle-load) | 198 | (load . tramp-handle-load) |
| 201 | (make-auto-save-file-name . tramp-handle-make-auto-save-file-name) | 199 | (make-auto-save-file-name . tramp-handle-make-auto-save-file-name) |
| 202 | (make-directory . tramp-crypt-handle-make-directory) | 200 | (make-directory . tramp-crypt-handle-make-directory) |
| 203 | ;; (make-directory-internal . tramp-crypt-handle-not-implemented) | 201 | ;; (make-directory-internal . tramp-crypt-handle-not-implemented) |
| @@ -209,8 +207,8 @@ If NAME doesn't belong to a crypted remote directory, retun nil." | |||
| 209 | (set-file-acl . ignore) | 207 | (set-file-acl . ignore) |
| 210 | (set-file-modes . tramp-crypt-handle-set-file-modes) | 208 | (set-file-modes . tramp-crypt-handle-set-file-modes) |
| 211 | (set-file-selinux-context . ignore) | 209 | (set-file-selinux-context . ignore) |
| 212 | ;; (set-file-times . tramp-crypt-handle-not-implemented) | 210 | (set-file-times . tramp-crypt-handle-set-file-times) |
| 213 | ;; (set-visited-file-modtime . tramp-handle-set-visited-file-modtime) | 211 | (set-visited-file-modtime . tramp-handle-set-visited-file-modtime) |
| 214 | (shell-command . ignore) | 212 | (shell-command . ignore) |
| 215 | (start-file-process . ignore) | 213 | (start-file-process . ignore) |
| 216 | ;; `substitute-in-file-name' performed by default handler. | 214 | ;; `substitute-in-file-name' performed by default handler. |
| @@ -218,7 +216,7 @@ If NAME doesn't belong to a crypted remote directory, retun nil." | |||
| 218 | ;; `tramp-set-file-uid-gid' performed by default handler. | 216 | ;; `tramp-set-file-uid-gid' performed by default handler. |
| 219 | ;; (unhandled-file-name-directory . ignore) | 217 | ;; (unhandled-file-name-directory . ignore) |
| 220 | (vc-registered . ignore) | 218 | (vc-registered . ignore) |
| 221 | ;; (verify-visited-file-modtime . tramp-handle-verify-visited-file-modtime) | 219 | (verify-visited-file-modtime . tramp-handle-verify-visited-file-modtime) |
| 222 | (write-region . tramp-handle-write-region)) | 220 | (write-region . tramp-handle-write-region)) |
| 223 | "Alist of handler functions for crypt method. | 221 | "Alist of handler functions for crypt method. |
| 224 | Operations not mentioned here will be handled by the default Emacs primitives.") | 222 | Operations not mentioned here will be handled by the default Emacs primitives.") |
| @@ -434,7 +432,8 @@ If OP ist `decrypt', the basename of INFILE must be an encrypted file name." | |||
| 434 | (if (eq op 'encrypt) 'raw-text coding-system-for-write))) | 432 | (if (eq op 'encrypt) 'raw-text coding-system-for-write))) |
| 435 | (tramp-crypt-send-command | 433 | (tramp-crypt-send-command |
| 436 | crypt-vec "cat" (and (eq op 'encrypt) "--reverse") | 434 | crypt-vec "cat" (and (eq op 'encrypt) "--reverse") |
| 437 | (file-name-directory infile) (file-name-nondirectory infile)) | 435 | (file-name-directory infile) |
| 436 | (concat "/" (file-name-nondirectory infile))) | ||
| 438 | (with-current-buffer (tramp-get-connection-buffer crypt-vec) | 437 | (with-current-buffer (tramp-get-connection-buffer crypt-vec) |
| 439 | (write-region nil nil outfile))))) | 438 | (write-region nil nil outfile))))) |
| 440 | 439 | ||
| @@ -452,18 +451,35 @@ See `tramp-crypt-do-encrypt-or-decrypt-file'." | |||
| 452 | (defun tramp-crypt-add-directory (name) | 451 | (defun tramp-crypt-add-directory (name) |
| 453 | "Mark remote directory NAME for encryption. | 452 | "Mark remote directory NAME for encryption. |
| 454 | Files in that directory and all subdirectories will be encrypted | 453 | Files in that directory and all subdirectories will be encrypted |
| 455 | bofore copying to, and decrypted after copying from that | 454 | before copying to, and decrypted after copying from that |
| 456 | directory. File names will be also encrypted." | 455 | directory. File names will be also encrypted." |
| 457 | (interactive "DRemote directory name: ") | 456 | (interactive "DRemote directory name: ") |
| 458 | (unless tramp-crypt-enabled | 457 | (unless tramp-crypt-enabled |
| 459 | (tramp-user-error nil "Feature is not enabled.")) | 458 | (tramp-user-error nil "Feature is not enabled.")) |
| 460 | (unless (and (tramp-tramp-file-p name) (file-directory-p name)) | 459 | (unless (and (tramp-tramp-file-p name) (file-directory-p name)) |
| 461 | (tramp-user-error nil "%s must be an existing remote directory." name)) | 460 | (tramp-user-error nil "%s must be an existing remote directory." name)) |
| 462 | (setq name (file-name-as-directory name)) | 461 | (setq name (file-name-as-directory (expand-file-name name))) |
| 463 | (unless (member name tramp-crypt-directories) | 462 | (unless (member name tramp-crypt-directories) |
| 464 | (setq tramp-crypt-directories `(,name . ,tramp-crypt-directories))) | 463 | (setq tramp-crypt-directories (cons name tramp-crypt-directories))) |
| 465 | (tramp-register-file-name-handlers)) | 464 | (tramp-register-file-name-handlers)) |
| 466 | 465 | ||
| 466 | (defun tramp-crypt-remove-directory (name) | ||
| 467 | "Unmark remote directory NAME for encryption. | ||
| 468 | Existing files in that directory and its subdirectories will be | ||
| 469 | kept in their encrypted form." | ||
| 470 | (interactive "DRemote directory name: ") | ||
| 471 | (unless tramp-crypt-enabled | ||
| 472 | (tramp-user-error nil "Feature is not enabled.")) | ||
| 473 | (setq name (file-name-as-directory (expand-file-name name))) | ||
| 474 | (when (and (member name tramp-crypt-directories) | ||
| 475 | (delete | ||
| 476 | tramp-crypt-encfs-config | ||
| 477 | (directory-files name nil directory-files-no-dot-files-regexp)) | ||
| 478 | (yes-or-no-p | ||
| 479 | "There exist encrypted files, do you want to continue? ")) | ||
| 480 | (setq tramp-crypt-directories (delete name tramp-crypt-directories)) | ||
| 481 | (tramp-register-file-name-handlers))) | ||
| 482 | |||
| 467 | ;; `auth-source' requires a user. | 483 | ;; `auth-source' requires a user. |
| 468 | (defun tramp-crypt-dissect-file-name (name) | 484 | (defun tramp-crypt-dissect-file-name (name) |
| 469 | "Return a `tramp-file-name' structure for NAME. | 485 | "Return a `tramp-file-name' structure for NAME. |
| @@ -647,18 +663,35 @@ absolute file names." | |||
| 647 | 663 | ||
| 648 | (defun tramp-crypt-handle-file-executable-p (filename) | 664 | (defun tramp-crypt-handle-file-executable-p (filename) |
| 649 | "Like `file-executable-p' for Tramp files." | 665 | "Like `file-executable-p' for Tramp files." |
| 650 | (tramp-crypt-run-real-handler | 666 | (let (tramp-crypt-enabled) |
| 651 | #'file-executable-p (list (tramp-crypt-encrypt-file-name filename)))) | 667 | (file-executable-p (tramp-crypt-encrypt-file-name filename)))) |
| 668 | |||
| 669 | (defun tramp-crypt-handle-file-name-all-completions (filename directory) | ||
| 670 | "Like `file-name-all-completions' for Tramp files." | ||
| 671 | (all-completions | ||
| 672 | filename | ||
| 673 | (let* (completion-regexp-list | ||
| 674 | tramp-crypt-enabled | ||
| 675 | (directory (file-name-as-directory directory)) | ||
| 676 | (enc-dir (tramp-crypt-encrypt-file-name directory))) | ||
| 677 | (mapcar | ||
| 678 | (lambda (x) | ||
| 679 | (substring | ||
| 680 | (tramp-crypt-decrypt-file-name (concat enc-dir x)) | ||
| 681 | (length directory))) | ||
| 682 | (file-name-all-completions "" enc-dir))))) | ||
| 652 | 683 | ||
| 653 | (defun tramp-crypt-handle-file-readable-p (filename) | 684 | (defun tramp-crypt-handle-file-readable-p (filename) |
| 654 | "Like `file-readable-p' for Tramp files." | 685 | "Like `file-readable-p' for Tramp files." |
| 655 | (tramp-crypt-run-real-handler | 686 | (let (tramp-crypt-enabled) |
| 656 | #'file-readable-p (list (tramp-crypt-encrypt-file-name filename)))) | 687 | (file-readable-p (tramp-crypt-encrypt-file-name filename)))) |
| 657 | 688 | ||
| 658 | (defun tramp-crypt-handle-file-system-info (filename) | 689 | (defun tramp-crypt-handle-file-system-info (filename) |
| 659 | "Like `file-system-info' for Tramp files." | 690 | "Like `file-system-info' for Tramp files." |
| 660 | (tramp-crypt-run-real-handler | 691 | (tramp-crypt-run-real-handler |
| 661 | #'file-system-info (list (tramp-crypt-encrypt-file-name filename)))) | 692 | ;; `file-system-info' exists since Emacs 27.1. Then, we can use |
| 693 | ;; #'file-system-info. | ||
| 694 | 'file-system-info (list (tramp-crypt-encrypt-file-name filename)))) | ||
| 662 | 695 | ||
| 663 | (defun tramp-crypt-handle-insert-directory | 696 | (defun tramp-crypt-handle-insert-directory |
| 664 | (filename switches &optional wildcard full-directory-p) | 697 | (filename switches &optional wildcard full-directory-p) |
| @@ -714,9 +747,17 @@ absolute file names." | |||
| 714 | "Like `set-file-modes' for Tramp files." | 747 | "Like `set-file-modes' for Tramp files." |
| 715 | (with-parsed-tramp-file-name filename nil | 748 | (with-parsed-tramp-file-name filename nil |
| 716 | (tramp-flush-file-properties v localname) | 749 | (tramp-flush-file-properties v localname) |
| 717 | (tramp-crypt-run-real-handler | 750 | (let (tramp-crypt-enabled) |
| 718 | #'set-file-modes | 751 | (tramp-compat-set-file-modes |
| 719 | (list (tramp-crypt-encrypt-file-name filename) mode flag)))) | 752 | (tramp-crypt-encrypt-file-name filename) mode flag)))) |
| 753 | |||
| 754 | (defun tramp-crypt-handle-set-file-times (filename &optional time flag) | ||
| 755 | "Like `set-file-times' for Tramp files." | ||
| 756 | (with-parsed-tramp-file-name filename nil | ||
| 757 | (tramp-flush-file-properties v localname) | ||
| 758 | (let (tramp-crypt-enabled) | ||
| 759 | (tramp-compat-set-file-times | ||
| 760 | (tramp-crypt-encrypt-file-name filename) time flag)))) | ||
| 720 | 761 | ||
| 721 | (add-hook 'tramp-unload-hook | 762 | (add-hook 'tramp-unload-hook |
| 722 | (lambda () | 763 | (lambda () |
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 7faa409f2f0..d578c359d79 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el | |||
| @@ -3815,7 +3815,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 3815 | "Check that `file-acl' and `set-file-acl' work proper." | 3815 | "Check that `file-acl' and `set-file-acl' work proper." |
| 3816 | (skip-unless (tramp--test-enabled)) | 3816 | (skip-unless (tramp--test-enabled)) |
| 3817 | (skip-unless (file-acl tramp-test-temporary-file-directory)) | 3817 | (skip-unless (file-acl tramp-test-temporary-file-directory)) |
| 3818 | (skip-unless (null (tramp--test-crypt-p))) | 3818 | (skip-unless (not (tramp--test-crypt-p))) |
| 3819 | 3819 | ||
| 3820 | ;; `filename-non-special' has been fixed in Emacs 27.1, see Bug#29579. | 3820 | ;; `filename-non-special' has been fixed in Emacs 27.1, see Bug#29579. |
| 3821 | (dolist (quoted (if (and (tramp--test-expensive-test) (tramp--test-emacs27-p)) | 3821 | (dolist (quoted (if (and (tramp--test-expensive-test) (tramp--test-emacs27-p)) |
| @@ -3894,7 +3894,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 3894 | (skip-unless | 3894 | (skip-unless |
| 3895 | (not (equal (file-selinux-context tramp-test-temporary-file-directory) | 3895 | (not (equal (file-selinux-context tramp-test-temporary-file-directory) |
| 3896 | '(nil nil nil nil)))) | 3896 | '(nil nil nil nil)))) |
| 3897 | (skip-unless (null (tramp--test-crypt-p))) | 3897 | (skip-unless (not (tramp--test-crypt-p))) |
| 3898 | 3898 | ||
| 3899 | ;; `filename-non-special' has been fixed in Emacs 27.1, see Bug#29579. | 3899 | ;; `filename-non-special' has been fixed in Emacs 27.1, see Bug#29579. |
| 3900 | (dolist (quoted (if (and (tramp--test-expensive-test) (tramp--test-emacs27-p)) | 3900 | (dolist (quoted (if (and (tramp--test-expensive-test) (tramp--test-emacs27-p)) |
| @@ -4198,7 +4198,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 4198 | :tags '(:expensive-test) | 4198 | :tags '(:expensive-test) |
| 4199 | (skip-unless (tramp--test-enabled)) | 4199 | (skip-unless (tramp--test-enabled)) |
| 4200 | (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p))) | 4200 | (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p))) |
| 4201 | (skip-unless (null (tramp--test-crypt-p))) | 4201 | (skip-unless (not (tramp--test-crypt-p))) |
| 4202 | 4202 | ||
| 4203 | (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) | 4203 | (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) |
| 4204 | (let* ((tmp-name (tramp--test-make-temp-name nil quoted)) | 4204 | (let* ((tmp-name (tramp--test-make-temp-name nil quoted)) |
| @@ -4277,7 +4277,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 4277 | :tags '(:expensive-test) | 4277 | :tags '(:expensive-test) |
| 4278 | (skip-unless (tramp--test-enabled)) | 4278 | (skip-unless (tramp--test-enabled)) |
| 4279 | (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p))) | 4279 | (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p))) |
| 4280 | (skip-unless (null (tramp--test-crypt-p))) | 4280 | (skip-unless (not (tramp--test-crypt-p))) |
| 4281 | 4281 | ||
| 4282 | (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) | 4282 | (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) |
| 4283 | (let ((default-directory tramp-test-temporary-file-directory) | 4283 | (let ((default-directory tramp-test-temporary-file-directory) |
| @@ -4351,7 +4351,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 4351 | :tags '(:expensive-test) | 4351 | :tags '(:expensive-test) |
| 4352 | (skip-unless (tramp--test-enabled)) | 4352 | (skip-unless (tramp--test-enabled)) |
| 4353 | (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p))) | 4353 | (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p))) |
| 4354 | (skip-unless (null (tramp--test-crypt-p))) | 4354 | (skip-unless (not (tramp--test-crypt-p))) |
| 4355 | ;; `make-process' supports file name handlers since Emacs 27. | 4355 | ;; `make-process' supports file name handlers since Emacs 27. |
| 4356 | (skip-unless (tramp--test-emacs27-p)) | 4356 | (skip-unless (tramp--test-emacs27-p)) |
| 4357 | 4357 | ||
| @@ -4522,7 +4522,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 4522 | :tags '(:expensive-test) | 4522 | :tags '(:expensive-test) |
| 4523 | (skip-unless (tramp--test-enabled)) | 4523 | (skip-unless (tramp--test-enabled)) |
| 4524 | (skip-unless (tramp--test-sh-p)) | 4524 | (skip-unless (tramp--test-sh-p)) |
| 4525 | (skip-unless (null (tramp--test-crypt-p))) | 4525 | (skip-unless (not (tramp--test-crypt-p))) |
| 4526 | ;; Since Emacs 26.1. | 4526 | ;; Since Emacs 26.1. |
| 4527 | (skip-unless (boundp 'interrupt-process-functions)) | 4527 | (skip-unless (boundp 'interrupt-process-functions)) |
| 4528 | 4528 | ||
| @@ -4583,7 +4583,7 @@ INPUT, if non-nil, is a string sent to the process." | |||
| 4583 | ;; remote processes in Emacs. That doesn't work for tramp-adb.el. | 4583 | ;; remote processes in Emacs. That doesn't work for tramp-adb.el. |
| 4584 | (skip-unless (or (and (tramp--test-adb-p) (tramp--test-emacs27-p)) | 4584 | (skip-unless (or (and (tramp--test-adb-p) (tramp--test-emacs27-p)) |
| 4585 | (tramp--test-sh-p))) | 4585 | (tramp--test-sh-p))) |
| 4586 | (skip-unless (null (tramp--test-crypt-p))) | 4586 | (skip-unless (not (tramp--test-crypt-p))) |
| 4587 | 4587 | ||
| 4588 | (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) | 4588 | (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) |
| 4589 | (let ((tmp-name (tramp--test-make-temp-name nil quoted)) | 4589 | (let ((tmp-name (tramp--test-make-temp-name nil quoted)) |
| @@ -4675,7 +4675,7 @@ INPUT, if non-nil, is a string sent to the process." | |||
| 4675 | :tags '(:expensive-test) | 4675 | :tags '(:expensive-test) |
| 4676 | (skip-unless (tramp--test-enabled)) | 4676 | (skip-unless (tramp--test-enabled)) |
| 4677 | (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p))) | 4677 | (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p))) |
| 4678 | (skip-unless (null (tramp--test-crypt-p))) | 4678 | (skip-unless (not (tramp--test-crypt-p))) |
| 4679 | ;; Prior Emacs 27, `shell-command-dont-erase-buffer' wasn't working properly. | 4679 | ;; Prior Emacs 27, `shell-command-dont-erase-buffer' wasn't working properly. |
| 4680 | (skip-unless (tramp--test-emacs27-p)) | 4680 | (skip-unless (tramp--test-emacs27-p)) |
| 4681 | 4681 | ||
| @@ -4888,7 +4888,7 @@ INPUT, if non-nil, is a string sent to the process." | |||
| 4888 | :tags '(:expensive-test) | 4888 | :tags '(:expensive-test) |
| 4889 | (skip-unless (tramp--test-enabled)) | 4889 | (skip-unless (tramp--test-enabled)) |
| 4890 | (skip-unless (tramp--test-sh-p)) | 4890 | (skip-unless (tramp--test-sh-p)) |
| 4891 | (skip-unless (null (tramp--test-crypt-p))) | 4891 | (skip-unless (not (tramp--test-crypt-p))) |
| 4892 | 4892 | ||
| 4893 | (dolist (this-shell-command-to-string | 4893 | (dolist (this-shell-command-to-string |
| 4894 | '(;; Synchronously. | 4894 | '(;; Synchronously. |
| @@ -4975,7 +4975,7 @@ INPUT, if non-nil, is a string sent to the process." | |||
| 4975 | ;; We test it only for the mock-up connection; otherwise there might | 4975 | ;; We test it only for the mock-up connection; otherwise there might |
| 4976 | ;; be problems with the used ports. | 4976 | ;; be problems with the used ports. |
| 4977 | (skip-unless (and (eq tramp-syntax 'default) (tramp--test-mock-p))) | 4977 | (skip-unless (and (eq tramp-syntax 'default) (tramp--test-mock-p))) |
| 4978 | (skip-unless (null (tramp--test-crypt-p))) | 4978 | (skip-unless (not (tramp--test-crypt-p))) |
| 4979 | 4979 | ||
| 4980 | ;; We force a reconnect, in order to have a clean environment. | 4980 | ;; We force a reconnect, in order to have a clean environment. |
| 4981 | (dolist (dir `(,tramp-test-temporary-file-directory | 4981 | (dolist (dir `(,tramp-test-temporary-file-directory |
| @@ -5080,7 +5080,7 @@ INPUT, if non-nil, is a string sent to the process." | |||
| 5080 | ;; remote processes in Emacs. That doesn't work for tramp-adb.el. | 5080 | ;; remote processes in Emacs. That doesn't work for tramp-adb.el. |
| 5081 | (skip-unless (or (and (tramp--test-adb-p) (tramp--test-emacs27-p)) | 5081 | (skip-unless (or (and (tramp--test-adb-p) (tramp--test-emacs27-p)) |
| 5082 | (tramp--test-sh-p))) | 5082 | (tramp--test-sh-p))) |
| 5083 | (skip-unless (null (tramp--test-crypt-p))) | 5083 | (skip-unless (not (tramp--test-crypt-p))) |
| 5084 | ;; Since Emacs 26.1. | 5084 | ;; Since Emacs 26.1. |
| 5085 | (skip-unless (and (fboundp 'connection-local-set-profile-variables) | 5085 | (skip-unless (and (fboundp 'connection-local-set-profile-variables) |
| 5086 | (fboundp 'connection-local-set-profiles))) | 5086 | (fboundp 'connection-local-set-profiles))) |
| @@ -5137,7 +5137,7 @@ INPUT, if non-nil, is a string sent to the process." | |||
| 5137 | "Check `exec-path' and `executable-find'." | 5137 | "Check `exec-path' and `executable-find'." |
| 5138 | (skip-unless (tramp--test-enabled)) | 5138 | (skip-unless (tramp--test-enabled)) |
| 5139 | (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p))) | 5139 | (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p))) |
| 5140 | (skip-unless (null (tramp--test-crypt-p))) | 5140 | (skip-unless (not (tramp--test-crypt-p))) |
| 5141 | ;; Since Emacs 27.1. | 5141 | ;; Since Emacs 27.1. |
| 5142 | (skip-unless (fboundp 'exec-path)) | 5142 | (skip-unless (fboundp 'exec-path)) |
| 5143 | 5143 | ||
| @@ -5181,7 +5181,7 @@ INPUT, if non-nil, is a string sent to the process." | |||
| 5181 | "Check loooong `tramp-remote-path'." | 5181 | "Check loooong `tramp-remote-path'." |
| 5182 | (skip-unless (tramp--test-enabled)) | 5182 | (skip-unless (tramp--test-enabled)) |
| 5183 | (skip-unless (tramp--test-sh-p)) | 5183 | (skip-unless (tramp--test-sh-p)) |
| 5184 | (skip-unless (null (tramp--test-crypt-p))) | 5184 | (skip-unless (not (tramp--test-crypt-p))) |
| 5185 | ;; Since Emacs 27.1. | 5185 | ;; Since Emacs 27.1. |
| 5186 | (skip-unless (fboundp 'exec-path)) | 5186 | (skip-unless (fboundp 'exec-path)) |
| 5187 | 5187 | ||
| @@ -5246,7 +5246,7 @@ INPUT, if non-nil, is a string sent to the process." | |||
| 5246 | :tags '(:expensive-test) | 5246 | :tags '(:expensive-test) |
| 5247 | (skip-unless (tramp--test-enabled)) | 5247 | (skip-unless (tramp--test-enabled)) |
| 5248 | (skip-unless (tramp--test-sh-p)) | 5248 | (skip-unless (tramp--test-sh-p)) |
| 5249 | (skip-unless (null (tramp--test-crypt-p))) | 5249 | (skip-unless (not (tramp--test-crypt-p))) |
| 5250 | 5250 | ||
| 5251 | (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) | 5251 | (dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil))) |
| 5252 | ;; We must use `file-truename' for the temporary directory, in | 5252 | ;; We must use `file-truename' for the temporary directory, in |
| @@ -5835,7 +5835,7 @@ This requires restrictions of file name syntax." | |||
| 5835 | ;; We do not run on macOS due to encoding problems. See | 5835 | ;; We do not run on macOS due to encoding problems. See |
| 5836 | ;; Bug#36940. | 5836 | ;; Bug#36940. |
| 5837 | (when (and (tramp--test-expensive-test) (tramp--test-sh-p) | 5837 | (when (and (tramp--test-expensive-test) (tramp--test-sh-p) |
| 5838 | (null (tramp--test-crypt-p)) | 5838 | (not (tramp--test-crypt-p)) |
| 5839 | (not (eq system-type 'darwin))) | 5839 | (not (eq system-type 'darwin))) |
| 5840 | (dolist (elt files) | 5840 | (dolist (elt files) |
| 5841 | (let ((envvar (concat "VAR_" (upcase (md5 elt)))) | 5841 | (let ((envvar (concat "VAR_" (upcase (md5 elt)))) |
| @@ -6168,7 +6168,7 @@ process sentinels. They shall not disturb each other." | |||
| 6168 | ;; remote processes in Emacs. That doesn't work for tramp-adb.el. | 6168 | ;; remote processes in Emacs. That doesn't work for tramp-adb.el. |
| 6169 | (skip-unless (or (and (tramp--test-adb-p) (tramp--test-emacs27-p)) | 6169 | (skip-unless (or (and (tramp--test-adb-p) (tramp--test-emacs27-p)) |
| 6170 | (tramp--test-sh-p))) | 6170 | (tramp--test-sh-p))) |
| 6171 | (skip-unless (null (tramp--test-crypt-p))) | 6171 | (skip-unless (not (tramp--test-crypt-p))) |
| 6172 | 6172 | ||
| 6173 | (with-timeout | 6173 | (with-timeout |
| 6174 | (tramp--test-asynchronous-requests-timeout (tramp--test-timeout-handler)) | 6174 | (tramp--test-asynchronous-requests-timeout (tramp--test-timeout-handler)) |