From: "Nicolás Antinori" <nico.antinori.7@gmail.com>
To: "Gary Guo" <gary@garyguo.net>,
"Alice Ryhl" <aliceryhl@google.com>,
"Burak Emir" <burak.emir@gmail.com>,
"Brendan Higgins" <brendan.higgins@linux.dev>,
"David Gow" <david@davidgow.net>,
"Miguel Ojeda" <ojeda@kernel.org>
Cc: "Alexandre Courbot" <acourbot@nvidia.com>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Benno Lossin" <lossin@kernel.org>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Boqun Feng" <boqun@kernel.org>,
"Brigham Campbell" <me@brighamcampbell.com>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"Danilo Krummrich" <dakr@kernel.org>,
"Jori Koolstra" <jkoolstra@xs4all.nl>,
"Onur Özkan" <work@onurozkan.dev>,
"Rae Moar" <raemoar63@gmail.com>,
"Shuah Khan" <skhan@linuxfoundation.org>,
"Tamir Duberstein" <tamird@kernel.org>,
"Trevor Gross" <tmgross@umich.edu>,
"Yury Norov" <yury.norov@gmail.com>,
linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
linux-kernel-mentees@lists.linux.dev
Subject: Re: [PATCH 0/3] rust: kunit: support #[should_panic] and same test name with different #[cfg(...)]
Date: Thu, 01 Oct 2026 11:08:00 -0300 [thread overview]
Message-ID: <DLTK6X5RFK4Q.1OW6JA242CMRJ@gmail.com> (raw)
In-Reply-To: <DLSQJS2QT4JW.3BPUMU5M6N171@garyguo.net>
On Wed Sep 30, 2026 at 11:54 AM -03, Gary Guo wrote:
> On Wed Sep 30, 2026 at 2:23 PM BST, Nicolás Antinori via B4 Relay wrote:
>> This patch series intends to implement two features for KUnit tests
>> written in Rust. The work is based on a TODO comment made in the
>> `bitmap.rs` module [1].
>>
>> Changelog:
>> - RFC patch: [3]
>>
>> 1. Supporting `#[should_panic]` [2]:
>>
>> KUnit tests in Rust follow the user-space syntax, but at the moment
>> `#[should_panic]` is not supported. The first patch of this series adds
>> support for the attribute (only in its basic form, `#[should_panic =
>> "message"]` is not supported yet).
>>
>> The way it is supported is by adding a new boolean property called
>> `rust_should_panic` to `kunit_attributes` struct in kunit/test.h and
>
> This is now more general than Rust panics? Perhaps this should just be
> "should_bug"?
I used the name suggested by David Gow in the RFC Patch [1]. I believe
"should_panic" is better because it directly matches the attribute name
and will stay consistent in case the panic handler changes the way it
trigger kernel panics (although this is very unlikely I think).
That said, I'd be happy to change it to should_bug if that is preferred,
please let me know what you think!
Best regards,
Nicolás
[1] https://lore.kernel.org/rust-for-linux/d20cc2b2-afeb-432c-924b-55ad00d980fe@davidgow.net/
next prev parent reply other threads:[~2026-10-01 14:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-30 13:23 Nicolás Antinori via B4 Relay
2026-09-30 13:23 ` [PATCH 1/3] rust: kunit: add #[should_panic] support Nicolás Antinori via B4 Relay
2026-09-30 13:23 ` [PATCH 2/3] rust: kunit: allow same test name with different #[cfg(...)] Nicolás Antinori via B4 Relay
2026-09-30 13:23 ` [PATCH 3/3] rust: bitmap: kunit: uncomment owned_bitmap_out_of_bounds panic case Nicolás Antinori via B4 Relay
2026-09-30 14:41 ` [PATCH 0/3] rust: kunit: support #[should_panic] and same test name with different #[cfg(...)] Miguel Ojeda
2026-10-01 13:43 ` Nicolás Antinori
2026-09-30 14:54 ` Gary Guo
2026-10-01 14:08 ` Nicolás Antinori [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-09-29 14:07 Nicolás Antinori
2026-09-29 16:02 ` Nicolás Antinori
2026-09-29 16:22 ` Miguel Ojeda
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=DLTK6X5RFK4Q.1OW6JA242CMRJ@gmail.com \
--to=nico.antinori.7@gmail.com \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=brendan.higgins@linux.dev \
--cc=burak.emir@gmail.com \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=david@davidgow.net \
--cc=gary@garyguo.net \
--cc=jkoolstra@xs4all.nl \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=me@brighamcampbell.com \
--cc=ojeda@kernel.org \
--cc=raemoar63@gmail.com \
--cc=rust-for-linux@vger.kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=tamird@kernel.org \
--cc=tmgross@umich.edu \
--cc=work@onurozkan.dev \
--cc=yury.norov@gmail.com \
/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
all inboxes | Powered by JetHome®