Subject: Re: bug#24402: should-error doesn't catch all errors

From: Alex <[email-masked]>
Date: Wed, 19 Jul 2017 16:40:03 -0600

Gemini Lasswell <[email-masked]> writes:

> Hello,
>
> First, thank you for working on this bug!
>
> I have a branch of Emacs which attempts to run all the tests under
> Testcover, and I've tried it with Alex's latest patch. The patch has
> fixed the problems with Testcover and should-error except for one weird
> case. Here is a file that will let you reproduce the weird case on
> master with the patch applied:
>
>
>
> This is an excerpt of test/src/fns-tests.el with a few lines added at
> the end to invoke Testcover. It contains two nearly identical tests
> which should both pass, but one passes and one fails. If you then edit
> the file and comment out test-cycle-assoc (the one that passes) and run
> the test again, then the failing test will pass. I've reproduced it both
> in batch mode (without TEST_LOAD_EL=no) and interactively.

Hmm, this isn't the behaviour that I see. I get the following errors
both with and without my patch, and both interactively and in batch
mode:

===============================================================================================
Edebug: cyc1
Edebug: test@test-cycle-assq
Edebug: test@test-cycle-assoc
Edebug: cyc1
Edebug: test@test-cycle-assq
Edebug: test@test-cycle-assoc
...
Edebug: cyc1
Edebug: test@test-cycle-assq
Compiler-macro error for cl--block-wrapper: (error "Lisp nesting exceeds ‘max-lisp-eval-depth’")
Edebug: test@test-cycle-assoc
Compiler-macro error for cl--block-wrapper: (error "Lisp nesting exceeds ‘max-lisp-eval-depth’")
Edebug: cyc1
Edebug: test@test-cycle-assq
Compiler-macro error for cl--block-wrapper: (error "Lisp nesting exceeds ‘max-lisp-eval-depth’")
Eager macro-expansion failure: (error "Lisp nesting exceeds ‘max-lisp-eval-depth’")
Compiler-macro error for cl--block-wrapper: (error "Lisp nesting exceeds ‘max-lisp-eval-depth’")
Eager macro-expansion failure: (error "Lisp nesting exceeds ‘max-lisp-eval-depth’")
Compiler-macro error for cl--block-wrapper: (error "Lisp nesting exceeds ‘max-lisp-eval-depth’")
Entering debugger...
cl--generic-make-next-function: Symbol’s function definition is void: t
===============================================================================================

The ... above represents Edebug cycling, for some reason, between the 3
functions.

Noam, can you reproduce this?