[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21435: 25.0.50; file-notify has problems after renames
From: |
Eli Zaretskii |
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@gmx.de>
> Date: Sun, 20 Sep 2015 19:26:21 +0200
> Cc: 21435@debbugs.gnu.org
>
> Tassilo Horn <tsdh@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)
- bug#21435: 25.0.50; file-notify has problems after renames, (continued)
bug#21435: 25.0.50; file-notify has problems after renames, Tassilo Horn, 2015/09/08
bug#21435: 25.0.50; file-notify has problems after renames, Michael Albinus, 2015/09/20
- bug#21435: 25.0.50; file-notify has problems after renames,
Eli Zaretskii <=
- bug#21435: 25.0.50; file-notify has problems after renames, Michael Albinus, 2015/09/21
- bug#21435: 25.0.50; file-notify has problems after renames, Eli Zaretskii, 2015/09/21
- bug#21435: 25.0.50; file-notify has problems after renames, Michael Albinus, 2015/09/21
- bug#21435: 25.0.50; file-notify has problems after renames, Eli Zaretskii, 2015/09/21
- bug#21435: 25.0.50; file-notify has problems after renames, Michael Albinus, 2015/09/21
- bug#21435: 25.0.50; file-notify has problems after renames, Eli Zaretskii, 2015/09/21
- bug#21435: 25.0.50; file-notify has problems after renames, Michael Albinus, 2015/09/21