mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Daniel Latypov <dlatypov@google.com>
Cc: Brendan Higgins <brendan.higgins@linux.dev>,
	David Gow <david@davidgow.net>, Rae Moar <raemoar63@gmail.com>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Randy Dunlap <rdunlap@infradead.org>,
	linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com,
	linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH 6/7] kunit: tool: Serialise output written from multiple threads
Date: Tue, 13 Oct 2026 21:47:57 +0100	[thread overview]
Message-ID: <a4019200-dfa3-4e73-9918-857ef40c21ef@sirena.org.uk> (raw)
In-Reply-To: <CAGS_qxrRMoy2fB3zzpD=bOf7R4not5TqpDXE3a-dRKJOpyRt8A@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1702 bytes --]

On Tue, Oct 13, 2026 at 12:53:08PM -0700, Daniel Latypov wrote:

> Firstly, thanks for taking on test parallelization!
> In March 2022, I'd written a proof of concept that worked, it just
> leaked some memory on the C side so I never shared it.
> (Instead of using the existing test filter glob, I'd added the ability
> to specify arbitrary test indices to run a slice of tests)

Perhaps that could be done by adding --run_isolated=N or A..B to split
into numbered blocks of tests?  TBH mine is implemented this way so we
have to solve fewer problems but it does also feel sensible to be able
to compose the paralleism and how things are split up.

> I'd have to reacquaint myself with the code to actually review the series.
> But one thing that sticks out immediately is, my version had added
> this new type to avoid the need for any locking:

> It required passing along kunit_printer.Printer objects to more
> functions, but I think it might be a cleaner end result.
> By explicitly calling `close()`, we could control when exactly output
> gets flushed so we can avoid weird interleaving.
> It seems in a later patch, you write each kernel's output to a file to
> get the same effect, but an object like this could be used in more
> places.

The existing code does log the kernel output to test.log, this was
piggybacking on that since those logs are there anyway - we'd want the
separate logs regardless I think.  That doesn't preclude doing in memory
buffering though, from a first pass other than invasiveness the only big
issue I can think of with buffering in memory is that if we faceplant
badly enough it might be harder to figure out what went wrong but I'm
not sure that's a real issue.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2026-10-13 20:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-13 15:43 [PATCH 0/7] kunit: tool: Support parallel test execution Mark Brown
2026-10-13 15:43 ` [PATCH 1/7] kunit: tool: Preserve failures from kernels without test results Mark Brown
2026-10-13 15:43 ` [PATCH 2/7] kunit: tool: Combine reports from isolated kernels Mark Brown
2026-10-13 15:43 ` [PATCH 3/7] kunit: tool: Boot with a larger log buffer when listing tests Mark Brown
2026-10-13 15:43 ` [PATCH 4/7] kunit: tool: Add an outfile argument to run_kernel() Mark Brown
2026-10-13 15:43 ` [PATCH 5/7] kunit: tool: Allow several run_kernel() calls to be in flight at once Mark Brown
2026-10-13 15:43 ` [PATCH 6/7] kunit: tool: Serialise output written from multiple threads Mark Brown
2026-10-13 19:53   ` Daniel Latypov
2026-10-13 20:47     ` Mark Brown [this message]
2026-10-13 15:43 ` [PATCH 7/7] kunit: tool: Add --parallel to run suites in concurrent kernels Mark Brown

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=a4019200-dfa3-4e73-9918-857ef40c21ef@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=brendan.higgins@linux.dev \
    --cc=corbet@lwn.net \
    --cc=david@davidgow.net \
    --cc=dlatypov@google.com \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=raemoar63@gmail.com \
    --cc=rdunlap@infradead.org \
    --cc=skhan@linuxfoundation.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

all inboxes | Powered by JetHome®