all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@users.sourceforge.net>
To: Gemini Lasswell <gazally@runbox.com>
Cc: 28333@debbugs.gnu.org
Subject: bug#28333: 26.0.50; Backtrace not printed when ERT test fails
Date: Sat, 2 Sep 2017 17:28:51 -0400	[thread overview]
Message-ID: <CAM-tV-8=MM=o67y8GoNGfADPz9vNNZNWBNx_GdweY4RHCobWgw@mail.gmail.com> (raw)
In-Reply-To: <87a82caowm.fsf@chinook>

tag 28333 confirmed
quit

On Sat, Sep 2, 2017 at 3:20 PM, Gemini Lasswell <gazally@runbox.com> wrote:
> ERT used to print a backtrace for every failed test, but recently that
> stopped happening. I git bisected and found that the commit which
> introduced the problem is ead545824e, "Improve ert backtrace
> recording".

Hah, ironic isn't it. The problem is this code here:

              ;; Grab the frames starting from `signal', frames below
              ;; that are all from the debugger.
              (backtrace (backtrace-frames 'signal))

When the error comes from division by 0, there is `signal' frame at
all, hence we store `nil' as the backtrace. Maybe this could be fixed
with something equivalent to the following?

--- i/lisp/emacs-lisp/ert.el
+++ w/lisp/emacs-lisp/ert.el
@@ -739,7 +739,8 @@ ert--run-test-debugger
               ;;
               ;; Grab the frames starting from `signal', frames below
               ;; that are all from the debugger.
-              (backtrace (backtrace-frames 'signal))
+              (backtrace (or (backtrace-frames 'signal)
+                             (cdr (backtrace-frames 'ert--run-test-debugger))))
               (infos (reverse ert--infos)))
          (setf (ert--test-execution-info-result info)
                (cl-ecase type





  reply	other threads:[~2017-09-02 21:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-02 19:20 bug#28333: 26.0.50; Backtrace not printed when ERT test fails Gemini Lasswell
2017-09-02 21:28 ` Noam Postavsky [this message]
2017-09-14 23:39   ` Gemini Lasswell
2017-09-23 15:48     ` Noam Postavsky
2017-09-29  0:11       ` Noam Postavsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAM-tV-8=MM=o67y8GoNGfADPz9vNNZNWBNx_GdweY4RHCobWgw@mail.gmail.com' \
    --to=npostavs@users.sourceforge.net \
    --cc=28333@debbugs.gnu.org \
    --cc=gazally@runbox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.