Re: Rust kernel policy

Jarkko Sakkinen
2025-02-19T11:37:55Z

On Wed, 2025-02-19 at 16:35 +1000, Dave Airlie wrote:
> On Wed, 19 Feb 2025 at 16:20, Jarkko Sakkinen <jarkko@kernel.org>
> wrote:
> >
> > On Tue, 2025-02-18 at 13:22 -0800, Boqun Feng wrote:
> > > FWIW, usually Rust code has doc tests allowing you to run it with
> > > kunit,
> > > see:
> > >
> > >       https://docs.kernel.org/rust/testing.html
> >
> > I know this document and this was what I used to compile DMA
> > patches.
> > Then I ended up into "no test, no go" state :-)
> >
> > I put this is way. If that is enough, or perhaps combined with
> > submitting-patches.rst, why this email thread exists?
>
> There is users for the DMA stuff (now there should be some more
> tests), the problem is posting the users involves all the precursor
> patches for a bunch of other subsystems,
>
> There's no nice way to get this all bootstrapped, two methods are:
>
> a) posting complete series crossing subsystems, people get pissed off
> and won't review because it's too much
> b) posting series for review that don't have a full user in the
> series, people get pissed off because of lack of users.
>
> We are mostly moving forward with (b) initially, this gets rust folks
> to give reviews and point out any badly thought out rust code, and
> give others some ideas for what the code looks like and that it
> exists
> so others don't reinvent the wheel.
>
> Maybe we can add more rust tests to that particular patch series? but
> this is the wrong thread to discuss it, so maybe ask on that thread
> rather on this generic thread.

Here's one way to do it:

1. Send the patch set as it is.
2. Point out to Git tree with branch containing the patches + patches
for e.g. driver (hopefully for something that QEMU is able to emulate)
and other stuff/shenanigans that allows to test them.

Then I can go and do git remote add etc. and compile a BuildRoot image
using my environment by setting LINUX_OVERRIDER_SRCIDR, test it and
call it a day.

> Dave.

[1] https://codeberg.org/jarkko/linux-tpmdd-test

BR, Jarkko