GNU bug report logs - #55849
29.0.50; process-async-https-with-delay error detection is wrong

Previous Next

Package: emacs;

Reported by: Ken Brown <kbrown <at> cornell.edu>

Date: Wed, 8 Jun 2022 16:36:01 UTC

Severity: normal

Found in version 29.0.50

Done: Ken Brown <kbrown <at> cornell.edu>

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 55849 in the body.
You can then email your comments to 55849 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#55849; Package emacs. (Wed, 08 Jun 2022 16:36:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ken Brown <kbrown <at> cornell.edu>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 08 Jun 2022 16:36:01 GMT) Full text and rfc822 format available.

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

From: Ken Brown <kbrown <at> cornell.edu>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; process-async-https-with-delay error detection is wrong
Date: Wed, 8 Jun 2022 12:30:31 -0400
process-async-https-with-delay in test/src/process-tests.el fails on
Cygwin as follows:

Test process-async-https-with-delay condition:
    (ert-test-failed
     ((should
       (>
        (buffer-size buf)
        0))
      :form
      (> 0 0)
      :value nil))

I haven't yet figured out why, but in attempting to debug this I
discovered that the error reporting in the test is faulty.  What
actually happens is that the connection fails, and this failure is
indicated by the 'status' variable.  The latter is a plist, but the test
uses '(should-not (assq :error status))' as though it were an alist.

The following patch fixes the problem:

diff --git a/test/src/process-tests.el b/test/src/process-tests.el
index f5908d3cda..824c6da119 100644
--- a/test/src/process-tests.el
+++ b/test/src/process-tests.el
@@ -931,7 +931,7 @@ process-async-https-with-delay
                         (< (float-time) (+ t0 limit)))
               (sit-for 0.1)))
           (should status)
-          (should-not (assq :error status))
+          (should-not (plist-get status ':error))
           (should buf)
           (should (> (buffer-size buf) 0))
           )

With this patch the correct reason for the failure is shown:

Test process-async-https-with-delay condition:
    (ert-test-failed
     ((should-not
       (plist-get status ':error))
      :form
      (plist-get
       (:error
         (error connection-failed "deleted\n" :host "elpa.gnu.org" :service 443))
       :error)
      :value
      (error connection-failed "deleted\n" :host "elpa.gnu.org" :service 443)))

OK to apply?  If so, to which branch?  The problem exists on both master
and the release branch.

Ken




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55849; Package emacs. (Wed, 08 Jun 2022 16:54:03 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ken Brown <kbrown <at> cornell.edu>
Cc: 55849 <at> debbugs.gnu.org
Subject: Re: bug#55849: 29.0.50;
 process-async-https-with-delay error detection is wrong
Date: Wed, 08 Jun 2022 19:52:51 +0300
> Date: Wed, 8 Jun 2022 12:30:31 -0400
> From: Ken Brown <kbrown <at> cornell.edu>
> 
> diff --git a/test/src/process-tests.el b/test/src/process-tests.el
> index f5908d3cda..824c6da119 100644
> --- a/test/src/process-tests.el
> +++ b/test/src/process-tests.el
> @@ -931,7 +931,7 @@ process-async-https-with-delay
>                           (< (float-time) (+ t0 limit)))
>                 (sit-for 0.1)))
>             (should status)
> -          (should-not (assq :error status))
> +          (should-not (plist-get status ':error))
>             (should buf)
>             (should (> (buffer-size buf) 0))
>             )
> 
> With this patch the correct reason for the failure is shown:
> 
> Test process-async-https-with-delay condition:
>      (ert-test-failed
>       ((should-not
>         (plist-get status ':error))
>        :form
>        (plist-get
>         (:error
>           (error connection-failed "deleted\n" :host "elpa.gnu.org" :service 443))
>         :error)
>        :value
>        (error connection-failed "deleted\n" :host "elpa.gnu.org" :service 443)))
> 
> OK to apply?

Yes, please.

> If so, to which branch?  The problem exists on both master
> and the release branch.

Please install on the release branch, and thanks.




Reply sent to Ken Brown <kbrown <at> cornell.edu>:
You have taken responsibility. (Wed, 08 Jun 2022 17:13:01 GMT) Full text and rfc822 format available.

Notification sent to Ken Brown <kbrown <at> cornell.edu>:
bug acknowledged by developer. (Wed, 08 Jun 2022 17:13:01 GMT) Full text and rfc822 format available.

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

From: Ken Brown <kbrown <at> cornell.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 55849-done <at> debbugs.gnu.org
Subject: Re: bug#55849: 29.0.50; process-async-https-with-delay error
 detection is wrong
Date: Wed, 8 Jun 2022 13:12:32 -0400
On 6/8/2022 12:52 PM, Eli Zaretskii wrote:
> Please install on the release branch, and thanks.

Done.  Closing.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 07 Jul 2022 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 350 days ago.

Previous Next


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