From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Fabrice Popineau Newsgroups: gmane.emacs.devel Subject: Re: master 326fff4: Improve w32notify notifications Date: Mon, 21 Mar 2016 07:03:57 +0100 Message-ID: References: <20160319124618.27869.30424@vcs.savannah.gnu.org> <87mvpu33kt.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c09532ee71af6052e88dd5e X-Trace: ger.gmane.org 1458540266 27324 80.91.229.3 (21 Mar 2016 06:04:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Mar 2016 06:04:26 +0000 (UTC) Cc: Emacs developers To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 21 07:04:25 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ahswz-0005Bz-DI for ged-emacs-devel@m.gmane.org; Mon, 21 Mar 2016 07:04:25 +0100 Original-Received: from localhost ([::1]:55767 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahswy-0006tZ-Hc for ged-emacs-devel@m.gmane.org; Mon, 21 Mar 2016 02:04:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40311) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahswu-0006tI-3D for emacs-devel@gnu.org; Mon, 21 Mar 2016 02:04:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ahsws-0005HK-UW for emacs-devel@gnu.org; Mon, 21 Mar 2016 02:04:20 -0400 Original-Received: from mail-oi0-x229.google.com ([2607:f8b0:4003:c06::229]:35772) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahsws-0005HC-O9 for emacs-devel@gnu.org; Mon, 21 Mar 2016 02:04:18 -0400 Original-Received: by mail-oi0-x229.google.com with SMTP id w20so76364898oia.2 for ; Sun, 20 Mar 2016 23:04:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=WfsH2l7aWbUPlEdhqNeJwbq0+R4qUxyQaU3v11oA1vI=; b=OYBHp3zTYlK6CTuaBxHthuFj9gBf4uMR3xyQf0kuDeGGumG/PVPYP466d7ZnaEea9G KDOKxf1OTyUl6tk5nIGRuAjlNosn28t4ggYmXZsXjmGhZ8601jMlmbF6/Dw9bTh5BZpS JIZw9M+UnEvMXXF7mWi6egJAIK3GTOnY/rqoVGQfH7e+M512DAi4UcCwjrYEtqdeJUGl RUP74Z6FSztBi4nWLx14SG08lSSIUr+qwfqtJCMkyvHGwmYkqHInYljcFLq0n+eAXSNG 38C68tbAzMCu59zVjG75xEF1l8dsIPJxHYFMhh9hBgoXt4j8t3idKqeSDdN9EtxOT91i U3Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=WfsH2l7aWbUPlEdhqNeJwbq0+R4qUxyQaU3v11oA1vI=; b=Bs/hgnKPxErfVnxftRNgjIYkFjxkX/OBHObeL6qYRWi0giV4mNJ8SOkPvSB56JKEOI BikCxvxzHx+FfMua/gNP1k7DlOhNfXyc9aTKe9K8G5cA+m1kZnVuMThL8BXLIDnt0IC6 Ntu4lZ2gAaX9LIUp6lRHT1hTYPwQATMGPe1WAdWTea+5uobBwokkPAbISRPd6G7TYJNm kCsr+jm8kfsx3PrxiwrXLL4+hDYXkFV8+jMhK/1pUhypDrwMTn1G2SgG4rLtxVJBGXfJ 4BsOIjo3OcBTHcuKy1APWXNL2f8rvJRKA2sJNqxjqurNCOgA0HiDZ8cVlRwpyiq6wGgG sUPQ== X-Gm-Message-State: AD7BkJKPN6vNgvz2sQT1ursvKydRt/ckKVOdtRIziJLFgMJyXPFZbaXL7YkbD90bhyNCPpVNI2DG0stJKIjZVw== X-Received: by 10.202.242.2 with SMTP id q2mr16044003oih.137.1458540256891; Sun, 20 Mar 2016 23:04:16 -0700 (PDT) Original-Received: by 10.202.64.70 with HTTP; Sun, 20 Mar 2016 23:03:57 -0700 (PDT) In-Reply-To: <87mvpu33kt.fsf@gmx.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c06::229 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:201972 Archived-At: --94eb2c09532ee71af6052e88dd5e Content-Type: text/plain; charset=UTF-8 2016-03-19 16:11 GMT+01:00 Michael Albinus : > Hi Fabrice, > > > diff --git a/test/lisp/filenotify-tests.el > b/test/lisp/filenotify-tests.el > > index d3610f0..3908894 100644 > > --- a/test/lisp/filenotify-tests.el > > +++ b/test/lisp/filenotify-tests.el > > @@ -754,7 +757,9 @@ longer than timeout seconds for the events to be > delivered." > > (should (file-notify-valid-p file-notify--test-desc)) > > ;; After removing the watch, the descriptor must not be valid > > ;; anymore. > > + (read-event nil nil file-notify--test-read-event-timeout) > > (file-notify-rm-watch file-notify--test-desc) > > + (read-event nil nil file-notify--test-read-event-timeout) > > (file-notify--wait-for-events > > (file-notify--test-timeout) > > (not (file-notify-valid-p file-notify--test-desc))) > > @@ -776,7 +781,9 @@ longer than timeout seconds for the events to be > delivered." > > (should (file-notify-valid-p file-notify--test-desc)) > > ;; After deleting the directory, the descriptor must not be > > ;; valid anymore. > > + (read-event nil nil file-notify--test-read-event-timeout) > > (delete-directory file-notify--test-tmpfile t) > > + (read-event nil nil file-notify--test-read-event-timeout) > > (file-notify--wait-for-events > > (file-notify--test-timeout) > > (not (file-notify-valid-p file-notify--test-desc))) > > I'm curious why you need the additional `read-event' calls. The > following `file-notify--wait-for-events' loops until the condition is > satisfied, calling `read-event' every iteration. > > Oh ... sorry, yes, we should revert those read-event calls then. I added them mechanically, overlooking the macro. Fabrice --94eb2c09532ee71af6052e88dd5e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


2016-03-19 16:11 GMT+01:00 Michael Albinus <michael.albinus@gmx.d= e>:
Hi Fabrice,

> diff --git a/test/lisp/filenotify-tests.el b/test/lisp/filenotify-test= s.el
> index d3610f0..3908894 100644
> --- a/test/lisp/filenotify-tests.el
> +++ b/test/lisp/filenotify-tests.el
> @@ -754,7 +757,9 @@ longer than timeout seconds for the events to be d= elivered."
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (should (file-notify-valid-p file-no= tify--test-desc))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; After removing the watch, the des= criptor must not be valid
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; anymore.
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 (read-event nil nil file-notify--test-rea= d-event-timeout)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (file-notify-rm-watch file-notify--t= est-desc)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 (read-event nil nil file-notify--test-rea= d-event-timeout)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (file-notify--wait-for-events
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(file-notify--test-timeout) >=C2=A0 =C2=A0 =C2=A0 =C2=A0 (not (file-notify-valid-p file-notify--test= -desc)))
> @@ -776,7 +781,9 @@ longer than timeout seconds for the events to be d= elivered."
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (should (file-notify-valid-p file-no= tify--test-desc))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; After deleting the directory, the= descriptor must not be
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; valid anymore.
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 (read-event nil nil file-notify--test-rea= d-event-timeout)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (delete-directory file-notify--test-= tmpfile t)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 (read-event nil nil file-notify--test-rea= d-event-timeout)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (file-notify--wait-for-events
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (file-notify--test-timeout)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (not (file-notify-valid-p file-notify--test= -desc)))

I'm curious why you need the additional `read-event' calls. The
following `file-notify--wait-for-events' loops until the condition is satisfied, calling `read-event' every iteration.


Oh ... sorry, yes, we should revert th= ose read-event calls then.
I added them mechanically, overlooking= the macro.

Fabrice

--94eb2c09532ee71af6052e88dd5e--