Subject: Re: bug#66782: 29.1; ERT tests report test redefined depending on loading sequence
From: Mattias Engdegård <[email-masked]>
To: Xiyue Deng <[email-masked]>
Cc: Eli Zaretskii <[email-masked]>, [email-masked]
Date: Fri, 3 Nov 2023 18:14:24 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

2 nov. 2023 kl. 23.00 skrev Xiyue Deng <[email-masked]>:

> 1) Tests that are different but use the same test name.
> 
> 2) There is no tests sharing the same name, but caused by double loading
> the same test unit through a dependency by require.
> 
> Case 1 happens a lot in the wild and has caused many FTBFS bugs in
> Debian after upgrading Emacs to 29.1 (e.g. [1][2]), and the fix is
> simply to rename the tests.

Thank you, I'm happy to hear that the check actually caught the kind of errors it was supposed to find.

> As a matter of fact I've spent a non-trivial time
> trying to debug this one as it depends on the loading sequence which
> caused the failure to be flaky.  So I hope my proposed change can help
> people on realizing that it's case 2 a bit faster.

That's fine, adding something like what you suggested doesn't cost us anything: now done on master (425d23fbea).

I'm closing the bug now, but do say if there is something I forgot.