unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alex <agrambot@gmail.com>
To: npostavs@users.sourceforge.net
Cc: Gemini Lasswell <gazally@runbox.com>,
	24402@debbugs.gnu.org, Tino Calancha <tino.calancha@gmail.com>
Subject: bug#24402: should-error doesn't catch all errors
Date: Thu, 13 Jul 2017 22:42:10 -0600	[thread overview]
Message-ID: <87d193ljdp.fsf@lylat> (raw)
In-Reply-To: <877ezbew3d.fsf@users.sourceforge.net> (npostavs's message of "Thu, 13 Jul 2017 19:49:26 -0400")

npostavs@users.sourceforge.net writes:

> Alex <agrambot@gmail.com> writes:
>
>> npostavs@users.sourceforge.net writes:
>>> It would be nice if we can make code inside tests behave the same as
>>> outside.  But we should make it conditional on whether the code is being
>>> compiled, otherwise code inside tests would behave differently when
>>> being interpreted.  Anyway, we can leave this for a separate bug.
>>
>> I agree, but that sounds like it'll require a fair bit of refactoring
>> and knowledge of ert internals.
>
> I don't think so, just a conditional to decide whether or not to call
> the extra expansion.  Do you think there is anything else?

I was mostly referring to not binding `debugger', but also evaluating
the code "normally" (i.e., not doing expansions first in one
condition-case, evaluating arguments in another, and then the whole form
in a third one).

>> OOC, is there a robust way to check whether or not you're currently
>> byte-compiling?
>
> AFAIK, the usual trick is (bound-and-true-p byte-compile-current-file).
> It's probably good enough for most things.

I believe the below patch does that, though it has some issues.

>> I was going to ask if you would merge in a few days, but it appears that
>> what should have been a simple rebase to master caused unforeseen
>> consequences. For instance, for some reason I now get a segmentation
>> fault when executing 'make cl-lib-tests TEST_LOAD_EL=no'. I even reset
>> to the commit I was at before and it still segfaults. Can you reproduce
>> this with the following patch on master?
>
> Nope, I just get the failures on cl-lib-defstruct-record we already
> mentioned.

The segfault appears to have been because I didn't wipe out the elc
files when testing different implementations.

I spent a lot longer than I'd like to admit finding this out. Is there a
reason why "make clean" in the test directory doesn't wipe out elc
files? I don't understand why there's a separate bootstrap-clean that
does this. Can this and TEST_LOAD_EL please be documented in the test
README?

Anyway, I got everything back in order. Sadly, there's a couple extra
tests that now fail for me in the patch that *doesn't* expand inline
functions, and these don't fail for me in a clean master. They are in
eieio-tests (23 and 24).

With the inline expansion, I also get some errors in ert-tests. All of
the errors, with the exception of subr-tests error, seem to be from
cl-defstruct and cl-typep (which is defined by define-inline).

Do you have any ideas? There should be 5 unexpected errors without the
inline expansion, and 6 errors with it. Note that all tests pass in both
cases without "TEST_LOAD_EL=no".

If it's easy to fix the eieio tests and not the other ones, then it
might be better to leave the inline-function expansion out for now.





  reply	other threads:[~2017-07-14  4:42 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-10  1:26 bug#24402: 25.1.50; testcover-start breaks should-error Gemini Lasswell
     [not found] ` <handler.24402.B.14734739098199.ack@debbugs.gnu.org>
2016-09-20  4:27   ` bug#24402: More Information Gemini Lasswell
2017-07-04  3:28     ` bug#24402: should-error doesn't catch all errors (Was:bug#24402: More Information) Alex
2017-07-05  0:00       ` bug#24402: should-error doesn't catch all errors Alex
2017-07-05 13:43         ` Tino Calancha
2017-07-05 19:56           ` Alex
2017-07-07 10:15             ` Tino Calancha
2017-07-09  7:04               ` Alex
2017-07-11 12:18             ` npostavs
2017-07-12  3:47               ` Alex
2017-07-12 12:30                 ` npostavs
2017-07-12 16:45                   ` Alex
2017-07-13  1:31                     ` npostavs
2017-07-13  3:04                       ` Alex
2017-07-13  3:44                         ` npostavs
2017-07-13 22:45                           ` Alex
2017-07-13 23:49                             ` npostavs
2017-07-14  4:42                               ` Alex [this message]
2017-07-14  4:45                                 ` Alex
2017-07-15 21:57                                 ` npostavs
2017-07-16  3:49                                   ` Alex
2017-07-17  0:46                                     ` npostavs
2017-07-19 21:23                                     ` Gemini Lasswell
2017-07-19 22:40                                       ` Alex
2017-07-19 23:04                                       ` npostavs
2017-07-20  4:04                                         ` Alex
2017-07-20 19:23                                         ` Gemini Lasswell
2017-08-08  1:15                                           ` npostavs

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87d193ljdp.fsf@lylat \
    --to=agrambot@gmail.com \
    --cc=24402@debbugs.gnu.org \
    --cc=gazally@runbox.com \
    --cc=npostavs@users.sourceforge.net \
    --cc=tino.calancha@gmail.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 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).