GNU bug report logs - #21435
25.0.50; file-notify has problems after renames

Previous Next

Package: emacs;

Reported by: Tassilo Horn <tsdh <at> gnu.org>

Date: Tue, 8 Sep 2015 08:48:01 UTC

Severity: normal

Found in version 25.0.50

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 21435 <at> debbugs.gnu.org, tsdh <at> gnu.org
Subject: bug#21435: 25.0.50; file-notify has problems after renames
Date: Sun, 20 Sep 2015 22:36:29 +0300
> From: Michael Albinus <michael.albinus <at> gmx.de>
> Date: Sun, 20 Sep 2015 19:26:21 +0200
> Cc: 21435 <at> debbugs.gnu.org
> 
> Tassilo Horn <tsdh <at> gnu.org> writes:
> 
> > file-notify using the inotify backend reports wrong events after
> > directory renames.
> 
> This is also fixed, the test case for inotify and Tramp pass. So the bug
> report could be closed once there is a final confirmation for w32notify.

w32notify reports 2 changed events in a row:

  Test file-notify-test02-events condition:
      (ert-test-failed
       ((should
	 (equal '...
	  (mapcar ... events)))
	:form
	(equal
	 (created changed deleted)
	 (created changed changed deleted))
	:value nil :explanation
	(proper-lists-of-different-length 3 4
					  (created changed deleted)
					  (created changed changed deleted)
					  first-mismatch-at 2)))

This is the "copy" part of the test.  Interestingly, sometimes there
are 2 separate "changed" events and sometimes only 1.  Does
filenotify.el try to conflate several consecutive events of the same
kind into one?  In any case, I guess we will have to allow either one
or 2 "changed" events there.

The other parts also have differences.  Here are the diffs I need to
make all the tests pass:

diff --git a/test/automated/file-notify-tests.el b/test/automated/file-notify-tests.el
index 9d66f03..1aaf4b7 100644
--- a/test/automated/file-notify-tests.el
+++ b/test/automated/file-notify-tests.el
@@ -286,7 +286,7 @@ (ert-deftest file-notify-test02-events ()
         (file-notify--test-with-events
             3 (file-notify--test-timeout)
             (lambda (events)
-              (should (equal '(created changed deleted)
+              (should (equal '(created changed changed deleted)
                              (mapcar #'cadr events))))
           (write-region
            "any text" nil file-notify--test-tmpfile nil 'no-message)
@@ -318,7 +318,7 @@ (ert-deftest file-notify-test02-events ()
         (file-notify--test-with-events
             2 (file-notify--test-timeout)
             (lambda (events)
-              (should (equal '(attribute-changed attribute-changed)
+              (should (equal '(changed changed changed)
                              (mapcar #'cadr events))))
           (write-region
            "any text" nil file-notify--test-tmpfile nil 'no-message)
@@ -331,9 +331,9 @@ (ert-deftest file-notify-test02-events ()
         ;; `file-notify--test-events' has been set correctly.
         (should (equal (mapcar #'cadr file-notify--test-events)
                        '(created changed deleted
-                                 created changed deleted
+                                 created changed changed deleted
                                  created changed renamed
-                                 attribute-changed attribute-changed)))
+                                 changed changed changed)))
 
         (should file-notify--test-results)
         (dolist (result file-notify--test-results)




This bug report was last modified 9 years and 308 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.