From 4e68d665bef8d13adb499a803c2f68b704ea54fe Mon Sep 17 00:00:00 2001 From: Per Minborg Date: Tue, 26 Nov 2024 08:24:21 +0000 Subject: [PATCH] 8344954: Linker tests fails on BE platforms after JDK-8340205 Reviewed-by: mdoerr, amitkumar --- test/jdk/java/foreign/TestLinker.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/jdk/java/foreign/TestLinker.java b/test/jdk/java/foreign/TestLinker.java index 4bc19965f19..798e5dd04db 100644 --- a/test/jdk/java/foreign/TestLinker.java +++ b/test/jdk/java/foreign/TestLinker.java @@ -181,7 +181,7 @@ public class TestLinker extends NativeTestHelper { var fd = FunctionDescriptor.of(struct, struct, struct); var e = expectThrows(IllegalArgumentException.class, () -> linker.downcallHandle(fd)); assertEquals(e.getMessage(), - "The padding layout x2 was preceded by another padding layout x1 in [b1x1x2i4]"); + "The padding layout x2 was preceded by another padding layout x1 in " + struct); } @Test @@ -199,7 +199,7 @@ public class TestLinker extends NativeTestHelper { var fd = FunctionDescriptor.of(struct, struct, struct); var e = expectThrows(IllegalArgumentException.class, () -> linker.downcallHandle(fd)); assertEquals(e.getMessage(), - "The padding layout x2 was preceded by another padding layout x1 in [b1x1x2x4x8x16[[[4:j8]]|x32]]"); + "The padding layout x2 was preceded by another padding layout x1 in " + struct); } @Test @@ -208,7 +208,7 @@ public class TestLinker extends NativeTestHelper { var union = MemoryLayout.unionLayout(MemoryLayout.paddingLayout(3), ValueLayout.JAVA_INT); var fd = FunctionDescriptor.of(union, union, union); var e = expectThrows(IllegalArgumentException.class, () -> linker.downcallHandle(fd)); - assertEquals(e.getMessage(), "Superfluous padding x3 in [x3|i4]"); + assertEquals(e.getMessage(), "Superfluous padding x3 in " + union); } @Test @@ -217,7 +217,7 @@ public class TestLinker extends NativeTestHelper { var union = MemoryLayout.unionLayout(MemoryLayout.paddingLayout(4), ValueLayout.JAVA_INT); var fd = FunctionDescriptor.of(union, union, union); var e = expectThrows(IllegalArgumentException.class, () -> linker.downcallHandle(fd)); - assertEquals(e.getMessage(), "Superfluous padding x4 in [x4|i4]"); + assertEquals(e.getMessage(), "Superfluous padding x4 in " + union); } @Test @@ -226,7 +226,7 @@ public class TestLinker extends NativeTestHelper { var union = MemoryLayout.unionLayout(MemoryLayout.paddingLayout(5), ValueLayout.JAVA_INT); var fd = FunctionDescriptor.of(union, union, union); var e = expectThrows(IllegalArgumentException.class, () -> linker.downcallHandle(fd)); - assertEquals(e.getMessage(), "Layout '[x5|i4]' has unexpected size: 5 != 4"); + assertEquals(e.getMessage(), "Layout '" + union + "' has unexpected size: 5 != 4"); } @Test @@ -239,7 +239,7 @@ public class TestLinker extends NativeTestHelper { MemoryLayout.paddingLayout(16)); var fd = FunctionDescriptor.of(union, union, union); var e = expectThrows(IllegalArgumentException.class, () -> linker.downcallHandle(fd)); - assertEquals(e.getMessage(), "More than one padding in [[3:i4]|j8|x16|x16]"); + assertEquals(e.getMessage(), "More than one padding in " + union); } @Test