8344954: Linker tests fails on BE platforms after JDK-8340205

Reviewed-by: mdoerr, amitkumar
This commit is contained in:
Per Minborg 2024-11-26 08:24:21 +00:00
parent ca81ab5ebc
commit 4e68d665be

View File

@ -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