linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brendan Higgins <brendanhiggins@google.com>
To: Daniel Latypov <dlatypov@google.com>
Cc: Jeremy Kerr <jk@codeconstruct.com.au>,
	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 16:27:12 -0500	[thread overview]
Message-ID: <CAFd5g47mYnqyu0DBJmxHjVcdTfc5ig-X6P9wu4bLYw+FhqaYCQ@mail.gmail.com> (raw)
In-Reply-To: <CAGS_qxpvX74vnAGhC=TAxFy1NT3mXB0S3AHUZvK2FA59hDijxA@mail.gmail.com>

On Fri, Jan 28, 2022 at 4:19 PM Daniel Latypov <dlatypov@google.com> wrote:
>
> 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 :)

I agree. Honestly, just changing the type signature from `struct
kunit_suite * const * const *` to `struct kunit_suite * const *` in
the suite_set struct sells me on this. I missed this before, but now
that I am aware of this, I would like to see it go in soon.

> 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

I'm absolutely fine with it. We are nowhere near the point where that
matters at all.

> Linux release as the module rework.
> But I can hold off if it'll make your life more difficult.

Also agree. I am excited to see Jeremy's new module code. I don't want
to make his life any harder than it already is ;-)

> >
> > Cheers,
> >
> >
> > Jeremy

  reply	other threads:[~2022-01-28 21:27 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
2022-01-28 21:27         ` Brendan Higgins [this message]
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=CAFd5g47mYnqyu0DBJmxHjVcdTfc5ig-X6P9wu4bLYw+FhqaYCQ@mail.gmail.com \
    --to=brendanhiggins@google.com \
    --cc=davidgow@google.com \
    --cc=dlatypov@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).