unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Xiyue Deng <manphiz@gmail.com>
To: "Mattias Engdegård" <mattias.engdegard@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, 66782@debbugs.gnu.org
Subject: bug#66782: 29.1; ERT tests report test redefined depending on loading sequence
Date: Sat, 28 Oct 2023 14:19:40 -0700	[thread overview]
Message-ID: <87wmv6fnrn.fsf@debian-hx90.lan> (raw)
In-Reply-To: <962518D0-36A0-4626-9652-0A0A977DBB2C@gmail.com> ("Mattias Engdegård"'s message of "Sat, 28 Oct 2023 14:46:23 +0200")

Mattias Engdegård <mattias.engdegard@gmail.com> writes:

> 28 okt. 2023 kl. 14.03 skrev Eli Zaretskii <eliz@gnu.org>:
>
>> We could reasonably expect from the author of a single .el test file
>> to make sure the tests in that file don't interfere with one another
>> and make the necessary cleanups for that purpose.  But it is much
>> harder to expect the same from several disparate test files, which can
>> quite frequently be written and maintained by different people.
>
> I agree, and I have found this to be far from uncommon in practice.
>
> Treating redefined test cases as errors found and still finds serious testing
> bugs, so we definitely want to keep the check as it is or in some equivalent
> form (a warning wouldn't be nearly as good).
>

I also agree, and I would definitely keep the current check.  At the
very least, duplicated test name makes identifying failed tests harder.

> And I also agree that the way this test runner explicitly loads .el files
> without any concern for whether they logically represent a single test
> collection or are just sub-modules for use in other tests, is quite
> questionable.
>

Exactly.

> I may be missing the point entirely, but what about using a file name convention
> like Emacs, where only *-tests.el are considered to be actual tests?
>

Which is why I'm asking for upstream stance on whether it will consider
requiring other test modules as well-formed.  To clarify one of my
original proposals: if it makes no sense for a `ert-deftest' to depend
on other `ert-deftest', I would say there is no reason for such a
dependency, and people should move reusable components to a helper
module instead.  And of course a better error message such as forbidding
such requires would be better.

Wdyt?

>

-- 
Xiyue Deng





  reply	other threads:[~2023-10-28 21:19 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-27 20:59 bug#66782: 29.1; ERT tests reports test redefined depending on loading sequence Xiyue Deng
2023-10-28  6:32 ` Eli Zaretskii
2023-10-28  9:39   ` bug#66782: 29.1; ERT tests report " Xiyue Deng
2023-10-28  9:48     ` Eli Zaretskii
2023-10-28 11:14       ` Xiyue Deng
2023-10-28 11:34         ` Eli Zaretskii
2023-10-28 11:50           ` Xiyue Deng
2023-10-28 12:03             ` Eli Zaretskii
2023-10-28 12:46               ` Mattias Engdegård
2023-10-28 21:19                 ` Xiyue Deng [this message]
2023-10-29 12:09                   ` Mattias Engdegård
2023-10-29 21:53                     ` Xiyue Deng
2023-10-30 12:04                       ` Mattias Engdegård
2023-10-30 20:47                         ` Xiyue Deng
2023-11-02 17:17                           ` Xiyue Deng
2023-11-02 18:56                             ` Mattias Engdegård
2023-11-02 22:00                               ` Xiyue Deng
2023-11-03 17:14                                 ` Mattias Engdegård
2023-11-03 17:56                                   ` Xiyue Deng
2023-11-04  8:51                                     ` Eli Zaretskii
2023-10-28 19:41               ` Xiyue Deng

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=87wmv6fnrn.fsf@debian-hx90.lan \
    --to=manphiz@gmail.com \
    --cc=66782@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=mattias.engdegard@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).