From: Boqun Feng <boqun.feng@gmail.com>
To: Danilo Krummrich <dakr@kernel.org>
Cc: Hui Zhu <hui.zhu@linux.dev>, Miguel Ojeda <ojeda@kernel.org>,
Alex Gaynor <alex.gaynor@gmail.com>, Gary Guo <gary@garyguo.net>,
bjorn3_gh@protonmail.com, Benno Lossin <lossin@kernel.org>,
Andreas Hindborg <a.hindborg@kernel.org>,
Alice Ryhl <aliceryhl@google.com>,
Trevor Gross <tmgross@umich.edu>,
linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
Hui Zhu <zhuhui@kylinos.cn>, Geliang Tang <geliang@kernel.org>,
Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
Vlastimil Babka <vbabka@suse.cz>,
"Liam R. Howlett" <Liam.Howlett@oracle.com>,
Uladzislau Rezki <urezki@gmail.com>
Subject: Re: [PATCH v2] rust: add a sample alloc usage
Date: Thu, 17 Jul 2025 09:14:15 -0700 [thread overview]
Message-ID: <aHkhVwD7WKm1dSsa@Mac.home> (raw)
In-Reply-To: <DBEAFCFHFU35.1IZI3ZSJSIRAY@kernel.org>
On Thu, Jul 17, 2025 at 01:19:05PM +0200, Danilo Krummrich wrote:
> (Cc: Lorenzo, Vlastimil, Liam, Uladzislau)
>
> On Thu Jul 17, 2025 at 11:50 AM CEST, Hui Zhu wrote:
> > diff --git a/samples/rust/Makefile b/samples/rust/Makefile
> > index bd2faad63b4f..7c3e68d9ada5 100644
> > --- a/samples/rust/Makefile
> > +++ b/samples/rust/Makefile
> > @@ -10,6 +10,7 @@ obj-$(CONFIG_SAMPLE_RUST_DRIVER_PLATFORM) += rust_driver_platform.o
> > obj-$(CONFIG_SAMPLE_RUST_DRIVER_FAUX) += rust_driver_faux.o
> > obj-$(CONFIG_SAMPLE_RUST_DRIVER_AUXILIARY) += rust_driver_auxiliary.o
> > obj-$(CONFIG_SAMPLE_RUST_CONFIGFS) += rust_configfs.o
> > +obj-$(CONFIG_SAMPLE_RUST_ALLOC) += rust_alloc.o
>
> I think adding an example for large alignment is fine, but let's do this in a
> doc-test on VBox in rust/kernel/alloc/kbox.rs. I think adding a separate module
I would suggest using #[kunit_tests(..)], which is similar to how
doc-test run, for it if we only use it for test purposes.
Regards,
Boqun
> for this is overkill.
>
> Note that doc-tests are executed on boot if CONFIG_RUST_KERNEL_DOCTESTS=y.
>
[...]
next prev parent reply other threads:[~2025-07-17 16:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-17 9:50 [PATCH v2] rust: add a sample alloc usage Hui Zhu
2025-07-17 11:19 ` Danilo Krummrich
2025-07-17 16:14 ` Boqun Feng [this message]
2025-07-24 8:06 ` Hui Zhu
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=aHkhVwD7WKm1dSsa@Mac.home \
--to=boqun.feng@gmail.com \
--cc=Liam.Howlett@oracle.com \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=dakr@kernel.org \
--cc=gary@garyguo.net \
--cc=geliang@kernel.org \
--cc=hui.zhu@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
--cc=urezki@gmail.com \
--cc=vbabka@suse.cz \
--cc=zhuhui@kylinos.cn \
/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).