commit 360bc28c9646ef6bcd6136f8a088930201e02012 (tree)
parent ee82d926a646a25a5986591ade1f30e77eed0a34
Author: Justus Klausecker <justus@klausecker.de>
Date: Mon, 23 Feb 2026 17:07:47 +0100
fix cmpxchg behavior test
This has to be a `@cmpxchgStrong` instead of a `@cmpxchgWeak` otherwise
this test will fail spuriously on LL/SC architectures like PowerPC.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/behavior/atomics.zig b/test/behavior/atomics.zig
@@ -143,7 +143,7 @@ test "cmpxchg on a global variable" {
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
- _ = @cmpxchgWeak(u32, &a_global_variable, 1234, 42, .acquire, .monotonic);
+ _ = @cmpxchgStrong(u32, &a_global_variable, 1234, 42, .acquire, .monotonic);
try expect(a_global_variable == 42);
}