[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <DAI9M3GOQI87.305YXSFANUO4G@kernel.org>
Date: Mon, 09 Jun 2025 21:55:35 +0200
From: "Benno Lossin" <lossin@...nel.org>
To: "Benno Lossin" <lossin@...nel.org>, "Miguel Ojeda" <ojeda@...nel.org>,
"Alex Gaynor" <alex.gaynor@...il.com>, "Boqun Feng" <boqun.feng@...il.com>,
"Gary Guo" <gary@...yguo.net>, Björn Roy Baron
<bjorn3_gh@...tonmail.com>, "Andreas Hindborg" <a.hindborg@...nel.org>,
"Alice Ryhl" <aliceryhl@...gle.com>, "Trevor Gross" <tmgross@...ch.edu>,
"Danilo Krummrich" <dakr@...nel.org>, "Fiona Behrens" <me@...enk.dev>
Cc: <rust-for-linux@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] rust: pin-init: examples, tests: use `ignore` instead
of conditionally compiling tests
On Thu Jun 5, 2025 at 5:52 PM CEST, Benno Lossin wrote:
> Change `#[cfg(cond)]` to `#[cfg_attr(not(cond), ignore)]` on tests.
>
> Ignoring tests instead of disabling them still makes them appear in the
> test list, but with `ignored`. It also still compiles the code in those
> cases.
>
> Some tests still need to be ignore, because they use types that are not
> present when the condition is false. For example the condition is
> `feature = std` and then it uses `std::thread::Thread`.
>
> Suggested-by: Alice Ryhl <aliceryhl@...gle.com>
> Link: https://lore.kernel.org/all/aDC9y829vZZBzZ2p@google.com
> Link: https://github.com/Rust-for-Linux/pin-init/pull/58/commits/b004dd8e64d4cbe219a4eff0d25f0a5f5bc750ca
> Signed-off-by: Benno Lossin <lossin@...nel.org>
> ---
>
> Depends on https://lore.kernel.org/all/20250523125424.192843-3-lossin@kernel.org
>
> ---
> rust/pin-init/examples/pthread_mutex.rs | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Applied to pin-init-next -- thanks everyone!
---
Cheers,
Benno
Powered by blists - more mailing lists