GNU bug report logs -
#66782
29.1; ERT tests reports test redefined depending on loading sequence
Previous Next
Reported by: Xiyue Deng <manphiz <at> gmail.com>
Date: Fri, 27 Oct 2023 21:01:02 UTC
Severity: normal
Found in version 29.1
Done: Mattias EngdegÄrd <mattias.engdegard <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #53 received at 66782 <at> debbugs.gnu.org (full text, mbox):
2 nov. 2023 kl. 18.17 skrev Xiyue Deng <manphiz <at> gmail.com>:
>> I understand if upstream don't want to complicate `require' logic too
>> much. However I wonder whether it's OK to add warning if a required
>> module has `ert-deftest' in it, so that it can help people identify that
>> a `Test "foo" redefined' error is due to requiring other module instead
>> of an actual duplicated test name. How does this sound?
>
> As I didn't get an answer I assume this was a no-go.
No, please don't make such an assumption -- I was just busy elsewhere and hadn't given your message the attention it deserved. Sorry about that.
That said, in this case I'm not sure how to implement your suggestion in a clean way and if all that effort is really worth the trouble, so perhaps the answer would be the same anyway. And we probably don't want to prohibit `ert-deftest` in required modules in general for reasons mentioned -- they could be used with perfectly fine discipline elsewhere.
> So instead I'd
> like to propose a slight change to the error message to mention that it
> may also be caused by an ert test being loaded multiple times. Patch is
> attached, please let me know whether this works.
I wouldn't mind such a change if it really would help. Would it? Isn't it just restating the problem in other words?
This bug report was last modified 1 year and 202 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.