linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Latypov <dlatypov@google.com>
To: Jeremy Kerr <jk@codeconstruct.com.au>
Cc: Brendan Higgins <brendanhiggins@google.com>,
	davidgow@google.com, linux-kernel@vger.kernel.org,
	kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org,
	skhan@linuxfoundation.org
Subject: Re: [RFC PATCH] kunit: flatten kunit_suite*** to kunit_suite** in executor
Date: Fri, 28 Jan 2022 13:19:41 -0800	[thread overview]
Message-ID: <CAGS_qxpvX74vnAGhC=TAxFy1NT3mXB0S3AHUZvK2FA59hDijxA@mail.gmail.com> (raw)
In-Reply-To: <0f85025124359304c8a2a97d007b66d5655645c1.camel@codeconstruct.com.au>

On Wed, Oct 13, 2021 at 6:55 PM Jeremy Kerr <jk@codeconstruct.com.au> wrote:
> Resulting in the .kunit_test_suites section just being a set of
> contiguous pointers to struct kunit_suite. We get the number of suites
> from the section size.

<snip>

>
> That was my thinking, anyway. I think it probably makes sense to do that
> cleanup after the section patch, as that means we don't need any
> post-processing on the suites arrays.

To be honest, I'm actually tempted to pay the cost of postprocessing
and proposing a change like this for real.
Going from kunit_suite*** to ** shaves off a lot of code from the unit
test and the filtering code path.

Specifically I'm thinking this can go into the kunit branch,
https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/?h=kunit
Then when we have the series reworking modules, one of two things can happen.
1. if we get to kunit_suite** with null-terminated arrays, fixing the
executor just means dropping the post-processing step.
2. If we get to kunit_suite* as mentioned above, then there'll be a
bit more work, but not as much.

Alternatively, I can wait and send you an updated version of this
patch to include at the start of your series like
PATCH 1/x: this patch with post-processing, using either * or **
...
PATCH x/x: final rework, and drop the postprocessing

It's just that the prospect of submitting a patch that reduces so much
code makes me eager to try and get it submitted :)
Brendan and David seem ok with paying the bit of runtime overhead for
post-processing, esp. if we time it so this patch lands in the same
Linux release as the module rework.
But I can hold off if it'll make your life more difficult.

>
> Cheers,
>
>
> Jeremy

  reply	other threads:[~2022-01-28 21:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-13 19:13 [RFC PATCH] kunit: flatten kunit_suite*** to kunit_suite** in executor Daniel Latypov
2021-10-13 20:03 ` Brendan Higgins
2021-10-13 20:15   ` Daniel Latypov
2021-10-14  1:55     ` Jeremy Kerr
2022-01-28 21:19       ` Daniel Latypov [this message]
2022-01-28 21:27         ` Brendan Higgins
2021-10-14  2:16 ` David Gow

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='CAGS_qxpvX74vnAGhC=TAxFy1NT3mXB0S3AHUZvK2FA59hDijxA@mail.gmail.com' \
    --to=dlatypov@google.com \
    --cc=brendanhiggins@google.com \
    --cc=davidgow@google.com \
    --cc=jk@codeconstruct.com.au \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).