[<prev] [next>] [day] [month] [year] [list]
Message-ID: <176830139454.510.708996413489343647.tip-bot2@tip-bot2>
Date: Tue, 13 Jan 2026 10:49:54 -0000
From: "tip-bot2 for FUJITA Tomonori" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: FUJITA Tomonori <fujita.tomonori@...il.com>, Gary Guo <gary@...yguo.net>,
Joel Fernandes <joelagnelf@...dia.com>, Boqun Feng <boqun.feng@...il.com>,
x86@...nel.org, linux-kernel@...r.kernel.org
Subject:
[tip: locking/core] rust: sync: atomic: Add store_release/load_acquire tests
The following commit has been merged into the locking/core branch of tip:
Commit-ID: 7b001c97d9bdaea50e1e1834040c58f7ef9f4e89
Gitweb: https://git.kernel.org/tip/7b001c97d9bdaea50e1e1834040c58f7ef9f4e89
Author: FUJITA Tomonori <fujita.tomonori@...il.com>
AuthorDate: Thu, 11 Dec 2025 20:38:26 +09:00
Committer: Boqun Feng <boqun.feng@...il.com>
CommitterDate: Fri, 09 Jan 2026 19:01:41 +08:00
rust: sync: atomic: Add store_release/load_acquire tests
Add minimum store_release/load_acquire tests.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@...il.com>
Reviewed-by: Gary Guo <gary@...yguo.net>
Reviewed-by: Joel Fernandes <joelagnelf@...dia.com>
Signed-off-by: Boqun Feng <boqun.feng@...il.com>
Link: https://patch.msgid.link/20251211113826.1299077-5-fujita.tomonori@gmail.com
---
rust/kernel/sync/atomic/predefine.rs | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/rust/kernel/sync/atomic/predefine.rs b/rust/kernel/sync/atomic/predefine.rs
index 09b357b..51e9df0 100644
--- a/rust/kernel/sync/atomic/predefine.rs
+++ b/rust/kernel/sync/atomic/predefine.rs
@@ -138,6 +138,16 @@ mod tests {
}
#[test]
+ fn atomic_acquire_release_tests() {
+ for_each_type!(42 in [i8, i16, i32, i64, u32, u64, isize, usize] |v| {
+ let x = Atomic::new(0);
+
+ x.store(v, Release);
+ assert_eq!(v, x.load(Acquire));
+ });
+ }
+
+ #[test]
fn atomic_xchg_tests() {
for_each_type!(42 in [i32, i64, u32, u64, isize, usize] |v| {
let x = Atomic::new(v);
Powered by blists - more mailing lists