Re: [PATCH 3/5] t9350: properly count annotated tags
- From
Christian Couder <christian.couder@gmail.com>
- Date
- Oct 8, 2025, 10:00 UTC
- Message-ID
- <CAP8UFD2dncBPHMH6oKUvT29iV2-qPg60i5Lt9wEsPCj2JYcwJQ@mail.gmail.com>
- In-Reply-To
- <aOYPUyKJPFyfKD46@pks.im>
On Wed, Oct 8, 2025 at 11:21 AM Patrick Steinhardt <ps@pks.im> wrote:
Show 28 quoted lines
> > On Tue, Oct 07, 2025 at 02:29:56PM +0200, Christian Couder wrote: > > In t9350-fast-export.sh, these existing tests: > > > > - 'fast-export | fast-import when main is tagged' > > - 'cope with tagger-less tags' > > > > are checking the number of annotated tags in the test repo by comparing > > it with some hardcoded values. > > > > This could be an issue if some new tests that have some prerequisites > > add new annotated tags to the repo before these existing tests. When > > the prerequisites would be satisfied, the number of annotated tags > > would be different from when some prerequisites would not be satisfied. > > > > As we are going to add new tests that add new annotated tags in a > > following commit, let's properly count the number of annotated tag in > > the repo by incrementing a counter each time a new annotated tag is > > added, and then by comparing the number of annotated tags to the value > > of the counter when checking the number of annotated tags. > > Hm, okay. I think having tests interdepend on one another is bad test > design in the first place, but it's not a new problem you create. An > alternative solution could of course be to change the new test so that > it works in a standalone repository, or to add it towards the end of the > test suite. > > Have you considered these alternatives?
Yes, I have considered them, but I think those workarounds could make the technical debt worse.
For example if I move those tests towards the end of the test script or in another separate test script, then someone might wonder later why they are not at the logical place where they should be. They would then move them and realize that it creates problems with subsequent tests. This would waste time.
So I think it's a good thing to make the interdependency clearly visible instead. This is a bit ugly, but it shows the existing technical debt instead of hiding it.