Subject: Re: bug#23618: Some filenotify tests fail with extra "changed" events

From: Michael Albinus <[email-masked]>
Date: Sun, 05 Jun 2016 19:59:11 +0200

Michael Albinus <[email-masked]> writes:

Hi Glenn,

> OK, I'll try to get an RHEL 7.2 VM in order to reproduce it. Or maybe a
> CentOS VM, in case RHEL VMs are not available.

I haven't been able to reproduce the problems this way :-(

Anyway, the bug in `file-notify-test08-watched-file-in-watched-dir-remote'
I could fix (this was the only one I could reproduce locally).

Furthermore, I've added code to filenotify-tests.el in order to make it
more robust. That' means especially, that no events could arrive during
a test, resulting from a *previous* test. Maybe this fixes the other
problems already. Committed to the master branch.

> In case it fails, I will send you an instrumentation patch for
> filenotify-tests.el. We do agree that we work on the master branch,
> don't we?

In that case, pls apply the following patch

--8<---------------cut here---------------start------------->8---
*** /home/albinus/src/emacs/lisp/filenotify.el.~6627dd7c9405670db99b792f782aa94c5da118a9~	2016-06-05 19:56:18.485624177 +0200
--- /home/albinus/src/emacs/lisp/filenotify.el	2016-06-05 19:56:02.353342656 +0200
***************
*** 86,92 ****
  
  Otherwise, signal a `file-notify-error'."
    (interactive "e")
!   ;;(message "file-notify-handle-event %S" event)
    (if (and (eq (car event) 'file-notify)
  	   (>= (length event) 3))
        (funcall (nth 2 event) (nth 1 event))
--- 86,92 ----
  
  Otherwise, signal a `file-notify-error'."
    (interactive "e")
!   (message "file-notify-handle-event %S" event)
    (if (and (eq (car event) 'file-notify)
  	   (>= (length event) 3))
        (funcall (nth 2 event) (nth 1 event))
***************
*** 261,270 ****
  		    (and (stringp file1)
  			 (string-equal
  			  (nth 0 entry) (file-name-nondirectory file1)))))
!           ;;(message
!            ;;"file-notify-callback %S %S %S %S %S"
!            ;;(file-notify--descriptor desc (car entry))
!            ;;action file file1 registered)
  	  (if file1
  	      (funcall
  	       callback
--- 261,270 ----
  		    (and (stringp file1)
  			 (string-equal
  			  (nth 0 entry) (file-name-nondirectory file1)))))
!           (message
!            "file-notify-callback %S %S %S %S %S"
!            (file-notify--descriptor desc (car entry))
!            action file file1 registered)
  	  (if file1
  	      (funcall
  	       callback
--8<---------------cut here---------------end--------------->8---

Hopefully, the logs will tell us what happens.

Best regards, Michael.