Subject: bug#50629: 28.0.50; hard to debug an uncaught error with ert

From: Lars Ingebrigtsen <[email-masked]>
Date: Sat, 27 Aug 2022 15:52:45 +0200

Gerd Möllmann <[email-masked]> writes:

> The backtrace we have already.  It's the "unreadable" stuff that ERT
> prints.

No, that's not the backtrace (that we're interested in).

With this example:

emake; ./src/emacs -Q -batch -l ert -eval '(ert-deftest f () (setq debug-on-error t) (defun foo () (bar)) (defun bar () (zot)) (should (equal 42 (foo))))' -f ert-run-tests-batch-and-exit

We'd like to see a backtrace that mentions that zot was called by bar,
and that bar was called by foo.  Instead we get:

Test f backtrace:
  signal(void-function (zot))
  apply(signal (void-function (zot)))
  (setq value-2 (apply fn-0 args-1))
  (unwind-protect (setq value-2 (apply fn-0 args-1)) (setq form-descri

Note that there's no mention of foo or bar.