[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z8HikJloVjoZXBbc@Mac.home>
Date: Fri, 28 Feb 2025 08:21:36 -0800
From: Boqun Feng <boqun.feng@...il.com>
To: Oliver Mangold <oliver.mangold@...me>
Cc: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>,
Andreas Hindborg <a.hindborg@...nel.org>,
Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <benno.lossin@...ton.me>,
Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org
Subject: Re: [PATCH] rust: adding UniqueRefCounted and UniqueRef types
On Fri, Feb 28, 2025 at 04:06:01PM +0000, Oliver Mangold wrote:
> >
> > Hmm... Something went wrong here -- this patch looks broken, e.g. the
> > SoB is at the end, the title does not say v2, these replies seem to be
> > part of the patch, etc.
> >
> Hi,
>
> should I post it again with a fix, then?
>
> > (Also, by the way, in case it helps, the message got marked as spam in
> > my side for some reason).
> >
>
> Cannot comment on that. The mysteries of a spam filter :)
>
> On 250228 0754, Boqun Feng wrote:
> >
> > One meta comment: could you add examples for the usage of UniqueRef?
> > Ideally, we should have example code for all the new APIs, so that we at
> > least have some test payload on them (doctest will be generated as kunit
> > test).
>
> For now I can point you to the implementation for block::mq::Request which
> Andreas did on top of this. So there will shortly at least one actual user
> of the API (which uses all the features, as I believe).
>
I meant the "# Examples" section in the function documentation, you can
see UniqueArc for example:
https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/rust/kernel/sync/arc.rs#n592
(in case I wasn't clear)
> https://github.com/metaspace/linux/commit/797b90ae0f83b45495364d4c31651bca06471ef0
>
> But if you still need a separate test, I can do one during the next couple
Yes, we do because we are trying to maintain an API here, and we need at
least some unit tests to verify the correctness of an API. Thanks!
Regards,
Boqun
> of days.
>
> Best,
>
> Oliver
>
Powered by blists - more mailing lists