JDK-8311822 : AIX : test/jdk/java/foreign/TestLayouts.java fails because of different output - expected [[i4](struct)] but found [[I4](struct)]
  • Type: Bug
  • Component: core-libs
  • Affected Version: 22
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: aix
  • CPU: ppc
  • Submitted: 2023-07-10
  • Updated: 2024-02-14
  • Resolved: 2023-07-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 21 JDK 22
21Fixed 22 b08Fixed
Related Reports
Relates :  
Description
The jtreg test  jdk/java/foreign/TestLayouts.java  .
currently fails on AIX, it runs into this error  :
 
test TestLayouts.testStructSizeAndAlign(): success
test TestLayouts.testStructToString(): failure
java.lang.AssertionError: expected [[i4](struct)] but found [[I4](struct)]
        at org.testng.Assert.fail(Assert.java:99)
        at org.testng.Assert.failNotEquals(Assert.java:1037)
        at org.testng.Assert.assertEqualsImpl(Assert.java:140)
        at org.testng.Assert.assertEquals(Assert.java:122)
        at org.testng.Assert.assertEquals(Assert.java:629)
        at org.testng.Assert.assertEquals(Assert.java:639)
        at TestLayouts.testStructToString(TestLayouts.java:264)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
        at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:599)
        at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:174)
        at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
        at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:822)
        at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:147)
        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1593)
        at org.testng.TestRunner.privateRun(TestRunner.java:764)
        at org.testng.TestRunner.run(TestRunner.java:585)
        at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
        at org.testng.SuiteRunner.run(SuiteRunner.java:286)
        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1218)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
        at org.testng.TestNG.runSuites(TestNG.java:1069)
        at org.testng.TestNG.run(TestNG.java:1037)
        at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:93)
        at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:53)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125)
        at java.base/java.lang.Thread.run(Thread.java:1570)
test TestLayouts.testUnionPaddingAndAlign(B1): success
test TestLayouts.testUnionPaddingAndAlign(C2): success
 
This might be related to the fact that AIX is big-endian.
Comments
A pull request was submitted for review. URL: https://git.openjdk.org/jdk21/pull/157 Date: 2023-08-01 21:57:17 +0000
01-08-2023

Changeset: d1cc2782 Author: Per Minborg <pminborg@openjdk.org> Date: 2023-07-24 15:00:47 +0000 URL: https://git.openjdk.org/jdk/commit/d1cc2782606e8a3cfead9055aa845e48e851edd4
24-07-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/14994 Date: 2023-07-24 09:51:33 +0000
24-07-2023

Please reassign if there is a more appropriate person to resolve this.
11-07-2023

I guess either this PR or similar change, could fix this test case: https://github.com/openjdk/jdk/pull/14801/files#diff-85d59b266a1d8795247fe9de481098e56425da62a4e48d557c514328c5d5294c
11-07-2023