all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: 58941@debbugs.gnu.org
Subject: bug#58941: 28.1.90; ERT tests and backtraces
Date: Tue, 01 Nov 2022 06:04:49 +0000	[thread overview]
Message-ID: <874jvjjjlq.fsf@localhost> (raw)

Hi,

Currently, when one runs tests and error is thrown inside `should'
forms, no meaningful backtrace is being produced.

This is because `should' wraps the code into `condition-case' that
truncates the backtraces.

Would it be possible to allow more informative backtraces in failed ERT
tests?

An example of useless backtrace can be found in
https://builds.sr.ht/~bzg/job/872738:

Test test-ob-scheme/unspecified backtrace:
  signal(void-function (p))
  apply(signal (void-function (p)))
  (setq value-1494 (apply fn-1492 args-1493))
  (unwind-protect (setq value-1494 (apply fn-1492 args-1493)) (setq fo
  (if (unwind-protect (setq value-1494 (apply fn-1492 args-1493)) (set
  (let (form-description-1496) (if (unwind-protect (setq value-1494 (a
  (let ((value-1494 (quote ert-form-evaluation-aborted-1495))) (let (f
  (let* ((fn-1492 (function equal)) (args-1493 (condition-case err (le
  (closure (t) nil (let* ((fn-1492 (function equal)) (args-1493 (condi
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name test-ob-scheme/unspecified :documenta
  ert-run-or-rerun-test(#s(ert--stats :selector "\\(org\\|ob\\|ox\\)" 
  ert-run-tests("\\(org\\|ob\\|ox\\)" #f(compiled-function (event-type
  ert-run-tests-batch("\\(org\\|ob\\|ox\\)")
  ert-run-tests-batch-and-exit("\\(org\\|ob\\|ox\\)")
  (let ((org-id-track-globally t) (org-test-selector (if org-test-sele
  org-test-run-batch-tests("\\(org\\|ob\\|ox\\)")
  eval((org-test-run-batch-tests org-test-select-re))
  command-line-1(("--load" "/home/build/.emacs.d/init.el" "--eval" "(s
  command-line()
  normal-top-level()
Test test-ob-scheme/unspecified condition:
    (void-function p)
   FAILED   236/1034  test-ob-scheme/unspecified

The real backtrace there is

  p(nil)
  geiser-repl-project-root()
  geiser-repl-buffer-name(guile)
  geiser-repl--to-repl-buffer(guile)
  geiser-repl--start-repl(guile nil)
  geiser(guile)
  org-babel-scheme-get-repl(guile nil)
  org-babel-scheme-execute-with-geiser("'(1 2 3)" nil guile nil)
  org-babel-execute:scheme("'(1 2 3)" ((:colname-names) (:rowname-name
  org-babel-execute-src-block(nil)
  org-babel-execute-src-block-maybe()
  org-babel-execute-maybe()

      
-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>





             reply	other threads:[~2022-11-01  6:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-01  6:04 Ihor Radchenko [this message]
2022-11-01  7:24 ` bug#58941: 28.1.90; ERT tests and backtraces Gerd Möllmann
2022-11-01  8:31   ` Ihor Radchenko
2022-11-01  8:38     ` Gerd Möllmann
2022-11-01  9:59   ` Stefan Kangas

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=874jvjjjlq.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=58941@debbugs.gnu.org \
    /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.