From: "Benno Lossin" <lossin@kernel.org>
To: "Benno Lossin" <lossin@kernel.org>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
"Fiona Behrens" <me@kloenk.dev>
Cc: <rust-for-linux@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] rust: pin-init: examples, tests: use `ignore` instead of conditionally compiling tests
Date: Mon, 09 Jun 2025 21:55:35 +0200 [thread overview]
Message-ID: <DAI9M3GOQI87.305YXSFANUO4G@kernel.org> (raw)
In-Reply-To: <20250605155258.573391-1-lossin@kernel.org>
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@google.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@kernel.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
prev parent reply other threads:[~2025-06-09 19:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-05 15:52 [PATCH] rust: pin-init: examples, tests: use `ignore` instead of conditionally compiling tests Benno Lossin
2025-06-05 17:09 ` Christian Schrefl
2025-06-09 19:55 ` Benno Lossin [this message]
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=DAI9M3GOQI87.305YXSFANUO4G@kernel.org \
--to=lossin@kernel.org \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=me@kloenk.dev \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
/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).