Re: [PATCH] xarray: port tests to kunit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 29, 2025 at 5:26 PM Liam R. Howlett <Liam.Howlett@xxxxxxxxxx> wrote:

* Tamir Duberstein <tamird@xxxxxxxxx> [250129 16:29]:
On Wed, Jan 29, 2025 at 4:26 PM Liam R. Howlett <Liam.Howlett@xxxxxxxxxx> wrote:

* Sidhartha Kumar <sidhartha.kumar@xxxxxxxxxx> [250129 16:02]:
+ Liam, Matthew

+ linux-mm

Thank you Sid.


Hello,

I believe this patch needs to be reverted for now as it breaks the
user-space build of /tools/testing/radix-tree with:

In file included from xarray.c:11:
../../../lib/test_xarray.c:9:10: fatal error: kunit/test.h: No such file
or directory
     9 | #include <kunit/test.h>
       |          ^~~~~~~~~~~~~~
compilation terminated.
make: *** [<builtin>: xarray.o] Error 1
make: *** Waiting for unfinished jobs....

this then prevents the maple tree test suite from building.

How are grammar corrections going to the right person (but not the
mailing list) while an entire conversion to kunit is not [1]?

Very simple: the tests are not properly included in MAINTAINERS. I
sent https://lore.kernel.org/all/20250129-xarray-test-maintainer-v1-1-482e31f30f47@xxxxxxxxx/
a few minutes ago for this reason.

Fair enough, but from the patch:

@@ -6,11 +6,10 @@
  * Author: Matthew Wilcox <willy@xxxxxxxxxxxxx>
  */

-#include <linux/xarray.h>
-#include <linux/module.h>
+#include <kunit/test.h>

...


-module_init(xarray_checks);
-module_exit(xarray_exit);
 MODULE_AUTHOR("Matthew Wilcox <willy@xxxxxxxxxxxxx>");
 MODULE_DESCRIPTION("XArray API test module");
 MODULE_LICENSE("GPL");

I don't get why the huge list of Cc's didn't include the author who is
in the git commit signers:
 $ ./scripts/get_maintainer.pl --git lib/xarray.c
Matthew Wilcox <willy@xxxxxxxxxxxxx> (supporter:XARRAY,commit_signer:1/3=33%,authored:1/3=33%,added_lines:19/52=37%,removed_lines:4/23=17%)
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> (supporter:LIBRARY CODE,commit_signer:3/3=100%)

I'm not sure what you're asking. I used `b4 prep --auto-to-cc`. It
doesn't know that test_xarray.c and xarray.c have the same maintainer.

...


Does the patch really need to drop the module testing too?

What exactly is the point of converting one testing system to another
besides disruption of actual work?  Who asked for this?  What is the
point?

All this is described in the commit message.

The commit message says you like the output more and implies you like
the command better.

I've never used the kunit testing of xarray and have used the userspace
testing instead, so I can't speak to the obscure invocation as both
commands seem insanely long and obscure to me.


Is anyone doing work on the xarray running the kunit tests?

I was doing work on xarray and I was running the kunit tests.

...

You should look at the userspace testing (that this broke) as it has
been really useful in certain scenarios.

Thanks,
Liam

For what it's worth the kunit invocation, while obscure, is
self-documenting. There's usage information that's reasonably
understandable embedded in the tool itself. I looked for the userspace
testing initially but failed to find
tools/testing/radix-tree/xarray.c. Even now, I'm not sure how I'm
meant to compile this.

Tamir





[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux