bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#22534: File notify broken on Windows


From: Fabrice Popineau
Subject: bug#22534: File notify broken on Windows
Date: Thu, 4 Feb 2016 10:49:42 +0100

A couple of my findings :

- notifications returned are not the same whether you run the tests in batch mode or interactive mode.
  In interactive mode, there is a deleted notification which is sent when your remove the directory being watched.
  This event is not seen when running in batch mode (make check). I wonder what could make a difference.
- in the test file-notify-test06-many-events to check that events are not dropped : I have to lower the 1000 number.
  The test fails as soon as I go higher than around 260. Is there some limit here ? Once the limit is reached, only 
  the first notification is returned.
- there is this small patch that needs to be applied :

diff --git a/test/automated/file-notify-tests.el b/test/automated/file-notify-tests.el
index de64f50..51a898e 100644
--- a/test/automated/file-notify-tests.el
+++ b/test/automated/file-notify-tests.el
@@ -507,7 +509,7 @@ file-notify--test-with-events
               ;; w32notify does not distinguish between `changed' and
               ;; `attribute-changed'.
               ((string-equal (file-notify--test-library) "w32notify")
-               '(changed changed changed changed))
+               '(changed changed))
               ;; For kqueue and in the remote case, `write-region'
               ;; raises also an `attribute-changed' event.
               ((or (string-equal (file-notify--test-library) "kqueue")

Overall, I don't think anymore that the patch by Michael has broken w32 file notifications
but rather that the new tests have highlighted some potential problems with it.

Regards,

Fabrice


2016-02-03 13:15 GMT+01:00 Fabrice Popineau <address@hidden>:


2016-02-03 9:07 GMT+01:00 Michael Albinus <address@hidden>:
Fabrice Popineau <address@hidden> writes:

> You will find the commit below (with not too much surprise).
> However, I don't have much time these days to sort this out.

I'll check next days, need to find an MS Windows machine first.


Thanks Michael.

I have observed something weird during the file-notify tests.
I traced file-notify-test02-events.
The read_event function doesn't time out in 0.1s as it is supposed to.
It waits for the time specified  by (file-notify--test-timeout) before
returning the right value. (Well actually, the value returned by the third test
in file-notify-test02-events is wrong but it is another story).

So I'm afraid some logic is wrong, and possibly not only in file-notify
but also in the way w32 should handle those timeouts.

Fabrice



reply via email to

[Prev in Thread] Current Thread [Next in Thread]