From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#25539: 26.0.50; filenotify-tests.el fails on Windows (32 and 64 bits) Date: Fri, 27 Jan 2017 08:54:42 +0100 Message-ID: <87k29hym2l.fsf@gmx.de> References: <837f5h3hoj.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1485503726 4492 195.159.176.226 (27 Jan 2017 07:55:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 27 Jan 2017 07:55:26 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: Juanma Barranquero , 25539@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 27 08:55:19 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1cX1NB-0007t1-Hd for geb-bug-gnu-emacs@m.gmane.org; Fri, 27 Jan 2017 08:55:05 +0100 Original-Received: from localhost ([::1]:43241 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cX1NG-0002bw-Lg for geb-bug-gnu-emacs@m.gmane.org; Fri, 27 Jan 2017 02:55:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40169) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cX1N9-0002bq-9u for bug-gnu-emacs@gnu.org; Fri, 27 Jan 2017 02:55:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cX1N8-00056N-BJ for bug-gnu-emacs@gnu.org; Fri, 27 Jan 2017 02:55:03 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48706) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cX1N8-000563-8Z for bug-gnu-emacs@gnu.org; Fri, 27 Jan 2017 02:55:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cX1N7-0003mN-Tk for bug-gnu-emacs@gnu.org; Fri, 27 Jan 2017 02:55:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 Jan 2017 07:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25539 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25539-submit@debbugs.gnu.org id=B25539.148550369614514 (code B ref 25539); Fri, 27 Jan 2017 07:55:01 +0000 Original-Received: (at 25539) by debbugs.gnu.org; 27 Jan 2017 07:54:56 +0000 Original-Received: from localhost ([127.0.0.1]:46905 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cX1N2-0003m1-AJ for submit@debbugs.gnu.org; Fri, 27 Jan 2017 02:54:56 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:57819) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cX1Mx-0003la-Pi for 25539@debbugs.gnu.org; Fri, 27 Jan 2017 02:54:52 -0500 Original-Received: from detlef.gmx.de ([93.197.214.250]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MPUlV-1cbgCg22wD-004j3X; Fri, 27 Jan 2017 08:54:43 +0100 In-Reply-To: <837f5h3hoj.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 26 Jan 2017 18:33:00 +0200") X-Provags-ID: V03:K0:9bfY5tL6wbWlViFRBk9y1RQjqrO0o5/R2T3Fbsk9rJPWsq7XOvr k9sySRprmySEZBnttxsQDm+yE9Ghfy6hKV0ReXkEvrhy+TNSNQDzksIyG3Gra2lKcgCBNhB CSEl+qIJmgBOhjaQOiVrx28vVyqMcHWYi4xG8IlfPoaeowUWUBhWgSoCx3KB5V2wX5O5c/f WUq1ACCGeLY2aMQlAlh2w== X-UI-Out-Filterresults: notjunk:1;V01:K0:F3uZcrPKpJc=:up/axnQAftGvZCNm7LNXUU jxkbv5pQyMnYWNpPYCmdMkr1BIdGZsgN0a8Hr67+leaumyqIYh0WHorNeWLS4f5Iaj1ute84x qOizemhz5/UTbIDB1xmgcrkod9G3uiFbhMahc5S25VKZRtKCSO+s6nyBV1b5HFnAT8AL0Ww1t RqiCwcUsRINMMEuUmE24buc4J+l9kN4CYbUpW7Ufb+dhhU2WzwJHe5072zqjm34wWMukISIWs EoyJyOqafHWtf4E8MloIGzfSv9w/CAuBubRj005RccfPWC5d3j1n4kPZ5P+wYHP1vVx1syTYo r68QFsVVjvcAkkSXHP+G1t4emK0DBIRedh9Ka5x20B/A25/i6/XMLaMP4mRIlkGsuPgUu/wPq 6qhW3ztSCXtzMMPGGjsxILB48TomT4VCPYfB2DNgjnEUKd6phVh9UAimnC6IuLh/p/IRpLrxD ksdy/EcywjdHiHIWUgzHEp+ivw5CSmiF41vJWrJr15TccsSwybaiGBdnEbhvbICpmBBPmPQZ/ 8SyNhqmKBLw833R9VjtceNFTCWTHPKbWR1DnXhYoaLpwMC23yO8P5Vlp6EUwUpV+3vZXpZX5z rtV4deT8YIEyP4SnNUJwKGyq6YorvDn35B5xPgTFXgsBNPaoQYHptGlTR5qmk/zTjFshK7L9e 7D4y0wruswnVzyr+i94/g+yGSbVsxYvXmdPvyYHEo7q8GnuE6OuJR9C3R9gAaLiuqafdNJgHk QO5FRscn7kJ0LdI3bh+IWydtj0cIk0VzOs5IuQugqnl6DZbf7RwZ77ocvRjl05fHV5OogZua X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:128643 Archived-At: Eli Zaretskii writes: Hi Eli, >> 4 unexpected results: >> FAILED file-notify-test04-file-validity >> FAILED file-notify-test05-dir-validity >> FAILED file-notify-test06-many-events >> FAILED file-notify-test08-watched-file-in-watched-dir > > The problem is in file-notify--test-cleanup-p, and it happens only > when the parent directory of the file(s) being watched is deleted. > > The root cause is that file-notify--test-cleanup-p expects the > notification descriptor(s) to be deleted from the hash table > maintained internally by filenotify.el, when the above happens. But > that doesn't work on Windows, where deleting the parent directory > simply causes an error whose result is that the thread which watches > the filesystem changes exits abnormally, but the event is not > reported. So in those cases the descriptor is not removed from the > hash table. > > The changes below make the tests succeed, but maybe the above means we > need to augment the w32notify implementation to clean up better in > this case. Michael? Yes, catching the error somehow in w32notify (don't know how) and fire up a `stopped' event is preferrable. I let it to you, whether this could be implemented. If this is not possible, maybe we shall call `file-notify--rm-descriptor' in `file-notify-valid-p', when we detect that the descriptor is not valid anymore, but it still exists. > @@ -850,6 +850,8 @@ file-notify--test-with-events > ;; After deleting the parent directory, the descriptor must > ;; not be valid anymore. > (should-not (file-notify-valid-p file-notify--test-desc)) > + (if (eq system-type 'windows-nt) > + (file-notify--rm-descriptor file-notify--test-desc)) It would be OK for me also to apply this patch. The test shall be (if (string-equal (file-notify--test-library) "w32notify") Otherwise, we would catch also the remote case when running the test on MS Windows. And a respective comment might serve why we apply this. Best regards, Michael.