aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMichael Albinus2018-12-21 13:53:20 +0100
committerMichael Albinus2018-12-21 13:53:20 +0100
commit452d0c52cdf9a1ac9fe0df8acff931e9ef94c0a2 (patch)
treed2796b275f36e0212fa847ef269523ab5788a503 /test
parentf1faf85f003f6e526f3d7e27dbdd8bf7f151582b (diff)
downloademacs-452d0c52cdf9a1ac9fe0df8acff931e9ef94c0a2.tar.gz
emacs-452d0c52cdf9a1ac9fe0df8acff931e9ef94c0a2.zip
Fix Bug#33735
* lisp/net/tramp-sh.el (tramp-sh-gio-monitor-process-filter): Delete empty lines. (Bug#33735) (tramp-sh-inotifywait-process-filter): Use `string-match'. (tramp-set-remote-path): Check for PIPE_BUF but PATH_MAX. * test/lisp/filenotify-tests.el: Handle $REMOTE_FILE_NOTIFY_LIBRARY. (file-notify--deftest-remote): Suppress vc-handled-backends. (file-notify-test08-backup): Do not expect failure on hydra. (Bug#33735).
Diffstat (limited to 'test')
-rw-r--r--test/lisp/filenotify-tests.el27
1 files changed, 24 insertions, 3 deletions
diff --git a/test/lisp/filenotify-tests.el b/test/lisp/filenotify-tests.el
index 51b323f9b47..fb268b45138 100644
--- a/test/lisp/filenotify-tests.el
+++ b/test/lisp/filenotify-tests.el
@@ -31,6 +31,21 @@
31;; remote host, set this environment variable to "/dev/null" or 31;; remote host, set this environment variable to "/dev/null" or
32;; whatever is appropriate on your system. 32;; whatever is appropriate on your system.
33 33
34;; For the remote file-notify library, Tramp checks for the existence
35;; of a respective command. The first command found is used. In
36;; order to use a dedicated one, the environment variable
37;; $REMOTE_FILE_NOTIFY_LIBRARY shall be set, possible values are
38;; "inotifywait", "gio-monitor" and "gvfs-monitor-dir".
39
40;; Local file-notify libraries are auto-detected during Emacs
41;; configuration. This can be changed with a respective configuration
42;; argument, like
43;;
44;; --with-file-notification=inotify
45;; --with-file-notification=kqueue
46;; --with-file-notification=gfile
47;; --with-file-notification=w32
48
34;; A whole test run can be performed calling the command `file-notify-test-all'. 49;; A whole test run can be performed calling the command `file-notify-test-all'.
35 50
36;;; Code: 51;;; Code:
@@ -64,6 +79,12 @@
64 (format "/mock::%s" temporary-file-directory))) 79 (format "/mock::%s" temporary-file-directory)))
65 "Temporary directory for Tramp tests.") 80 "Temporary directory for Tramp tests.")
66 81
82;; Filter suppressed remote file-notify libraries.
83(when (stringp (getenv "REMOTE_FILE_NOTIFY_LIBRARY"))
84 (dolist (lib '("inotifywait" "gio-monitor" "gvfs-monitor-dir"))
85 (unless (string-equal (getenv "REMOTE_FILE_NOTIFY_LIBRARY") lib)
86 (add-to-list 'tramp-connection-properties `(nil ,lib nil)))))
87
67(defvar file-notify--test-tmpdir nil) 88(defvar file-notify--test-tmpdir nil)
68(defvar file-notify--test-tmpfile nil) 89(defvar file-notify--test-tmpfile nil)
69(defvar file-notify--test-tmpfile1 nil) 90(defvar file-notify--test-tmpfile1 nil)
@@ -250,7 +271,8 @@ This returns only for the local case and gfilenotify; otherwise it is nil.
250 (skip-unless (not ,skip)) 271 (skip-unless (not ,skip))
251 (let* ((temporary-file-directory 272 (let* ((temporary-file-directory
252 file-notify-test-remote-temporary-file-directory) 273 file-notify-test-remote-temporary-file-directory)
253 (ert-test (ert-get-test ',test))) 274 (ert-test (ert-get-test ',test))
275 vc-handled-backends)
254 (skip-unless (file-notify--test-remote-enabled)) 276 (skip-unless (file-notify--test-remote-enabled))
255 (tramp-cleanup-connection 277 (tramp-cleanup-connection
256 (tramp-dissect-file-name temporary-file-directory) nil 'keep-password) 278 (tramp-dissect-file-name temporary-file-directory) nil 'keep-password)
@@ -1243,8 +1265,7 @@ delivered."
1243 (file-notify--test-cleanup))) 1265 (file-notify--test-cleanup)))
1244 1266
1245(file-notify--deftest-remote file-notify-test08-backup 1267(file-notify--deftest-remote file-notify-test08-backup
1246 "Check that backup keeps file notification for remote files." 1268 "Check that backup keeps file notification for remote files.")
1247 (if (getenv "EMACS_HYDRA_CI") :failed :passed)) ; fixme bug#33735
1248 1269
1249(ert-deftest file-notify-test09-watched-file-in-watched-dir () 1270(ert-deftest file-notify-test09-watched-file-in-watched-dir ()
1250 "Watches a directory and a file in that directory separately. 1271 "Watches a directory and a file in that directory separately.