all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ken Brown <kbrown@cornell.edu>
To: 32363@debbugs.gnu.org
Subject: bug#32363: 27.0.50; Sporadic file-notify test error on Cygwin
Date: Fri, 3 Aug 2018 10:47:03 -0400	[thread overview]
Message-ID: <08f14aae-afd8-5566-ac11-7ecbe8236e4f@cornell.edu> (raw)

[-- Attachment #1: Type: text/plain, Size: 222 bytes --]

file-notify-test04-autorevert fails sporadically on Cygwin, due to
timing issues.  The attached patch seems to fix it.  I've run it in a
loop of 100 trials several times, on two different computers, with no
failures.

Ken

[-- Attachment #2: 0001-Fix-a-filenotify-test-failure-on-Cygwin.patch --]
[-- Type: text/plain, Size: 1182 bytes --]

From 12eaf6fa377b7d19359a7af4ae486e2c4a61c965 Mon Sep 17 00:00:00 2001
From: Ken Brown <kbrown@cornell.edu>
Date: Fri, 3 Aug 2018 10:37:04 -0400
Subject: [PATCH] Fix a filenotify test failure on Cygwin

* test/lisp/filenotify-tests.el
(file-notify-test04-autorevert): Increase a sleep-for time
from 2 to 3 on Cygwin.  This avoids sporadic failures of the
test.  (Bug#99999)
---
 test/lisp/filenotify-tests.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/lisp/filenotify-tests.el b/test/lisp/filenotify-tests.el
index 56403f4309..612ea8cd7f 100644
--- a/test/lisp/filenotify-tests.el
+++ b/test/lisp/filenotify-tests.el
@@ -891,9 +891,9 @@ file-notify--test-with-events
 
 	    ;; Modify file.  We wait for two seconds, in order to
 	    ;; have another timestamp.  One second seems to be too
-            ;; short.
+            ;; short.  And Cygwin sporadically requires more than two.
             (ert-with-message-capture captured-messages
-              (sleep-for 2)
+              (sleep-for (if (eq system-type 'cygwin) 3 2))
               (write-region
                "foo bla" nil file-notify--test-tmpfile nil 'no-message)
 
-- 
2.17.0


             reply	other threads:[~2018-08-03 14:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-03 14:47 Ken Brown [this message]
2018-08-03 16:52 ` bug#32363: 27.0.50; Sporadic file-notify test error on Cygwin Michael Albinus
2018-08-03 19:36   ` Ken Brown

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=08f14aae-afd8-5566-ac11-7ecbe8236e4f@cornell.edu \
    --to=kbrown@cornell.edu \
    --cc=32363@debbugs.gnu.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.