Subject: Re: bug#47262: [platform-testers] Emacs 27.2 RC2

From: Michael Albinus <[email-masked]>
Date: Sat, 20 Mar 2021 16:52:02 +0100

Dagobert Michelsen <[email-masked]> writes:

> Hi Michael,

Hi Dago,

>> Many thanks in advance (and be
>> prepared, I will exploit you iteratively until all tests pass. If you
>> agree :-)
>
> Of course :-)

Well, here's another patch you could apply instead. I've changed the
tests as indicated in the previous log file. And in order to cut the
number of iterations, I don't let fail the tests any longer, but let
them trace what happens. Could you, pls, send me the next log file,
produced after applying this patch?

> Best regards
>   — Dago

Thanks, and best regards, Michael.

*** /tmp/ediffumMrVc	2021-03-20 16:50:58.959414691 +0100
--- /home/albinus/src/emacs-27/test/lisp/filenotify-tests.el	2021-03-20 16:44:46.138512407 +0100
***************
*** 109,115 ****
      ;; at least on Cygwin.
      ((and (string-equal (file-notify--test-library) "gfilenotify")
            (memq (file-notify--test-monitor)
!                 '(GFamFileMonitor GPollFileMonitor)))
       7)
      ((string-equal (file-notify--test-library) "gvfs-monitor-dir.exe") 1)
      ((file-remote-p temporary-file-directory) 0.1)
--- 109,115 ----
      ;; at least on Cygwin.
      ((and (string-equal (file-notify--test-library) "gfilenotify")
            (memq (file-notify--test-monitor)
!                 '(GFamFileMonitor GFamDirectoryMonitor GPollFileMonitor)))
       7)
      ((string-equal (file-notify--test-library) "gvfs-monitor-dir.exe") 1)
      ((file-remote-p temporary-file-directory) 0.1)
***************
*** 607,613 ****
           (ert-fail
            (cadr (ert-test-result-with-condition-condition result)))))
       ;; One of the possible event sequences shall match.
!      (should (file-notify--test-with-actions-check actions))))

  (ert-deftest file-notify-test03-events ()
    "Check file creation/change/removal notifications."
--- 607,617 ----
           (ert-fail
            (cadr (ert-test-result-with-condition-condition result)))))
       ;; One of the possible event sequences shall match.
!      (if (file-notify--test-with-actions-check actions)
!          (message
!           "Success!\n%s"
!           (mapcar #'file-notify--test-event-action file-notify--test-events))
!        (message (file-notify--test-with-actions-explainer actions)))))

  (ert-deftest file-notify-test03-events ()
    "Check file creation/change/removal notifications."
***************
*** 635,640 ****
--- 639,647 ----
               ;; cygwin does not raise a `changed' event.
               ((eq system-type 'cygwin)
                '(created deleted stopped))
+ 	     ;; GFamDirectoryMonitor does not report the `changed' event.
+ 	     ((equal (file-notify--test-monitor) 'GFamDirectoryMonitor)
+ 	      '(created deleted stopped))
               (t '(created changed deleted stopped)))
            (write-region
             "another text" nil file-notify--test-tmpfile nil 'no-message)
***************
*** 666,672 ****
  	      '((deleted stopped)
  		(changed deleted stopped)))
  	     ;; There could be one or two `changed' events.
! 	     (t '((changed deleted stopped)
  		  (changed changed deleted stopped))))
            (write-region
             "another text" nil file-notify--test-tmpfile nil 'no-message)
--- 673,682 ----
  	      '((deleted stopped)
  		(changed deleted stopped)))
  	     ;; There could be one or two `changed' events.
! 	     ;; GFamDirectoryMonitor does not report the `changed' event.
! 	     ((equal (file-notify--test-monitor) 'GFamDirectoryMonitor)
! 	      '(deleted stopped))
!  	     (t '((changed deleted stopped)
  		  (changed changed deleted stopped))))
            (write-region
             "another text" nil file-notify--test-tmpfile nil 'no-message)
***************
*** 713,719 ****
  	     ;; cygwin does not raise a `changed' event.
  	     ((eq system-type 'cygwin)
  	      '(created deleted stopped))
! 	     ((string-equal (file-notify--test-library) "kqueue")
  	      '(created changed deleted stopped))
  	     (t '(created changed deleted deleted stopped)))
  	  (write-region
--- 723,732 ----
  	     ;; cygwin does not raise a `changed' event.
  	     ((eq system-type 'cygwin)
  	      '(created deleted stopped))
! 	     ;; GFamDirectoryMonitor does not report the `changed' event.
! 	     ((equal (file-notify--test-monitor) 'GFamDirectoryMonitor)
! 	      '(created deleted stopped))
!  	     ((string-equal (file-notify--test-library) "kqueue")
  	      '(created changed deleted stopped))
  	     (t '(created changed deleted deleted stopped)))
  	  (write-region
***************
*** 1021,1026 ****
--- 1034,1042 ----
  	     ((string-equal (file-notify--test-library) "gvfs-monitor-dir.exe")
  	      '((deleted stopped)
  		(changed deleted stopped)))
+ 	     ;; GFamDirectoryMonitor does not report the `changed' event.
+ 	     ((equal (file-notify--test-monitor) 'GFamDirectoryMonitor)
+ 	      '(deleted stopped))
  	     ;; There could be one or two `changed' events.
  	     (t '((changed deleted stopped)
  		  (changed changed deleted stopped))))
***************
*** 1286,1291 ****
--- 1302,1310 ----
               ;; On cygwin we only get the `changed' event.
               ((eq system-type 'cygwin)
                '(changed))
+ 	     ;; GFamDirectoryMonitor reports only the `changed' event.
+ 	     ((equal (file-notify--test-monitor) 'GFamDirectoryMonitor)
+ 	      '(changed))
               (t '(renamed created changed)))
            ;; The file is renamed when creating a backup.  It shall
            ;; still be watched.