git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Adam Dinwoodie <adam@dinwoodie.org>
Cc: git@vger.kernel.org, "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Fabian Stelzer" <fs@gigacodes.de>
Subject: Re: [PATCH] test-lib: allow storing counts with test harnesses
Date: Mon, 6 Mar 2023 03:57:09 -0500	[thread overview]
Message-ID: <ZAWq5VFE/UjjtPJS@coredump.intra.peff.net> (raw)
In-Reply-To: <20230304212220.qkzc2joco5xj7d4s@lucy.dinwoodie.org>

On Sat, Mar 04, 2023 at 09:22:20PM +0000, Adam Dinwoodie wrote:

> Currently, test result files are only stored in test-results/*.counts if
> $HARNESS_ACTIVE is not set.  This dates from 8ef1abe550 (test-lib: Don't
> write test-results when HARNESS_ACTIVE, 2010-08-11), where the
> assumption was that if someone were using a test harness like prove,
> that would track results and the count files wouldn't be required.
> However, as of 49da404070 (test-lib: show missing prereq summary,
> 2021-11-20), those files also store the list of git test prerequisites
> that were missing during the test run, which isn't something that a
> generic test harness like prove can provide.
> 
> To allow folk using test harnesses to access the lists of missing
> prerequisites, add a --counts argument to test-lib that will keep these
> counts files even if a test harness is in use.  This means that a
> subsequent call of, say, `make -C t aggregate-results` will report
> useful information.

Your goal seems reasonable. I have to wonder if it is even worth
requiring "--counts" here, though. Even 8ef1abe550 claims that the I/O
from writing the results files is minimal. And certainly I run under
prove with "--root=/some/ram/disk", and I haven't noticed any difference
with and without my usual "--verbose-log", which writes a lot more data
into test-results/.

So would it be worth it to just revert 8ef1abe550, and always store the
meta-files? That's one less option to support, and one less surprise
when some other feature is built around them.

Or is there some reason that we really want to have a mode where nothing
is written into t/? From reading 8ef1abe550 it sounded like this was
mostly a hygiene / optimization thing, and not some special mode we
cared about supporting.

>  t/test-lib.sh | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

The patch itself looks correct, if we want to go with a --counts option.

-Peff

  reply	other threads:[~2023-03-06  8:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-24 22:52 [RFC PATCH] test-lib: allow storing counts with test harnesses Adam Dinwoodie
2023-03-04 21:22 ` [PATCH] " Adam Dinwoodie
2023-03-06  8:57   ` Jeff King [this message]
2023-03-06 18:15     ` Junio C Hamano
2023-04-01 18:56   ` Elijah Newren

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=ZAWq5VFE/UjjtPJS@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=adam@dinwoodie.org \
    --cc=avarab@gmail.com \
    --cc=fs@gigacodes.de \
    --cc=git@vger.kernel.org \
    /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).