unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: trunk r113641: * test/automated/file-notify-tests.el (file-notify--test-remote-enabled):
       [not found] <E1V521H-0006zR-8a@vcs.savannah.gnu.org>
@ 2013-08-02  6:47 ` Michael Albinus
  2013-08-02  7:12   ` Glenn Morris
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Albinus @ 2013-08-02  6:47 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel

Glenn Morris <rgm@gnu.org> writes:

Hi Glenn,

> === modified file 'test/automated/file-notify-tests.el'
> --- a/test/automated/file-notify-tests.el	2013-07-24 13:56:19 +0000
> +++ b/test/automated/file-notify-tests.el	2013-08-01 23:10:51 +0000
> @@ -43,6 +43,7 @@
>  (defvar file-notify--test-event nil)
>  
>  (require 'tramp)
> +(require 'tramp-sh)
>  (setq tramp-verbose 0
>        tramp-message-show-message nil)
>  (when noninteractive (defalias 'tramp-read-passwd 'ignore))
> @@ -57,7 +58,18 @@
>    (ignore-errors
>      (and (file-remote-p file-notify-test-remote-temporary-file-directory)
>  	 (file-directory-p file-notify-test-remote-temporary-file-directory)
> -	 (file-writable-p file-notify-test-remote-temporary-file-directory))))
> +	 (file-writable-p file-notify-test-remote-temporary-file-directory)
> +	 ;; Extracted from tramp-sh-handle-file-notify-add-watch.
> +	 ;; Even though the "remote" system is just ssh@localhost,
> +	 ;; the PATH might not be the same as the "local" PATH.
> +	 ;; Eg this seems to be the case on hydra.nixos.org.
> +	 ;; Without this, tests fail with:
> +	 ;; "No file notification program found on /ssh:localhost:"
> +	 ;; Try to fix PATH instead?
> +	 (with-parsed-tramp-file-name
> +	     file-notify-test-remote-temporary-file-directory nil
> +	     (or (tramp-get-remote-gvfs-monitor-dir v)
> +		 (tramp-get-remote-inotifywait v))))))
>  
>  (defmacro file-notify--deftest-remote (test docstring)
>    "Define ert `TEST-remote' for remote files."

I fear this is not sufficient. This patch handles only file
notifications which are implemented via tramp-sh.el.

Yesterday, I have committed a patch which adds
`tramp-gvfs-handle-file-notify-add-watch' (using gvfs-monitor-file to
poll for changes on GVFS mounted directories).

Maybe we rethink to introduce `file-notify-supported-p' and its
handlers?

Best regards, Michael.

PS: Don't worry when I do not react next days. Tomorrow I'll start a
bike tour, and unfortunately my companions insist on the basic rule "no
electronic devices on board".



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: trunk r113641: * test/automated/file-notify-tests.el (file-notify--test-remote-enabled):
  2013-08-02  6:47 ` trunk r113641: * test/automated/file-notify-tests.el (file-notify--test-remote-enabled): Michael Albinus
@ 2013-08-02  7:12   ` Glenn Morris
  2013-08-02  7:28     ` Michael Albinus
  0 siblings, 1 reply; 3+ messages in thread
From: Glenn Morris @ 2013-08-02  7:12 UTC (permalink / raw)
  To: Michael Albinus; +Cc: emacs-devel

Michael Albinus wrote:

> I fear this is not sufficient. This patch handles only file
> notifications which are implemented via tramp-sh.el.
>
> Yesterday, I have committed a patch which adds
> `tramp-gvfs-handle-file-notify-add-watch' (using gvfs-monitor-file to
> poll for changes on GVFS mounted directories).
>
> Maybe we rethink to introduce `file-notify-supported-p' and its
> handlers?

You'd know better than me, I was just tying to get rid of the

(ert-test-failed
   (file-notify-error "No file notification program found on /ssh:localhost:"))

from eg
http://hydra.nixos.org/build/5635144/log/raw

It succeeds in that regard.

Does it matter outside of automated testing if one gets an error?

> PS: Don't worry when I do not react next days. Tomorrow I'll start a
> bike tour, and unfortunately my companions insist on the basic rule "no
> electronic devices on board".

Good for them! :)



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: trunk r113641: * test/automated/file-notify-tests.el (file-notify--test-remote-enabled):
  2013-08-02  7:12   ` Glenn Morris
@ 2013-08-02  7:28     ` Michael Albinus
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Albinus @ 2013-08-02  7:28 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel

Glenn Morris <rgm@gnu.org> writes:

>> Maybe we rethink to introduce `file-notify-supported-p' and its
>> handlers?
>
> You'd know better than me, I was just tying to get rid of the
>
> (ert-test-failed
>    (file-notify-error "No file notification program found on /ssh:localhost:"))
>
> from eg
> http://hydra.nixos.org/build/5635144/log/raw

I'll think about.

> Does it matter outside of automated testing if one gets an error?

`file-notify-add-watch' promises to raise an error in such a
situation. It would matter, when it silently returns.

Best regards, Michael.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-08-02  7:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <E1V521H-0006zR-8a@vcs.savannah.gnu.org>
2013-08-02  6:47 ` trunk r113641: * test/automated/file-notify-tests.el (file-notify--test-remote-enabled): Michael Albinus
2013-08-02  7:12   ` Glenn Morris
2013-08-02  7:28     ` Michael Albinus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).