From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: trunk r113641: * test/automated/file-notify-tests.el (file-notify--test-remote-enabled): Date: Fri, 02 Aug 2013 08:47:39 +0200 Message-ID: <87bo5g1tdg.fsf@gmx.de> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1375426098 6263 80.91.229.3 (2 Aug 2013 06:48:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 2 Aug 2013 06:48:18 +0000 (UTC) Cc: emacs-devel@gnu.org To: Glenn Morris Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 02 08:48:18 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V599p-0002EG-7z for ged-emacs-devel@m.gmane.org; Fri, 02 Aug 2013 08:48:13 +0200 Original-Received: from localhost ([::1]:45161 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V599o-0001y7-SA for ged-emacs-devel@m.gmane.org; Fri, 02 Aug 2013 02:48:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35255) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V599h-0001xC-AA for emacs-devel@gnu.org; Fri, 02 Aug 2013 02:48:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V599a-00014f-K2 for emacs-devel@gnu.org; Fri, 02 Aug 2013 02:48:05 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:62582) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V599a-000147-6q for emacs-devel@gnu.org; Fri, 02 Aug 2013 02:47:58 -0400 Original-Received: from detlef.gmx.de ([93.202.50.175]) by mail.gmx.com (mrgmx101) with ESMTPS (Nemesis) id 0M20Jj-1UBP0B31zP-00u5QH for ; Fri, 02 Aug 2013 08:47:57 +0200 In-Reply-To: (Glenn Morris's message of "Thu, 01 Aug 2013 23:10:55 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Provags-ID: V03:K0:4dZh5Fvbgn84O6ZHe1MTfjsRzScSdB8O7Baw5DKKC3QqmFd/7Cw sb2SHTFKVpBwjL+KOb7ZahV4Yay0hyX8sxz1FAW73lTKW3DkUHHTBmyTi9o+szQo7gvTqdX Y/F8StRI2FI4NgtXbBZ7Q7F7aqyotNmEEqA29J7Li+5VrJjTwqxQMD/vohJHZx1MvTHc1w3 GLVpmLoj33ZbTWqanRG4Q== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.17.21 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:162362 Archived-At: Glenn Morris 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".