From a60d77b8400edc130a1f48802e9257592234095a Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Sat, 31 Dec 2016 16:16:12 -0500 Subject: [PATCH] Further improve filenotify-tests.el * test/lisp/filenotify-tests.el (file-notify--test-read-event): Adapt to file monitors of type GFamFileMonitor, which occur on Cygwin. (file-notify--test-monitor): Update doc string. --- test/lisp/filenotify-tests.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/lisp/filenotify-tests.el b/test/lisp/filenotify-tests.el index e2bcc6b0f7e..bd7f191dac6 100644 --- a/test/lisp/filenotify-tests.el +++ b/test/lisp/filenotify-tests.el @@ -70,10 +70,13 @@ There are different timeouts for local and remote file notification libraries." (read-event nil nil (cond - ;; gio/gpollfilemonitor.c declares POLL_TIME_SECS 5. So we must - ;; wait at least this time. + ;; gio/gpollfilemonitor.c declares POLL_TIME_SECS 5. So we must + ;; wait at least this time in the GPollFileMonitor case. A + ;; similar timeout seems to be needed in the GFamFileMonitor case, + ;; at least on Cygwin. ((and (string-equal (file-notify--test-library) "gfilenotify") - (string-equal (file-notify--test-monitor) "GPollFileMonitor")) + (memq (file-notify--test-monitor) + '(GFamFileMonitor GPollFileMonitor))) 7) ((file-remote-p temporary-file-directory) 0.1) (t 0.01)))) @@ -204,7 +207,7 @@ remote host, or nil." (process-name (cdr file-notify--test-remote-enabled-checked)))))) (defun file-notify--test-monitor () - "The used monitor for the test, as a string. + "The used monitor for the test, as a symbol. This returns only for the local case and gfilenotify; otherwise it is nil. `file-notify--test-desc' must be a valid watch descriptor." (and file-notify--test-desc -- 2.39.5