git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Kristoffer Haugsbakk" <code@khaugsbakk.name>
To: "Junio C Hamano" <gitster@pobox.com>
Cc: git@vger.kernel.org, stolee@gmail.com
Subject: Re: [PATCH 0/8] t7900: untangle test dependencies
Date: Tue, 17 Oct 2023 22:14:03 +0200	[thread overview]
Message-ID: <8cd788dc-7d16-4cfd-9f70-7889dcaa7199@app.fastmail.com> (raw)
In-Reply-To: <xmqqbkcxhvf9.fsf@gitster.g>


On Tue, Oct 17, 2023, at 21:59, Junio C Hamano wrote:
> It is kind-of surprising that with only 8 patches you can reach such
> a state, but ...
>
>> # The tests that used to depend on each other should still pass
>> # when run together
>> ./t7900-maintenance.sh --quiet --run=setup,30,31 &&
>
> ... this puzzles me.  What does it mean for tests to "depend on each
> other"?  Does this mean running #31 with or without running #30 runs
> under different condition and potentially run different things?

What I mean is that some preceding test has a side-effect that a test
depends on. Or that the test depends on some test *not* having done
something; patch 9/8 changes `maintenance.auto config option` to delete
and init the repository since it depends on the preceding tests *not*
having run `git maintenance register`, since that turns off the default
`true` value of `maintenance.auto`.

(Maybe those last meta-tests with combining tests like number 30 and 31
was a bit silly.)

> One might argue that, in an ideal world, our tests should work when
> any non-setup tests are omitted (so, instead of $i above, you'll
> have an arbitrary subsequence of 1..42 and your tests still pass),
> and it may be a worthy goal, but at the same time, it may be a bit
> impractical, as setting things up is costly, but what you can do in
> the common "setup" will be very small.  Or you'll have so much
> "recovering from damage" in test_when_finished for each test that
> makes such untangling of dependencies too costly.

I don't know what the policy is. :) My motivation was that I was working
on something else which seemed to break the suite, then I tried to reduce
the tests that were run to get rid of the noise (`--verbose`), but then it
got confusing because I didn't know if I had really broken some tests
myself or if more tests would start failing by only running a subset of
them.

That last patch 9/8 deals with what I discovered when I added two tests
before `maintenance.auto config option`; the test started failing, which
made me think that my changes might have some side-effect on what the test
is testing. But it was just an invisible dependency on `git maintenance
register` *not* having been run in the whole suite up until that point.

Cheers

  reply	other threads:[~2023-10-17 20:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-14 21:45 [PATCH 0/8] t7900: untangle test dependencies Kristoffer Haugsbakk
2023-10-14 21:45 ` [PATCH 1/8] t7900: remove register dependency Kristoffer Haugsbakk
2023-10-14 21:45 ` [PATCH 2/8] t7900: setup and tear down clones Kristoffer Haugsbakk
2023-10-17 20:13   ` Junio C Hamano
2023-10-17 20:20     ` Kristoffer Haugsbakk
2023-10-14 21:45 ` [PATCH 3/8] t7900: create commit so that branch is born Kristoffer Haugsbakk
2023-10-14 21:45 ` [PATCH 4/8] t7900: factor out inheritance test dependency Kristoffer Haugsbakk
2023-10-14 21:45 ` [PATCH 5/8] t7900: factor out common schedule setup Kristoffer Haugsbakk
2023-10-14 21:45 ` [PATCH 6/8] t7900: fix `pfx` dependency Kristoffer Haugsbakk
2023-10-14 21:45 ` [PATCH 7/8] t7900: fix `print-args` dependency Kristoffer Haugsbakk
2023-10-14 21:45 ` [PATCH 8/8] t7900: factor out packfile dependency Kristoffer Haugsbakk
2023-10-14 23:00 ` [PATCH 9/8] t7900: fix register dependency Kristoffer Haugsbakk
2023-10-15  3:04 ` [PATCH 0/8] t7900: untangle test dependencies Jeff King
2023-10-17 19:59 ` Junio C Hamano
2023-10-17 20:14   ` Kristoffer Haugsbakk [this message]
2023-10-17 20:49     ` Junio C Hamano

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

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

  git send-email \
    --in-reply-to=8cd788dc-7d16-4cfd-9f70-7889dcaa7199@app.fastmail.com \
    --to=code@khaugsbakk.name \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=stolee@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.
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 NNTP newsgroup(s).