diff options
| author | Michael Albinus | 2022-11-27 16:57:03 +0100 |
|---|---|---|
| committer | Michael Albinus | 2022-11-27 16:57:03 +0100 |
| commit | 1cbf2655db40cd474411b77ece57a287eb85ea2c (patch) | |
| tree | 51c1eb45d553033f76e7d36837cfbaa20778c7b2 /test | |
| parent | ca42ff5f0ee757f0a70f603863c83e85eef683b9 (diff) | |
| download | emacs-1cbf2655db40cd474411b77ece57a287eb85ea2c.tar.gz emacs-1cbf2655db40cd474411b77ece57a287eb85ea2c.zip | |
Extend memory-info for remote systems
* doc/lispref/files.texi (Magic File Names): Add memory-info.
* doc/lispref/internals.texi (Garbage Collection): memory-info can
also retrieve values from remote systems.
* etc/NEWS: Document changes in memory-info. Fix typos.
* lisp/files.el (warn-maybe-out-of-memory): Ensure local memory info.
* lisp/net/tramp.el (tramp-handle-memory-info): New defun.
(tramp-file-name-for-operation)
* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist):
* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
* lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist)
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
Add 'memory-info'.
* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-exec-path):
Let-bind `process-file-side-effects'.
* src/alloc.c (Fmemory_info): Support remote systems.
(Qmemory_info): Declare.
* test/lisp/net/tramp-tests.el (tramp-test31-memory-info): New test.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/net/tramp-tests.el | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index a79c47be723..6ffb8a65292 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el | |||
| @@ -5388,6 +5388,21 @@ If UNSTABLE is non-nil, the test is tagged as `:unstable'." | |||
| 5388 | ;; Cleanup. | 5388 | ;; Cleanup. |
| 5389 | (ignore-errors (delete-process proc))))) | 5389 | (ignore-errors (delete-process proc))))) |
| 5390 | 5390 | ||
| 5391 | (ert-deftest tramp-test31-memory-info () | ||
| 5392 | "Check `memory-info'." | ||
| 5393 | :tags '(:expensive-test) | ||
| 5394 | (skip-unless (tramp--test-enabled)) | ||
| 5395 | (skip-unless (tramp--test-supports-processes-p)) | ||
| 5396 | ;; `memory-info' is supported since Emacs 29.1. | ||
| 5397 | (skip-unless (tramp--test-emacs29-p)) | ||
| 5398 | |||
| 5399 | (when-let ((default-directory ert-remote-temporary-file-directory) | ||
| 5400 | (mi (memory-info))) | ||
| 5401 | (should (consp mi)) | ||
| 5402 | (should (= (length mi) 4)) | ||
| 5403 | (dotimes (i (length mi)) | ||
| 5404 | (should (natnump (nth i mi)))))) | ||
| 5405 | |||
| 5391 | (defun tramp--test-async-shell-command | 5406 | (defun tramp--test-async-shell-command |
| 5392 | (command output-buffer &optional error-buffer input) | 5407 | (command output-buffer &optional error-buffer input) |
| 5393 | "Like `async-shell-command', reading the output. | 5408 | "Like `async-shell-command', reading the output. |