From: Michael Albinus <michael.albinus@gmx.de>
To: Dagobert Michelsen <dam@opencsw.org>
Cc: 47262@debbugs.gnu.org
Subject: bug#47262: [platform-testers] Emacs 27.2 RC2
Date: Tue, 23 Mar 2021 10:32:29 +0100 [thread overview]
Message-ID: <87r1k65i6q.fsf@gmx.de> (raw)
In-Reply-To: <91A7B63E-E725-4A81-86B4-93F45AB71AC5@opencsw.org> (Dagobert Michelsen's message of "Tue, 23 Mar 2021 09:42:26 +0100")
[-- Attachment #1: Type: text/plain, Size: 402 bytes --]
Dagobert Michelsen <dam@opencsw.org> writes:
> Hi Michael,
Hi Dago,
> Please find the new log attached.
Thanks! Appended the next patch iteration. And I'm quite optimistic that
it is the last one :-)
Could you pls check? As a reminder, pls call
# make -C test filenotify-tests.log SELECTOR='(not "remote")'
> Best regards
>
> — Dago
Thanks, and best regards, Michael.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 21426 bytes --]
*** /tmp/ediffpkAKG4 2021-03-23 10:28:18.611288593 +0100
--- /usr/local/src/emacs-27/test/lisp/filenotify-tests.el 2021-03-23 10:10:45.362714979 +0100
***************
*** 105,115 ****
(cond
;; gio/gpollfilemonitor.c declares POLL_TIME_SECS 5. So we must
;; wait at least this time in the GPollFileMonitor case. A
! ;; similar timeout seems to be needed in the GFamFileMonitor case,
! ;; 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)
--- 105,114 ----
(cond
;; gio/gpollfilemonitor.c declares POLL_TIME_SECS 5. So we must
;; wait at least this time in the GPollFileMonitor case. A
! ;; similar timeout seems to be needed in the
! ;; GFam{File,Directory}Monitor case.
! ((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)
***************
*** 263,274 ****
;; `gfile-monitor-name' does not return a proper result anymore.
;; But we still need this information.
(unless (file-remote-p temporary-file-directory)
! (or (cdr (assq file-notify--test-desc file-notify--test-monitors))
(when (functionp 'gfile-monitor-name)
(add-to-list 'file-notify--test-monitors
(cons file-notify--test-desc
(gfile-monitor-name file-notify--test-desc)))
! (cdr (assq file-notify--test-desc file-notify--test-monitors))))))
(defmacro file-notify--deftest-remote (test docstring &optional unstable)
"Define ert `TEST-remote' for remote files.
--- 262,273 ----
;; `gfile-monitor-name' does not return a proper result anymore.
;; But we still need this information.
(unless (file-remote-p temporary-file-directory)
! (or (alist-get file-notify--test-desc file-notify--test-monitors)
(when (functionp 'gfile-monitor-name)
(add-to-list 'file-notify--test-monitors
(cons file-notify--test-desc
(gfile-monitor-name file-notify--test-desc)))
! (alist-get file-notify--test-desc file-notify--test-monitors)))))
(defmacro file-notify--deftest-remote (test docstring &optional unstable)
"Define ert `TEST-remote' for remote files.
***************
*** 455,461 ****
(unwind-protect
;; Check, that removing watch descriptors out of order do not
! ;; harm. This fails on Cygwin because of timing issues unless a
;; long `sit-for' is added before the call to
;; `file-notify--test-read-event'.
(unless (eq system-type 'cygwin)
--- 454,460 ----
(unwind-protect
;; Check, that removing watch descriptors out of order do not
! ;; harm. This fails on cygwin because of timing issues unless a
;; long `sit-for' is added before the call to
;; `file-notify--test-read-event'.
(unless (eq system-type 'cygwin)
***************
*** 542,547 ****
--- 541,550 ----
file-notify--test-results
(append file-notify--test-results `(,result))))))
+ (defun file-notify--test-event-actions ()
+ "Helper function to return retrieved actions, as list."
+ (mapcar #'file-notify--test-event-action file-notify--test-events))
+
(defun file-notify--test-with-actions-check (actions)
"Check whether received actions match one of the ACTIONS alternatives."
(let (result)
***************
*** 550,571 ****
(or result
(if (eq (car elt) :random)
(equal (sort (cdr elt) 'string-lessp)
! (sort (mapcar #'file-notify--test-event-action
! file-notify--test-events)
'string-lessp))
! (equal elt (mapcar #'file-notify--test-event-action
! file-notify--test-events))))))))
(defun file-notify--test-with-actions-explainer (actions)
"Explain why `file-notify--test-with-actions-check' fails."
(if (null (cdr actions))
(format "Received actions do not match expected actions\n%s\n%s"
! (mapcar #'file-notify--test-event-action file-notify--test-events)
! (car actions))
(format
"Received actions do not match any sequence of expected actions\n%s\n%s"
! (mapcar #'file-notify--test-event-action file-notify--test-events)
! actions)))
(put 'file-notify--test-with-actions-check 'ert-explainer
'file-notify--test-with-actions-explainer)
--- 553,577 ----
(or result
(if (eq (car elt) :random)
(equal (sort (cdr elt) 'string-lessp)
! (sort (file-notify--test-event-actions)
'string-lessp))
! (equal elt (file-notify--test-event-actions))))))
! ;; Do not report result in case we debug. Write messages instead.
! (if file-notify-debug
! (prog1 t
! (if result
! (message "Success\n%s" (file-notify--test-event-actions))
! (message (file-notify--test-with-actions-explainer actions))))
! result)))
(defun file-notify--test-with-actions-explainer (actions)
"Explain why `file-notify--test-with-actions-check' fails."
(if (null (cdr actions))
(format "Received actions do not match expected actions\n%s\n%s"
! (file-notify--test-event-actions) (car actions))
(format
"Received actions do not match any sequence of expected actions\n%s\n%s"
! (file-notify--test-event-actions) actions)))
(put 'file-notify--test-with-actions-check 'ert-explainer
'file-notify--test-with-actions-explainer)
***************
*** 632,640 ****
(file-notify--test-library) "gvfs-monitor-dir.exe")
'((deleted stopped)
(created deleted stopped)))
! ;; cygwin does not raise a `changed' event.
! ((eq system-type 'cygwin)
! '(created deleted stopped))
(t '(created changed deleted stopped)))
(write-region
"another text" nil file-notify--test-tmpfile nil 'no-message)
--- 638,647 ----
(file-notify--test-library) "gvfs-monitor-dir.exe")
'((deleted stopped)
(created deleted stopped)))
! ;; GFam{File,Directory}Monitor do not report the `changed' event.
! ((memq (file-notify--test-monitor)
! '(GFamFileMonitor GFamDirectoryMonitor))
! '(created deleted stopped))
(t '(created changed deleted stopped)))
(write-region
"another text" nil file-notify--test-tmpfile nil 'no-message)
***************
*** 665,670 ****
--- 672,683 ----
((string-equal (file-notify--test-library) "gvfs-monitor-dir.exe")
'((deleted stopped)
(changed deleted stopped)))
+ ;; GFam{File,Directory}Monitor do not detect the
+ ;; `changed' event reliably.
+ ((memq (file-notify--test-monitor)
+ '(GFamFileMonitor GFamDirectoryMonitor))
+ '((deleted stopped)
+ (changed deleted stopped)))
;; There could be one or two `changed' events.
(t '((changed deleted stopped)
(changed changed deleted stopped))))
***************
*** 709,717 ****
((getenv "EMACS_EMBA_CI")
'(created changed deleted))
;; There are two `deleted' events, for the file and for
! ;; the directory. Except for cygwin and kqueue. And
! ;; 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))
--- 722,732 ----
((getenv "EMACS_EMBA_CI")
'(created changed deleted))
;; There are two `deleted' events, for the file and for
! ;; the directory. Except for GFam{File,Directory}Monitor
! ;; and kqueue. And GFam{File,Directory}Monitor do not
! ;; raise a `changed' event.
! ((memq (file-notify--test-monitor)
! '(GFamFileMonitor GFamDirectoryMonitor))
'(created deleted stopped))
((string-equal (file-notify--test-library) "kqueue")
'(created changed deleted stopped))
***************
*** 755,762 ****
'((deleted stopped)
(created created deleted stopped)))
;; There are three `deleted' events, for two files and
! ;; for the directory. Except for cygwin and kqueue.
! ((eq system-type 'cygwin)
'(created created changed changed deleted stopped))
((string-equal (file-notify--test-library) "kqueue")
'(created changed created changed deleted stopped))
--- 770,779 ----
'((deleted stopped)
(created created deleted stopped)))
;; There are three `deleted' events, for two files and
! ;; for the directory. Except for
! ;; GFam{File,Directory}Monitor and kqueue.
! ((memq (file-notify--test-monitor)
! '(GFamFileMonitor GFamDirectoryMonitor))
'(created created changed changed deleted stopped))
((string-equal (file-notify--test-library) "kqueue")
'(created changed created changed deleted stopped))
***************
*** 813,822 ****
((getenv "EMACS_EMBA_CI")
'(created changed renamed deleted))
;; There are two `deleted' events, for the file and for
! ;; the directory. Except for cygwin and kqueue. And
! ;; cygwin raises `created' and `deleted' events instead
! ;; of a `renamed' event.
! ((eq system-type 'cygwin)
'(created created deleted deleted stopped))
((string-equal (file-notify--test-library) "kqueue")
'(created changed renamed deleted stopped))
--- 830,841 ----
((getenv "EMACS_EMBA_CI")
'(created changed renamed deleted))
;; There are two `deleted' events, for the file and for
! ;; the directory. Except for GFam{File,Directory}Monitor
! ;; and kqueue. And GFam{File,Directory}Monitor raise
! ;; `created' and `deleted' events instead of a `renamed'
! ;; event.
! ((memq (file-notify--test-monitor)
! '(GFamFileMonitor GFamDirectoryMonitor))
'(created created deleted deleted stopped))
((string-equal (file-notify--test-library) "kqueue")
'(created changed renamed deleted stopped))
***************
*** 837,844 ****
(file-notify--test-cleanup))
(unwind-protect
! ;; Check attribute change. Does not work for cygwin.
! (unless (eq system-type 'cygwin)
(setq file-notify--test-tmpfile (file-notify--test-make-temp-name))
(write-region
"any text" nil file-notify--test-tmpfile nil 'no-message)
--- 856,863 ----
(file-notify--test-cleanup))
(unwind-protect
! ;; Check attribute change. Does not work for GFam{File,Directory}Monitor.
! (progn
(setq file-notify--test-tmpfile (file-notify--test-make-temp-name))
(write-region
"any text" nil file-notify--test-tmpfile nil 'no-message)
***************
*** 847,875 ****
(file-notify--test-add-watch
file-notify--test-tmpfile
'(attribute-change) #'file-notify--test-event-handler)))
! (file-notify--test-with-actions
! (cond
! ;; w32notify does not distinguish between `changed' and
! ;; `attribute-changed'. Under MS Windows 7, we get four
! ;; `changed' events, and under MS Windows 10 just two.
! ;; Strange.
! ((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")
! (file-remote-p temporary-file-directory))
! '(attribute-changed attribute-changed attribute-changed))
! (t '(attribute-changed attribute-changed)))
! (write-region
! "any text" nil file-notify--test-tmpfile nil 'no-message)
! (file-notify--test-read-event)
! (set-file-modes file-notify--test-tmpfile 000)
! (file-notify--test-read-event)
! (set-file-times file-notify--test-tmpfile '(0 0))
! (file-notify--test-read-event)
! (delete-file file-notify--test-tmpfile))
(file-notify-rm-watch file-notify--test-desc)
;; The environment shall be cleaned up.
--- 866,896 ----
(file-notify--test-add-watch
file-notify--test-tmpfile
'(attribute-change) #'file-notify--test-event-handler)))
! (unless (memq (file-notify--test-monitor)
! '(GFamFileMonitor GFamDirectoryMonitor))
! (file-notify--test-with-actions
! (cond
! ;; w32notify does not distinguish between `changed' and
! ;; `attribute-changed'. Under MS Windows 7, we get
! ;; four `changed' events, and under MS Windows 10 just
! ;; two. Strange.
! ((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")
! (file-remote-p temporary-file-directory))
! '(attribute-changed attribute-changed attribute-changed))
! (t '(attribute-changed attribute-changed)))
! (write-region
! "any text" nil file-notify--test-tmpfile nil 'no-message)
! (file-notify--test-read-event)
! (set-file-modes file-notify--test-tmpfile 000)
! (file-notify--test-read-event)
! (set-file-times file-notify--test-tmpfile '(0 0))
! (file-notify--test-read-event)
! (delete-file file-notify--test-tmpfile)))
(file-notify-rm-watch file-notify--test-desc)
;; The environment shall be cleaned up.
***************
*** 951,957 ****
;; Modify file. We wait for two seconds, in order to
;; have another timestamp. One second seems to be too
! ;; short. And Cygwin sporadically requires more than two.
(ert-with-message-capture captured-messages
(sleep-for (if (eq system-type 'cygwin) 3 2))
(write-region
--- 972,978 ----
;; Modify file. We wait for two seconds, in order to
;; have another timestamp. One second seems to be too
! ;; short. And cygwin sporadically requires more than two.
(ert-with-message-capture captured-messages
(sleep-for (if (eq system-type 'cygwin) 3 2))
(write-region
***************
*** 1021,1026 ****
--- 1042,1053 ----
((string-equal (file-notify--test-library) "gvfs-monitor-dir.exe")
'((deleted stopped)
(changed deleted stopped)))
+ ;; GFam{File,Directory}Monitor do not detect the
+ ;; `changed' event reliably.
+ ((memq (file-notify--test-monitor)
+ '(GFamFileMonitor GFamDirectoryMonitor))
+ '((deleted stopped)
+ (changed deleted stopped)))
;; There could be one or two `changed' events.
(t '((changed deleted stopped)
(changed changed deleted stopped))))
***************
*** 1064,1072 ****
'((deleted stopped)
(created deleted stopped)))
;; There are two `deleted' events, for the file and for
! ;; the directory. Except for cygwin and kqueue. And
! ;; 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))
--- 1091,1102 ----
'((deleted stopped)
(created deleted stopped)))
;; There are two `deleted' events, for the file and for
! ;; the directory. Except for
! ;; GFam{File,Directory}Monitor and kqueue. And
! ;; GFam{File,Directory}Monitor do not raise a `changed'
! ;; event.
! ((memq (file-notify--test-monitor)
! '(GFamFileMonitor GFamDirectoryMonitor))
'(created deleted stopped))
((string-equal (file-notify--test-library) "kqueue")
'(created changed deleted stopped))
***************
*** 1169,1175 ****
file-notify--test-tmpfile
'(change) #'file-notify--test-event-handler)))
(unwind-protect
! (let ((n 1000)
source-file-list target-file-list
(default-directory file-notify--test-tmpfile))
(dotimes (i n)
--- 1199,1205 ----
file-notify--test-tmpfile
'(change) #'file-notify--test-event-handler)))
(unwind-protect
! (let ((n 10);00)
source-file-list target-file-list
(default-directory file-notify--test-tmpfile))
(dotimes (i n)
***************
*** 1198,1206 ****
(dotimes (_i n)
(setq r (append '(deleted renamed) r)))
r))
! ;; cygwin fires `changed' and `deleted' events, sometimes
! ;; in random order.
! ((eq system-type 'cygwin)
(let (r)
(dotimes (_i n)
(setq r (append '(changed deleted) r)))
--- 1228,1237 ----
(dotimes (_i n)
(setq r (append '(deleted renamed) r)))
r))
! ;; GFam{File,Directory}Monitor fire `changed' and
! ;; `deleted' events, sometimes in random order.
! ((memq (file-notify--test-monitor)
! '(GFamFileMonitor GFamDirectoryMonitor))
(let (r)
(dotimes (_i n)
(setq r (append '(changed deleted) r)))
***************
*** 1283,1291 ****
(should (file-notify-valid-p file-notify--test-desc))
(file-notify--test-with-actions
(cond
! ;; On cygwin we only get the `changed' event.
! ((eq system-type 'cygwin)
! '(changed))
(t '(renamed created changed)))
;; The file is renamed when creating a backup. It shall
;; still be watched.
--- 1314,1323 ----
(should (file-notify-valid-p file-notify--test-desc))
(file-notify--test-with-actions
(cond
! ;; GFam{File,Directory}Monitor report only the `changed' event.
! ((memq (file-notify--test-monitor)
! '(GFamFileMonitor GFamDirectoryMonitor))
! '(changed))
(t '(renamed created changed)))
;; The file is renamed when creating a backup. It shall
;; still be watched.
***************
*** 1355,1361 ****
(should (file-notify-valid-p file-notify--test-desc1))
(should (file-notify-valid-p file-notify--test-desc2))
(should-not (equal file-notify--test-desc1 file-notify--test-desc2))
! (let ((n 100))
;; Run the test.
(file-notify--test-with-actions
;; There could be one or two `changed' events.
--- 1387,1393 ----
(should (file-notify-valid-p file-notify--test-desc1))
(should (file-notify-valid-p file-notify--test-desc2))
(should-not (equal file-notify--test-desc1 file-notify--test-desc2))
! (let ((n 10));0))
;; Run the test.
(file-notify--test-with-actions
;; There could be one or two `changed' events.
***************
*** 1407,1416 ****
;; Now we delete the directory.
(file-notify--test-with-actions
(cond
! ;; In kqueue and for cygwin, just one `deleted' event for
! ;; the directory is received.
! ((or (eq system-type 'cygwin)
! (string-equal (file-notify--test-library) "kqueue"))
'(deleted stopped))
(t (append
;; The directory monitor raises a `deleted' event for
--- 1439,1450 ----
;; Now we delete the directory.
(file-notify--test-with-actions
(cond
! ;; GFam{File,Directory}Monitor and kqueue raise just one
! ;; `deleted' event for the directory.
! ((memq (file-notify--test-monitor)
! '(GFamFileMonitor GFamDirectoryMonitor))
! '(deleted stopped))
! ((string-equal (file-notify--test-library) "kqueue")
'(deleted stopped))
(t (append
;; The directory monitor raises a `deleted' event for
next prev parent reply other threads:[~2021-03-23 9:32 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <835z1nfvdw.fsf@gnu.org>
2021-03-19 13:42 ` bug#47262: [platform-testers] Emacs 27.2 RC2 Dagobert Michelsen
2021-03-19 14:05 ` Eli Zaretskii
2021-03-19 18:03 ` Robert Pluim
2021-03-19 20:09 ` Eli Zaretskii
2021-03-20 9:04 ` Michael Albinus
2021-03-20 14:14 ` Dagobert Michelsen
2021-03-20 15:52 ` Michael Albinus
2021-03-20 20:02 ` Dagobert Michelsen
2021-03-21 12:48 ` Michael Albinus
2021-03-22 14:17 ` Dagobert Michelsen
2021-03-22 14:47 ` Michael Albinus
2021-03-23 7:38 ` Dagobert Michelsen
2021-03-23 8:17 ` Michael Albinus
2021-03-23 8:42 ` Dagobert Michelsen
2021-03-23 9:32 ` Michael Albinus [this message]
2021-03-23 11:52 ` Dagobert Michelsen
2021-03-23 12:08 ` Michael Albinus
2021-10-21 21:19 ` Stefan Kangas
2021-10-22 6:32 ` Dagobert Michelsen
2021-12-02 22:41 ` Stefan Kangas
2021-12-05 10:09 ` Dagobert Michelsen
2021-12-05 10:42 ` Eli Zaretskii
2021-12-05 11:34 ` Dagobert Michelsen
2021-12-05 13:51 ` Eli Zaretskii
2022-06-25 12:00 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r1k65i6q.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=47262@debbugs.gnu.org \
--cc=dam@opencsw.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).