* [PATCH 0/3] pin-init sync: test & CI fixes
@ 2025-05-23 12:54 Benno Lossin
2025-05-23 12:54 ` [PATCH 1/3] rust: pin-init: examples, tests: add conditional compilation in order to compile under any feature combination Benno Lossin
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Benno Lossin @ 2025-05-23 12:54 UTC (permalink / raw)
To: Miguel Ojeda, Alex Gaynor, Boqun Feng, Gary Guo,
Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
Trevor Gross, Danilo Krummrich
Cc: rust-for-linux
Several smaller problems I found in the CI related to enabled features &
tests.
Upstream PR: https://github.com/Rust-for-Linux/pin-init/pull/50
Benno Lossin (3):
rust: pin-init: examples, tests: add conditional compilation in order
to compile under any feature combination
rust: pin-init: examples: pthread_mutex: disable the main test for
miri
rust: pin-init: feature-gate the `stack_init_reuse` test on the `std`
feature
rust/pin-init/examples/big_struct_in_place.rs | 26 ++---
rust/pin-init/examples/linked_list.rs | 10 +-
rust/pin-init/examples/mutex.rs | 97 +++++++++++--------
rust/pin-init/examples/pthread_mutex.rs | 5 +-
rust/pin-init/examples/static_init.rs | 75 +++++++-------
rust/pin-init/src/__internal.rs | 1 +
6 files changed, 123 insertions(+), 91 deletions(-)
base-commit: ae8b3a83fb9de394f609035041cd7a668fda2ab3
--
2.49.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/3] rust: pin-init: examples, tests: add conditional compilation in order to compile under any feature combination
2025-05-23 12:54 [PATCH 0/3] pin-init sync: test & CI fixes Benno Lossin
@ 2025-05-23 12:54 ` Benno Lossin
2025-05-23 12:54 ` [PATCH 2/3] rust: pin-init: examples: pthread_mutex: disable the main test for miri Benno Lossin
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Benno Lossin @ 2025-05-23 12:54 UTC (permalink / raw)
To: Benno Lossin, Miguel Ojeda, Alex Gaynor, Boqun Feng, Gary Guo,
Björn Roy Baron, Andreas Hindborg, Alice Ryhl, Trevor Gross,
Danilo Krummrich, Fiona Behrens
Cc: Benno Lossin, rust-for-linux, linux-kernel
From: Benno Lossin <benno.lossin@proton.me>
In the CI, all examples & tests should be run under all feature
combinations. Currently several examples & tests use `std` without
conditionally enabling it. Thus make them all compile under any feature
combination by conditionally disabling the code that uses e.g. `std`.
Link: https://github.com/Rust-for-Linux/pin-init/pull/50/commits/fdfb70efddbc711b4543c850ee38a2f5a8d17cb6
Signed-off-by: Benno Lossin <lossin@kernel.org>
---
rust/pin-init/examples/big_struct_in_place.rs | 26 ++---
rust/pin-init/examples/linked_list.rs | 10 +-
rust/pin-init/examples/mutex.rs | 97 +++++++++++--------
rust/pin-init/examples/pthread_mutex.rs | 3 +
rust/pin-init/examples/static_init.rs | 75 +++++++-------
5 files changed, 121 insertions(+), 90 deletions(-)
diff --git a/rust/pin-init/examples/big_struct_in_place.rs b/rust/pin-init/examples/big_struct_in_place.rs
index 30d44a334ffd..b0ee793a0a0c 100644
--- a/rust/pin-init/examples/big_struct_in_place.rs
+++ b/rust/pin-init/examples/big_struct_in_place.rs
@@ -4,6 +4,7 @@
// Struct with size over 1GiB
#[derive(Debug)]
+#[allow(dead_code)]
pub struct BigStruct {
buf: [u8; 1024 * 1024 * 1024],
a: u64,
@@ -25,15 +26,18 @@ pub fn new() -> impl Init<Self> {
}
fn main() {
- // we want to initialize the struct in-place, otherwise we would get a stackoverflow
- let buf: Box<BigStruct> = Box::init(init!(BigStruct {
- buf <- zeroed(),
- a: 7,
- b: 186,
- c: 7789,
- d: 34,
- managed_buf <- ManagedBuf::new(),
- }))
- .unwrap();
- println!("{}", core::mem::size_of_val(&*buf));
+ #[cfg(any(feature = "std", feature = "alloc"))]
+ {
+ // we want to initialize the struct in-place, otherwise we would get a stackoverflow
+ let buf: Box<BigStruct> = Box::init(init!(BigStruct {
+ buf <- zeroed(),
+ a: 7,
+ b: 186,
+ c: 7789,
+ d: 34,
+ managed_buf <- ManagedBuf::new(),
+ }))
+ .unwrap();
+ println!("{}", core::mem::size_of_val(&*buf));
+ }
}
diff --git a/rust/pin-init/examples/linked_list.rs b/rust/pin-init/examples/linked_list.rs
index 0bbc7b8d83a1..f9e117c7dfe0 100644
--- a/rust/pin-init/examples/linked_list.rs
+++ b/rust/pin-init/examples/linked_list.rs
@@ -14,8 +14,9 @@
use pin_init::*;
-#[expect(unused_attributes)]
+#[allow(unused_attributes)]
mod error;
+#[allow(unused_imports)]
use error::Error;
#[pin_data(PinnedDrop)]
@@ -39,6 +40,7 @@ pub fn new() -> impl PinInit<Self, Infallible> {
}
#[inline]
+ #[allow(dead_code)]
pub fn insert_next(list: &ListHead) -> impl PinInit<Self, Infallible> + '_ {
try_pin_init!(&this in Self {
prev: list.next.prev().replace(unsafe { Link::new_unchecked(this)}),
@@ -112,6 +114,7 @@ fn next(&self) -> &Link {
}
#[inline]
+ #[allow(dead_code)]
fn prev(&self) -> &Link {
unsafe { &(*self.0.get().as_ptr()).prev }
}
@@ -137,8 +140,13 @@ fn set(&self, val: &Link) {
}
}
+#[allow(dead_code)]
+#[cfg(not(any(feature = "std", feature = "alloc")))]
+fn main() {}
+
#[allow(dead_code)]
#[cfg_attr(test, test)]
+#[cfg(any(feature = "std", feature = "alloc"))]
fn main() -> Result<(), Error> {
let a = Box::pin_init(ListHead::new())?;
stack_pin_init!(let b = ListHead::insert_next(&a));
diff --git a/rust/pin-init/examples/mutex.rs b/rust/pin-init/examples/mutex.rs
index 3e3630780c96..9f295226cd64 100644
--- a/rust/pin-init/examples/mutex.rs
+++ b/rust/pin-init/examples/mutex.rs
@@ -12,14 +12,15 @@
pin::Pin,
sync::atomic::{AtomicBool, Ordering},
};
+#[cfg(feature = "std")]
use std::{
sync::Arc,
- thread::{self, park, sleep, Builder, Thread},
+ thread::{self, sleep, Builder, Thread},
time::Duration,
};
use pin_init::*;
-#[expect(unused_attributes)]
+#[allow(unused_attributes)]
#[path = "./linked_list.rs"]
pub mod linked_list;
use linked_list::*;
@@ -36,6 +37,7 @@ pub fn acquire(&self) -> SpinLockGuard<'_> {
.compare_exchange(false, true, Ordering::Acquire, Ordering::Relaxed)
.is_err()
{
+ #[cfg(feature = "std")]
while self.inner.load(Ordering::Relaxed) {
thread::yield_now();
}
@@ -94,7 +96,8 @@ pub fn lock(&self) -> Pin<CMutexGuard<'_, T>> {
// println!("wait list length: {}", self.wait_list.size());
while self.locked.get() {
drop(sguard);
- park();
+ #[cfg(feature = "std")]
+ thread::park();
sguard = self.spin_lock.acquire();
}
// This does have an effect, as the ListHead inside wait_entry implements Drop!
@@ -131,8 +134,11 @@ fn drop(&mut self) {
let sguard = self.mtx.spin_lock.acquire();
self.mtx.locked.set(false);
if let Some(list_field) = self.mtx.wait_list.next() {
- let wait_entry = list_field.as_ptr().cast::<WaitEntry>();
- unsafe { (*wait_entry).thread.unpark() };
+ let _wait_entry = list_field.as_ptr().cast::<WaitEntry>();
+ #[cfg(feature = "std")]
+ unsafe {
+ (*_wait_entry).thread.unpark()
+ };
}
drop(sguard);
}
@@ -159,52 +165,61 @@ fn deref_mut(&mut self) -> &mut Self::Target {
struct WaitEntry {
#[pin]
wait_list: ListHead,
+ #[cfg(feature = "std")]
thread: Thread,
}
impl WaitEntry {
#[inline]
fn insert_new(list: &ListHead) -> impl PinInit<Self> + '_ {
- pin_init!(Self {
- thread: thread::current(),
- wait_list <- ListHead::insert_prev(list),
- })
+ #[cfg(feature = "std")]
+ {
+ pin_init!(Self {
+ thread: thread::current(),
+ wait_list <- ListHead::insert_prev(list),
+ })
+ }
+ #[cfg(not(feature = "std"))]
+ {
+ pin_init!(Self {
+ wait_list <- ListHead::insert_prev(list),
+ })
+ }
}
}
-#[cfg(not(any(feature = "std", feature = "alloc")))]
-fn main() {}
-
-#[allow(dead_code)]
#[cfg_attr(test, test)]
-#[cfg(any(feature = "std", feature = "alloc"))]
+#[allow(dead_code)]
fn main() {
- let mtx: Pin<Arc<CMutex<usize>>> = Arc::pin_init(CMutex::new(0)).unwrap();
- let mut handles = vec![];
- let thread_count = 20;
- let workload = if cfg!(miri) { 100 } else { 1_000 };
- for i in 0..thread_count {
- let mtx = mtx.clone();
- handles.push(
- Builder::new()
- .name(format!("worker #{i}"))
- .spawn(move || {
- for _ in 0..workload {
- *mtx.lock() += 1;
- }
- println!("{i} halfway");
- sleep(Duration::from_millis((i as u64) * 10));
- for _ in 0..workload {
- *mtx.lock() += 1;
- }
- println!("{i} finished");
- })
- .expect("should not fail"),
- );
- }
- for h in handles {
- h.join().expect("thread panicked");
+ #[cfg(feature = "std")]
+ {
+ let mtx: Pin<Arc<CMutex<usize>>> = Arc::pin_init(CMutex::new(0)).unwrap();
+ let mut handles = vec![];
+ let thread_count = 20;
+ let workload = if cfg!(miri) { 100 } else { 1_000 };
+ for i in 0..thread_count {
+ let mtx = mtx.clone();
+ handles.push(
+ Builder::new()
+ .name(format!("worker #{i}"))
+ .spawn(move || {
+ for _ in 0..workload {
+ *mtx.lock() += 1;
+ }
+ println!("{i} halfway");
+ sleep(Duration::from_millis((i as u64) * 10));
+ for _ in 0..workload {
+ *mtx.lock() += 1;
+ }
+ println!("{i} finished");
+ })
+ .expect("should not fail"),
+ );
+ }
+ for h in handles {
+ h.join().expect("thread panicked");
+ }
+ println!("{:?}", &*mtx.lock());
+ assert_eq!(*mtx.lock(), workload * thread_count * 2);
}
- println!("{:?}", &*mtx.lock());
- assert_eq!(*mtx.lock(), workload * thread_count * 2);
}
diff --git a/rust/pin-init/examples/pthread_mutex.rs b/rust/pin-init/examples/pthread_mutex.rs
index 5acc5108b954..c709dabba7eb 100644
--- a/rust/pin-init/examples/pthread_mutex.rs
+++ b/rust/pin-init/examples/pthread_mutex.rs
@@ -44,6 +44,7 @@ fn drop(self: Pin<&mut Self>) {
pub enum Error {
#[allow(dead_code)]
IO(std::io::Error),
+ #[allow(dead_code)]
Alloc,
}
@@ -61,6 +62,7 @@ fn from(_: AllocError) -> Self {
}
impl<T> PThreadMutex<T> {
+ #[allow(dead_code)]
pub fn new(data: T) -> impl PinInit<Self, Error> {
fn init_raw() -> impl PinInit<UnsafeCell<libc::pthread_mutex_t>, Error> {
let init = |slot: *mut UnsafeCell<libc::pthread_mutex_t>| {
@@ -103,6 +105,7 @@ fn init_raw() -> impl PinInit<UnsafeCell<libc::pthread_mutex_t>, Error> {
}? Error)
}
+ #[allow(dead_code)]
pub fn lock(&self) -> PThreadMutexGuard<'_, T> {
// SAFETY: raw is always initialized
unsafe { libc::pthread_mutex_lock(self.raw.get()) };
diff --git a/rust/pin-init/examples/static_init.rs b/rust/pin-init/examples/static_init.rs
index 48531413ab94..0e165daa9798 100644
--- a/rust/pin-init/examples/static_init.rs
+++ b/rust/pin-init/examples/static_init.rs
@@ -3,6 +3,7 @@
#![allow(clippy::undocumented_unsafe_blocks)]
#![cfg_attr(feature = "alloc", feature(allocator_api))]
#![cfg_attr(not(RUSTC_LINT_REASONS_IS_STABLE), feature(lint_reasons))]
+#![allow(unused_imports)]
use core::{
cell::{Cell, UnsafeCell},
@@ -12,12 +13,13 @@
time::Duration,
};
use pin_init::*;
+#[cfg(feature = "std")]
use std::{
sync::Arc,
thread::{sleep, Builder},
};
-#[expect(unused_attributes)]
+#[allow(unused_attributes)]
mod mutex;
use mutex::*;
@@ -82,42 +84,41 @@ unsafe fn __pinned_init(
pub static COUNT: StaticInit<CMutex<usize>, CountInit> = StaticInit::new(CountInit);
-#[cfg(not(any(feature = "std", feature = "alloc")))]
-fn main() {}
-
-#[cfg(any(feature = "std", feature = "alloc"))]
fn main() {
- let mtx: Pin<Arc<CMutex<usize>>> = Arc::pin_init(CMutex::new(0)).unwrap();
- let mut handles = vec![];
- let thread_count = 20;
- let workload = 1_000;
- for i in 0..thread_count {
- let mtx = mtx.clone();
- handles.push(
- Builder::new()
- .name(format!("worker #{i}"))
- .spawn(move || {
- for _ in 0..workload {
- *COUNT.lock() += 1;
- std::thread::sleep(std::time::Duration::from_millis(10));
- *mtx.lock() += 1;
- std::thread::sleep(std::time::Duration::from_millis(10));
- *COUNT.lock() += 1;
- }
- println!("{i} halfway");
- sleep(Duration::from_millis((i as u64) * 10));
- for _ in 0..workload {
- std::thread::sleep(std::time::Duration::from_millis(10));
- *mtx.lock() += 1;
- }
- println!("{i} finished");
- })
- .expect("should not fail"),
- );
- }
- for h in handles {
- h.join().expect("thread panicked");
+ #[cfg(feature = "std")]
+ {
+ let mtx: Pin<Arc<CMutex<usize>>> = Arc::pin_init(CMutex::new(0)).unwrap();
+ let mut handles = vec![];
+ let thread_count = 20;
+ let workload = 1_000;
+ for i in 0..thread_count {
+ let mtx = mtx.clone();
+ handles.push(
+ Builder::new()
+ .name(format!("worker #{i}"))
+ .spawn(move || {
+ for _ in 0..workload {
+ *COUNT.lock() += 1;
+ std::thread::sleep(std::time::Duration::from_millis(10));
+ *mtx.lock() += 1;
+ std::thread::sleep(std::time::Duration::from_millis(10));
+ *COUNT.lock() += 1;
+ }
+ println!("{i} halfway");
+ sleep(Duration::from_millis((i as u64) * 10));
+ for _ in 0..workload {
+ std::thread::sleep(std::time::Duration::from_millis(10));
+ *mtx.lock() += 1;
+ }
+ println!("{i} finished");
+ })
+ .expect("should not fail"),
+ );
+ }
+ for h in handles {
+ h.join().expect("thread panicked");
+ }
+ println!("{:?}, {:?}", &*mtx.lock(), &*COUNT.lock());
+ assert_eq!(*mtx.lock(), workload * thread_count * 2);
}
- println!("{:?}, {:?}", &*mtx.lock(), &*COUNT.lock());
- assert_eq!(*mtx.lock(), workload * thread_count * 2);
}
--
2.49.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] rust: pin-init: examples: pthread_mutex: disable the main test for miri
2025-05-23 12:54 [PATCH 0/3] pin-init sync: test & CI fixes Benno Lossin
2025-05-23 12:54 ` [PATCH 1/3] rust: pin-init: examples, tests: add conditional compilation in order to compile under any feature combination Benno Lossin
@ 2025-05-23 12:54 ` Benno Lossin
2025-05-23 18:26 ` Alice Ryhl
2025-05-23 12:54 ` [PATCH 3/3] rust: pin-init: feature-gate the `stack_init_reuse` test on the `std` feature Benno Lossin
2025-06-09 19:52 ` [PATCH 0/3] pin-init sync: test & CI fixes Benno Lossin
3 siblings, 1 reply; 7+ messages in thread
From: Benno Lossin @ 2025-05-23 12:54 UTC (permalink / raw)
To: Benno Lossin, Miguel Ojeda, Alex Gaynor, Boqun Feng, Gary Guo,
Björn Roy Baron, Andreas Hindborg, Alice Ryhl, Trevor Gross,
Danilo Krummrich, Fiona Behrens
Cc: Benno Lossin, rust-for-linux, linux-kernel
From: Benno Lossin <benno.lossin@proton.me>
`miri` takes a long time to execute the test, so disable it.
Link: https://github.com/Rust-for-Linux/pin-init/pull/50/commits/e717a9eec85024c11e79e8bd9dcb664ad0de8f94
Signed-off-by: Benno Lossin <lossin@kernel.org>
---
rust/pin-init/examples/pthread_mutex.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rust/pin-init/examples/pthread_mutex.rs b/rust/pin-init/examples/pthread_mutex.rs
index c709dabba7eb..6c4d18238956 100644
--- a/rust/pin-init/examples/pthread_mutex.rs
+++ b/rust/pin-init/examples/pthread_mutex.rs
@@ -139,7 +139,7 @@ fn deref_mut(&mut self) -> &mut Self::Target {
}
}
-#[cfg_attr(test, test)]
+#[cfg_attr(all(test, not(miri)), test)]
fn main() {
#[cfg(all(any(feature = "std", feature = "alloc"), not(windows)))]
{
--
2.49.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] rust: pin-init: feature-gate the `stack_init_reuse` test on the `std` feature
2025-05-23 12:54 [PATCH 0/3] pin-init sync: test & CI fixes Benno Lossin
2025-05-23 12:54 ` [PATCH 1/3] rust: pin-init: examples, tests: add conditional compilation in order to compile under any feature combination Benno Lossin
2025-05-23 12:54 ` [PATCH 2/3] rust: pin-init: examples: pthread_mutex: disable the main test for miri Benno Lossin
@ 2025-05-23 12:54 ` Benno Lossin
2025-06-09 19:52 ` [PATCH 0/3] pin-init sync: test & CI fixes Benno Lossin
3 siblings, 0 replies; 7+ messages in thread
From: Benno Lossin @ 2025-05-23 12:54 UTC (permalink / raw)
To: Benno Lossin, Miguel Ojeda, Alex Gaynor, Boqun Feng, Gary Guo,
Björn Roy Baron, Andreas Hindborg, Alice Ryhl, Trevor Gross,
Danilo Krummrich, Fiona Behrens
Cc: Benno Lossin, rust-for-linux, linux-kernel
From: Benno Lossin <benno.lossin@proton.me>
When trying to run `cargo check --all-targets --no-default-features`, an
error is reported by the test, as it cannot find the `std` crate. This
is to be expected, since the `--no-default-features` flag enables the
`no-std` behavior of the crate. Thus exclude the test in that scenario.
Link: https://github.com/Rust-for-Linux/pin-init/pull/50/commits/2813729ccacdedee9dbfcab1ed285b8721a0391b
Signed-off-by: Benno Lossin <lossin@kernel.org>
---
rust/pin-init/src/__internal.rs | 1 +
1 file changed, 1 insertion(+)
diff --git a/rust/pin-init/src/__internal.rs b/rust/pin-init/src/__internal.rs
index 557b5948cddc..90f18e9a2912 100644
--- a/rust/pin-init/src/__internal.rs
+++ b/rust/pin-init/src/__internal.rs
@@ -188,6 +188,7 @@ pub fn init<E>(self: Pin<&mut Self>, init: impl PinInit<T, E>) -> Result<Pin<&mu
}
#[test]
+#[cfg(feature = "std")]
fn stack_init_reuse() {
use ::std::{borrow::ToOwned, println, string::String};
use core::pin::pin;
--
2.49.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] rust: pin-init: examples: pthread_mutex: disable the main test for miri
2025-05-23 12:54 ` [PATCH 2/3] rust: pin-init: examples: pthread_mutex: disable the main test for miri Benno Lossin
@ 2025-05-23 18:26 ` Alice Ryhl
2025-05-26 8:20 ` Benno Lossin
0 siblings, 1 reply; 7+ messages in thread
From: Alice Ryhl @ 2025-05-23 18:26 UTC (permalink / raw)
To: Benno Lossin
Cc: Miguel Ojeda, Alex Gaynor, Boqun Feng, Gary Guo,
Björn Roy Baron, Andreas Hindborg, Trevor Gross,
Danilo Krummrich, Fiona Behrens, Benno Lossin, rust-for-linux,
linux-kernel
On Fri, May 23, 2025 at 02:54:12PM +0200, Benno Lossin wrote:
> From: Benno Lossin <benno.lossin@proton.me>
>
> `miri` takes a long time to execute the test, so disable it.
>
> Link: https://github.com/Rust-for-Linux/pin-init/pull/50/commits/e717a9eec85024c11e79e8bd9dcb664ad0de8f94
> Signed-off-by: Benno Lossin <lossin@kernel.org>
I usually recommend ignoring tests rather than cfg'ing them out
entirely.
#[cfg_attr(miri, ignore)]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] rust: pin-init: examples: pthread_mutex: disable the main test for miri
2025-05-23 18:26 ` Alice Ryhl
@ 2025-05-26 8:20 ` Benno Lossin
0 siblings, 0 replies; 7+ messages in thread
From: Benno Lossin @ 2025-05-26 8:20 UTC (permalink / raw)
To: Alice Ryhl
Cc: Miguel Ojeda, Alex Gaynor, Boqun Feng, Gary Guo,
Björn Roy Baron, Andreas Hindborg, Trevor Gross,
Danilo Krummrich, Fiona Behrens, Benno Lossin, rust-for-linux,
linux-kernel
On Fri May 23, 2025 at 8:26 PM CEST, Alice Ryhl wrote:
> On Fri, May 23, 2025 at 02:54:12PM +0200, Benno Lossin wrote:
>> From: Benno Lossin <benno.lossin@proton.me>
>>
>> `miri` takes a long time to execute the test, so disable it.
>>
>> Link: https://github.com/Rust-for-Linux/pin-init/pull/50/commits/e717a9eec85024c11e79e8bd9dcb664ad0de8f94
>> Signed-off-by: Benno Lossin <lossin@kernel.org>
>
> I usually recommend ignoring tests rather than cfg'ing them out
> entirely.
>
> #[cfg_attr(miri, ignore)]
Oh I didn't know you can do that!
This patch sadly already is in the main branch and I have the policy
that I don't rebase that one, so I'll make another patch to fix that.
(and in the future I'll wait with merging for reviews on the list :)
---
Cheers,
Benno
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/3] pin-init sync: test & CI fixes
2025-05-23 12:54 [PATCH 0/3] pin-init sync: test & CI fixes Benno Lossin
` (2 preceding siblings ...)
2025-05-23 12:54 ` [PATCH 3/3] rust: pin-init: feature-gate the `stack_init_reuse` test on the `std` feature Benno Lossin
@ 2025-06-09 19:52 ` Benno Lossin
3 siblings, 0 replies; 7+ messages in thread
From: Benno Lossin @ 2025-06-09 19:52 UTC (permalink / raw)
To: Miguel Ojeda, Alex Gaynor, Boqun Feng, Gary Guo,
Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
Trevor Gross, Danilo Krummrich
Cc: rust-for-linux
On Fri May 23, 2025 at 2:54 PM CEST, Benno Lossin wrote:
> Several smaller problems I found in the CI related to enabled features &
> tests.
>
> Upstream PR: https://github.com/Rust-for-Linux/pin-init/pull/50
>
> Benno Lossin (3):
> rust: pin-init: examples, tests: add conditional compilation in order
> to compile under any feature combination
> rust: pin-init: examples: pthread_mutex: disable the main test for
> miri
> rust: pin-init: feature-gate the `stack_init_reuse` test on the `std`
> feature
>
> rust/pin-init/examples/big_struct_in_place.rs | 26 ++---
> rust/pin-init/examples/linked_list.rs | 10 +-
> rust/pin-init/examples/mutex.rs | 97 +++++++++++--------
> rust/pin-init/examples/pthread_mutex.rs | 5 +-
> rust/pin-init/examples/static_init.rs | 75 +++++++-------
> rust/pin-init/src/__internal.rs | 1 +
> 6 files changed, 123 insertions(+), 91 deletions(-)
>
>
> base-commit: ae8b3a83fb9de394f609035041cd7a668fda2ab3
Applied to pin-init-next -- thanks everyone!
---
Cheers,
Benno
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-06-09 19:52 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-23 12:54 [PATCH 0/3] pin-init sync: test & CI fixes Benno Lossin
2025-05-23 12:54 ` [PATCH 1/3] rust: pin-init: examples, tests: add conditional compilation in order to compile under any feature combination Benno Lossin
2025-05-23 12:54 ` [PATCH 2/3] rust: pin-init: examples: pthread_mutex: disable the main test for miri Benno Lossin
2025-05-23 18:26 ` Alice Ryhl
2025-05-26 8:20 ` Benno Lossin
2025-05-23 12:54 ` [PATCH 3/3] rust: pin-init: feature-gate the `stack_init_reuse` test on the `std` feature Benno Lossin
2025-06-09 19:52 ` [PATCH 0/3] pin-init sync: test & CI fixes Benno Lossin
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).