From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ken Brown Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 716b468: Extend `file-notify-test02-rm-watch' Date: Fri, 7 Apr 2017 10:56:31 -0400 Message-ID: <3b093156-b214-7e90-58a4-06343c1c73c8@cornell.edu> References: <20170322131610.22658.57119@vcs0.savannah.gnu.org> <20170322131611.5FF7D20E17@vcs0.savannah.gnu.org> <70055ee8-c1cb-30d2-8a0b-38637adad497@cornell.edu> <87mvbutvo6.fsf@luca> <4f1308e2-0b49-ef3e-fae7-02bdd8dc75ef@cornell.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1491577014 16794 195.159.176.226 (7 Apr 2017 14:56:54 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 7 Apr 2017 14:56:54 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 Cc: Michael Albinus , emacs-devel@gnu.org To: Andreas Politz Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 07 16:56:48 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwVJZ-00036j-T0 for ged-emacs-devel@m.gmane.org; Fri, 07 Apr 2017 16:56:42 +0200 Original-Received: from localhost ([::1]:51335 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cwVJf-0006jk-ST for ged-emacs-devel@m.gmane.org; Fri, 07 Apr 2017 10:56:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41473) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cwVJW-0006iS-9d for emacs-devel@gnu.org; Fri, 07 Apr 2017 10:56:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cwVJS-0004GK-Ss for emacs-devel@gnu.org; Fri, 07 Apr 2017 10:56:38 -0400 Original-Received: from limerock04.mail.cornell.edu ([128.84.13.244]:45564) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cwVJS-0004GA-Nc for emacs-devel@gnu.org; Fri, 07 Apr 2017 10:56:34 -0400 X-CornellRouted: This message has been Routed already. Original-Received: from authusersmtp.mail.cornell.edu (granite3.serverfarm.cornell.edu [10.16.197.8]) by limerock04.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id v37EuUEF018859; Fri, 7 Apr 2017 10:56:31 -0400 Original-Received: from [10.128.134.154] (dhcp-gs-1690.eduroam.cornell.edu [10.128.134.154]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id v37EuTAs022394 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 7 Apr 2017 10:56:30 -0400 In-Reply-To: <4f1308e2-0b49-ef3e-fae7-02bdd8dc75ef@cornell.edu> X-PMX-Cornell-Gauge: Gauge=XX X-PMX-CORNELL-AUTH-RESULTS: dkim-out=none; X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 128.84.13.244 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:213755 Archived-At: On 4/5/2017 10:59 PM, Ken Brown wrote: > On 4/5/2017 5:02 PM, Andreas Politz wrote: >> Ken Brown writes: >> >>> This may be another of those timing issues that we've dealt with >>> before [...]. >> >> I think it is as well. If cygwin's file-notify back-end runs on a >> polling >> timer, we need to make sure that it has acknowledged the file's >> existence before we delete it. Maybe you could try out the following >> patch. >> >> >> >> diff --git a/test/lisp/filenotify-tests.el >> b/test/lisp/filenotify-tests.el >> index 54e7ebfc0e..9b5c751021 100644 >> --- a/test/lisp/filenotify-tests.el >> +++ b/test/lisp/filenotify-tests.el >> @@ -425,6 +425,7 @@ file-notify--test-make-temp-name >> '(change) #'second-callback))) >> ;; Remove first watch. >> (file-notify-rm-watch file-notify--test-desc) >> + (file-notify--test-read-event) >> ;; Only the second callback shall run. >> (delete-file file-notify--test-tmpfile) >> (file-notify--wait-for-events > > No, it still fails. You're on the right track, however. The following patch does fix the problem: --- a/test/lisp/filenotify-tests.el +++ b/test/lisp/filenotify-tests.el @@ -425,6 +425,7 @@ file-notify--test-make-temp-name '(change) #'second-callback))) ;; Remove first watch. (file-notify-rm-watch file-notify--test-desc) + (sit-for 0.1) ;; Only the second callback shall run. (delete-file file-notify--test-tmpfile) (file-notify--wait-for-events Ken