* [tip: locking/core] rust: sync: atomic: Add store_release/load_acquire tests
[not found] <20251211113826.1299077-5-fujita.tomonori@gmail.com>
@ 2026-01-13 10:49 ` tip-bot2 for FUJITA Tomonori
0 siblings, 0 replies; only message in thread
From: tip-bot2 for FUJITA Tomonori @ 2026-01-13 10:49 UTC (permalink / raw)
To: linux-tip-commits
Cc: FUJITA Tomonori, Gary Guo, Joel Fernandes, Boqun Feng, x86, linux-kernel
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@gmail.com>
AuthorDate: Thu, 11 Dec 2025 20:38:26 +09:00
Committer: Boqun Feng <boqun.feng@gmail.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@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Joel Fernandes <joelagnelf@nvidia.com>
Signed-off-by: Boqun Feng <boqun.feng@gmail.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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-01-13 10:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20251211113826.1299077-5-fujita.tomonori@gmail.com>
2026-01-13 10:49 ` [tip: locking/core] rust: sync: atomic: Add store_release/load_acquire tests tip-bot2 for FUJITA Tomonori
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®