unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#58941: 28.1.90; ERT tests and backtraces
@ 2022-11-01  6:04 Ihor Radchenko
  2022-11-01  7:24 ` Gerd Möllmann
  0 siblings, 1 reply; 5+ messages in thread
From: Ihor Radchenko @ 2022-11-01  6:04 UTC (permalink / raw)
  To: 58941

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>





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#58941: 28.1.90; ERT tests and backtraces
  2022-11-01  6:04 bug#58941: 28.1.90; ERT tests and backtraces Ihor Radchenko
@ 2022-11-01  7:24 ` Gerd Möllmann
  2022-11-01  8:31   ` Ihor Radchenko
  2022-11-01  9:59   ` Stefan Kangas
  0 siblings, 2 replies; 5+ messages in thread
From: Gerd Möllmann @ 2022-11-01  7:24 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: 58941

Ihor Radchenko <yantar92@posteo.net> writes:

> 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:

Yep, that's bug#50629@.  No solution in sight, I'm afraid.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#58941: 28.1.90; ERT tests and backtraces
  2022-11-01  7:24 ` 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
  1 sibling, 1 reply; 5+ messages in thread
From: Ihor Radchenko @ 2022-11-01  8:31 UTC (permalink / raw)
  To: Gerd Möllmann; +Cc: 58941

Gerd Möllmann <gerd.moellmann@gmail.com> writes:

>> An example of useless backtrace can be found in
>> https://builds.sr.ht/~bzg/job/872738:
>
> Yep, that's bug#50629@.  No solution in sight, I'm afraid.

Ouch. Sorry for the duplicate. (I even participated in the discussion
there :facepalm:)

Feel free to close.

-- 
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>





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#58941: 28.1.90; ERT tests and backtraces
  2022-11-01  8:31   ` Ihor Radchenko
@ 2022-11-01  8:38     ` Gerd Möllmann
  0 siblings, 0 replies; 5+ messages in thread
From: Gerd Möllmann @ 2022-11-01  8:38 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: 58941


On 01.11.22 09:31, Ihor Radchenko wrote:
> Gerd Möllmann <gerd.moellmann@gmail.com> writes:
> 
> Feel free to close.

No problem, I'll let Lars decide.

Reading that you are an Org guy--maybe you could help with bug#58928?
That's presumably a problem with the new overlays detected in Org capture.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#58941: 28.1.90; ERT tests and backtraces
  2022-11-01  7:24 ` Gerd Möllmann
  2022-11-01  8:31   ` Ihor Radchenko
@ 2022-11-01  9:59   ` Stefan Kangas
  1 sibling, 0 replies; 5+ messages in thread
From: Stefan Kangas @ 2022-11-01  9:59 UTC (permalink / raw)
  To: Gerd Möllmann, Ihor Radchenko; +Cc: 58941

forcemerge 50629 58941
thanks

Gerd Möllmann <gerd.moellmann@gmail.com> writes:

> Yep, that's bug#50629@.  No solution in sight, I'm afraid.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-11-01  9:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-01  6:04 bug#58941: 28.1.90; ERT tests and backtraces Ihor Radchenko
2022-11-01  7:24 ` 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

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).