From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#21435: 25.0.50; file-notify has problems after renames Date: Thu, 10 Sep 2015 19:50:21 +0200 Message-ID: <87si6mi2oy.fsf@gmx.de> References: <87y4gh47sr.fsf@gnu.org> <83k2s07vaf.fsf@gnu.org> <87fv2ovlcr.fsf@gmx.de> <83613k7owe.fsf@gnu.org> <87si6og17z.fsf@gnu.org> <877fnzv4r6.fsf@gmx.de> <87egi7o1s1.fsf@gnu.org> <871te7tk9i.fsf@gnu.org> <87oahatt4p.fsf@gmx.de> <87a8sunve8.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1441907494 31978 80.91.229.3 (10 Sep 2015 17:51:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Sep 2015 17:51:34 +0000 (UTC) Cc: 21435@debbugs.gnu.org To: Tassilo Horn Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 10 19:51:26 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1Za60A-00073M-FD for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Sep 2015 19:51:14 +0200 Original-Received: from localhost ([::1]:50849 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Za609-0000el-Px for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Sep 2015 13:51:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43349) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Za603-0000bc-TU for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2015 13:51:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Za5zy-0001Ds-Iu for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2015 13:51:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35093) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Za5zy-0001Di-DK for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2015 13:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Za5zy-00034v-6t for bug-gnu-emacs@gnu.org; Thu, 10 Sep 2015 13:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Sep 2015 17:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21435 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21435-submit@debbugs.gnu.org id=B21435.144190742711782 (code B ref 21435); Thu, 10 Sep 2015 17:51:02 +0000 Original-Received: (at 21435) by debbugs.gnu.org; 10 Sep 2015 17:50:27 +0000 Original-Received: from localhost ([127.0.0.1]:55536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Za5zO-00033x-IP for submit@debbugs.gnu.org; Thu, 10 Sep 2015 13:50:26 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:60911) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Za5zM-00033p-1Y for 21435@debbugs.gnu.org; Thu, 10 Sep 2015 13:50:24 -0400 Original-Received: from detlef.gmx.de ([93.209.66.208]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0M2ts6-1YkkBd0SDm-00sdai; Thu, 10 Sep 2015 19:50:23 +0200 In-Reply-To: <87a8sunve8.fsf@gnu.org> (Tassilo Horn's message of "Thu, 10 Sep 2015 17:31:27 +0200") User-Agent: Gnus/5.13 (G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IQGj6dtDL2nuinf67bCw== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:106378 Archived-At: Tassilo Horn writes: >>> 1. Now `file-notify-test02-events-remote' fails because after every >>> expected `changed' event an additional `attribute-changed' event is >>> received. This is wrong because when adding the watch, only >>> '(change) is given as FLAGS argument, not '(change >>> attribute-change). >> >> I'll contact the Tramp maintainer about :-) > > Deliver him my best wishes. :-) Done. He's working on the problem. > Ah, ok, so when you write to a file you'll only get a `changed' event, > and not an additional `attribute-changed' event for the changed > modification time. So basically, attribute changes are subsumed by > `changed' and `created' events. > > By the way, I think it could be hard to test `attribute-changed' events > because those probably depend on the filesystem and mount options on the > machine where the tests are run, e.g., if access time recording is > enabled or not. Yes. And I also expect here the most notable differences between the native libraries. Not checked yet, 'tho. > I've added a new macro to the tests now which lets you do things this > way: > > ;; Check creation, change, and deletion. > (file-notify--test-with-events > 3 3 (lambda (events) > (should (equal '(created changed deleted) > (mapcar #'cadr events)))) > (write-region > "any text" nil file-notify--test-tmpfile nil 'no-message) > (delete-file file-notify--test-tmpfile)) > > This means we're waiting for 3 events for at most 3 seconds, and then > apply the lambda to the received events. The rest is the code which > causes the events to be emitted. That's good, yes. Please add a docstring to that macro (boring, I know, but it will help other people like Eli and me). One point: you don't call any longer `read-event'. I believe it still makes sense; IIRC I did it because sometimes you must trigger Emacs to check all its file descriptors for new events. > Another thing: the remote tests, especially the test03-autorevert one, > take really, really long (maybe 30 seconds). I saw that this uses some > mock TRAMP method which suggests it is a mockup connection which can > probably simulate a fast or a slow connection. If so, I'd prefer to > have a reasonably fast one so that I don't try to avoid running all > tests frequently. Well, the mockup method is a silly one and it even doesn't require a remote connection, so it shall be faster than any other Tramp method. And I do not experience serious delays when testing. You could alway skip all the remote tests. Call # env REMOTE_TEMPORARY_FILE_DIRECTORY=/dev/null make -C test/automated file-notify-tests > Bye, > Tassilo Best regards, Michael.