From: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "Liam R. Howlett" <Liam.Howlett@oracle.com>,
Sidhartha Kumar <sidhartha.kumar@oracle.com>,
akpm@linux-foundation.org, christophe.leroy@csgroup.eu,
justinstitt@google.com, linux-kernel@vger.kernel.org,
linux-m68k@lists.linux-m68k.org, linuxppc-dev@lists.ozlabs.org,
llvm@lists.linux.dev, maddy@linux.ibm.com, morbo@google.com,
mpe@ellerman.id.au, nathan@kernel.org, naveen@kernel.org,
ndesaulniers@google.com, npiggin@gmail.com,
Matthew Wilcox <willy@infradead.org>,
linux-mm@kvack.org
Subject: Re: [PATCH] xarray: port tests to kunit
Date: Thu, 30 Jan 2025 14:49:47 +0000 [thread overview]
Message-ID: <cd0cd863-9201-44ea-98c8-334ef5eab97d@lucifer.local> (raw)
In-Reply-To: <CAMuHMdUFbhzi8J3rmyvVn7HmrxbeyoOwu97w8cnuKJxksa8iaw@mail.gmail.com>
On Thu, Jan 30, 2025 at 03:38:36PM +0100, Geert Uytterhoeven wrote:
> Hi Lorenzo,
>
> On Thu, 30 Jan 2025 at 15:09, Lorenzo Stoakes
> <lorenzo.stoakes@oracle.com> wrote:
> > Having written a ton of test code, I've unfortunately encountered a lot of
> > this sort of push-back and it's HUGELY off-putting. Writing test code
> > should be ENCOURAGED not litigated against.
>
> I am not discouraging nor pushing back on any testing code (on the
> contrary, I test every single new kunit test that appears upstream).
> My apologies if I gave the impression.
My point is what comes across as pedantry often seems to arrive (in my
experience) in response to test code submissions.
A wag would say 'isn't that true of all kernel code?' :) but my experience
has been that there has been poor RoI on the kind of feedback you get
vs. meaningful benefits to the point that it feels like letting yourself in
for yak shaving.
We may be terribly misreading you in this thread, but it's in any case how
it comes across. Obviously this isn't helped by the context of this
discussion!
>
> > The truth is far too little kernel code is tested to any degree, and this
> > is part of why.
> >
> > On kunit collaboration, I attended an in-person talk at LPC on kunit
> > userland testing where it was broadly agreed that at this point in time,
> > the xarray/radix tree tests weren't really suited to the framework.
> >
> > Therefore I think the healthy means of pushing forward with integration is
> > in sensible discussion and if patches, RFC patches in collaboration with
> > authors.
>
> Good.
>
> > The unhealthy approach is to needle one of the biggest contributors to core
> > test code in the kernel on a thread because you don't seem to want to cd to
> > a directory and run make.
>
> My initial issue was that I could not find out where that is documented.
>
> $ make help
> ...
> Userspace tools targets:
> use "make tools/help"
> or "cd tools; make help"
>
> $ make tools/help
> Possible targets:
> ...
> You can do:
> ...
> $ make tools/all
>
> builds all tools.
>
> But that command does not build tools/testing/radix-tree, so I was
> completely lost.
Right, I mean this should be easy enough to fix.
If what you're saying is - make this more discoverable, make this easily
buildable from the top of the tree - then sure, and I expect this shouldn't
be too challenging.
>
> > Why is this relevant to me? I am the author of the VMA test suite, on which
> > I spent countless hours + relied heavily on Liam's work to do so, and
> > equally there you have to cd to a directory and run make.
>
> Thanks for your work! One suggestion for improvement: tools/testing/vma
> does not seem to be built by "make tools/all" either.
You're welcome, and right yeah, should be relatively simple to fix.
This kind of straightforward practical thing is fine. 'You must use the
space wombat with extra fireworks' type feedback is not so much...
>
> > But at the same time in both cases, testability of key internal components
> > is ENORMOUSLY improved and allows for REALLY exciting possibilities in test
> > coverage, really isolating functions for unit testing, enormously fast
> > iteration speed, etc. etc.
> >
> > I ask you to weigh up the desire to enumerate your misgivings about the
> > testing approach used here vs. all of the above.
>
> I repeat: I am not against these tests.
Good, but I would also emphasise what I'm trying to get across with the
wall of text here (sorry, that's very me) - let's not get bogged down in
the framework or whether it might be preferable to have it under kunit or
this that or the other thing vs. the enormous benefits this stuff brings.
Sometimes, esp. with new approaches to testing, it has to be at the very
least incremental.
If you're saying 'just get it documented in a make help and make it
buildable from the top of the tree' then fair enough and hopefully not too
difficult.
In other words - we are all after the same thing here, let's work towards
making everything better, and not unnecessarily throw unshaved yaks in the
way :)
>
> Thanks!
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
Cheers, Lorenzo
next prev parent reply other threads:[~2025-01-30 14:50 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20241205-xarray-kunit-port-v1-1-ee44bc7aa201@gmail.com>
[not found] ` <07cf896e-adf8-414f-a629-a808fc26014a@oracle.com>
2025-01-29 21:26 ` Liam R. Howlett
2025-01-29 21:28 ` Tamir Duberstein
2025-01-29 22:26 ` Liam R. Howlett
2025-01-29 22:33 ` Tamir Duberstein
2025-01-29 23:02 ` Matthew Wilcox
2025-01-29 23:08 ` Tamir Duberstein
2025-01-29 23:11 ` Matthew Wilcox
2025-01-29 23:17 ` Tamir Duberstein
2025-01-30 8:21 ` Geert Uytterhoeven
2025-01-30 12:51 ` Liam R. Howlett
2025-01-30 13:25 ` Geert Uytterhoeven
2025-01-30 14:05 ` Liam R. Howlett
2025-01-30 14:24 ` Geert Uytterhoeven
2025-01-30 15:16 ` Liam R. Howlett
2025-01-31 7:39 ` Geert Uytterhoeven
2025-01-30 14:09 ` Lorenzo Stoakes
2025-01-30 14:38 ` Geert Uytterhoeven
2025-01-30 14:49 ` Lorenzo Stoakes [this message]
2025-01-30 14:22 ` Matthew Wilcox
2025-01-31 0:22 ` Andrew Morton
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=cd0cd863-9201-44ea-98c8-334ef5eab97d@lucifer.local \
--to=lorenzo.stoakes@oracle.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=christophe.leroy@csgroup.eu \
--cc=geert@linux-m68k.org \
--cc=justinstitt@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=llvm@lists.linux.dev \
--cc=maddy@linux.ibm.com \
--cc=morbo@google.com \
--cc=mpe@ellerman.id.au \
--cc=nathan@kernel.org \
--cc=naveen@kernel.org \
--cc=ndesaulniers@google.com \
--cc=npiggin@gmail.com \
--cc=sidhartha.kumar@oracle.com \
--cc=willy@infradead.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