GNU bug report logs - #38813
Make comint-tests more robust

Previous Next

Package: emacs;

Reported by: Mattias Engdegård <mattiase <at> acm.org>

Date: Mon, 30 Dec 2019 14:14:02 UTC

Severity: normal

Tags: patch

Done: Mattias Engdegård <mattiase <at> acm.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 38813 in the body.
You can then email your comments to 38813 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#38813; Package emacs. (Mon, 30 Dec 2019 14:14:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mattias Engdegård <mattiase <at> acm.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 30 Dec 2019 14:14:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mattias Engdegård <mattiase <at> acm.org>
To: bug-gnu-emacs <at> gnu.org
Cc: "Michael R. Mauger" <michael <at> mauger.com>
Subject: Make comint-tests more robust
Date: Mon, 30 Dec 2019 14:57:03 +0100
[Message part 1 (text/plain, inline)]
There seem to be races in the new comint-tests; they frequently hang and/or fail when run (make check) on macOS.
This patch should improve matters. OK for emacs-27?

[0001-Make-comint-tests-more-robust.patch (application/octet-stream, attachment)]

Added tag(s) patch. Request was from Mattias Engdegård <mattiase <at> acm.org> to control <at> debbugs.gnu.org. (Mon, 30 Dec 2019 14:16:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38813; Package emacs. (Mon, 30 Dec 2019 15:21:02 GMT) Full text and rfc822 format available.

Message #10 received at 38813 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Mattias Engdegård <mattiase <at> acm.org>
Cc: "Michael R. Mauger" <michael <at> mauger.com>, 38813 <at> debbugs.gnu.org
Subject: Re: bug#38813: Make comint-tests more robust
Date: Mon, 30 Dec 2019 16:20:30 +0100
Mattias Engdegård <mattiase <at> acm.org> writes:

> There seem to be races in the new comint-tests; they frequently hang
> and/or fail when run (make check) on macOS.
> This patch should improve matters. OK for emacs-27?

> -            (accept-process-output proc 0 1 t)
> +            (accept-process-output proc 0 100 t)
> +            (accept-process-output proc 0 100 t)

The usual pattern is (while (accept-process-output proc 0 nil t))
That's what I do in tramp-tests.el

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38813; Package emacs. (Mon, 30 Dec 2019 16:20:02 GMT) Full text and rfc822 format available.

Message #13 received at 38813 <at> debbugs.gnu.org (full text, mbox):

From: Mattias Engdegård <mattiase <at> acm.org>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: "Michael R. Mauger" <michael <at> mauger.com>, 38813 <at> debbugs.gnu.org
Subject: Re: bug#38813: Make comint-tests more robust
Date: Mon, 30 Dec 2019 17:19:08 +0100
30 dec. 2019 kl. 16.20 skrev Michael Albinus <michael.albinus <at> gmx.de>:

> The usual pattern is (while (accept-process-output proc 0 nil t))
> That's what I do in tramp-tests.el

Thank you, but that only works if inside another loop, and then it is a busy-wait, right?
We don't really have a predicate to tell us when we need to stop waiting, unless we use the test condition for that.
We could do

 (while (accept-process-output proc 0.1 nil t))

which isn't strictly necessary since the test logic guarantees that only two accept-process-output calls should be needed, but it doesn't hurt (much).





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38813; Package emacs. (Mon, 30 Dec 2019 18:29:01 GMT) Full text and rfc822 format available.

Message #16 received at 38813 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Mattias Engdegård <mattiase <at> acm.org>
Cc: "Michael R. Mauger" <michael <at> mauger.com>, 38813 <at> debbugs.gnu.org
Subject: Re: bug#38813: Make comint-tests more robust
Date: Mon, 30 Dec 2019 19:28:37 +0100
Mattias Engdegård <mattiase <at> acm.org> writes:

>> The usual pattern is (while (accept-process-output proc 0 nil t))
>> That's what I do in tramp-tests.el
>
> Thank you, but that only works if inside another loop, and then it is
> a busy-wait, right?

I'm not sure. Some months (years?) ago there was a discussion about on
emacs-devel, and AFAIR this form was proposed by Stefan.

If needed, I could check the archives.

Best regards, Michael.




Reply sent to Mattias Engdegård <mattiase <at> acm.org>:
You have taken responsibility. (Mon, 30 Dec 2019 20:06:02 GMT) Full text and rfc822 format available.

Notification sent to Mattias Engdegård <mattiase <at> acm.org>:
bug acknowledged by developer. (Mon, 30 Dec 2019 20:06:02 GMT) Full text and rfc822 format available.

Message #21 received at 38813-done <at> debbugs.gnu.org (full text, mbox):

From: Mattias Engdegård <mattiase <at> acm.org>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: "Michael R. Mauger" <michael <at> mauger.com>, 38813-done <at> debbugs.gnu.org
Subject: Re: bug#38813: Make comint-tests more robust
Date: Mon, 30 Dec 2019 21:05:22 +0100
30 dec. 2019 kl. 19.28 skrev Michael Albinus <michael.albinus <at> gmx.de>:

> I'm not sure. Some months (years?) ago there was a discussion about on
> emacs-devel, and AFAIR this form was proposed by Stefan.
> 
> If needed, I could check the archives.

Thank you, I don't think that's necessary. The improved patch has been pushed to emacs-27.





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 28 Jan 2020 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 61 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.