RFR: JDK-8309549: com/sun/tools/attach/warnings/DynamicLoadWarningTest.java fails on AIX
Matthias Baesken
mbaesken at openjdk.org
Fri Jun 9 13:45:58 UTC 2023
On AIX , new jtreg test com/sun/tools/attach/warnings/DynamicLoadWarningTest.java always failed with the output :
----------System.err:(294/28579)----------
STARTED DynamicLoadWarningTest::testLoadJavaAgent 'testLoadJavaAgent()'
SUCCESSFUL DynamicLoadWarningTest::testLoadJavaAgent 'testLoadJavaAgent()'
STARTED DynamicLoadWarningTest::testLoadOneJvmtiAgent '[1] DynamicLoadWarningTest$$Lambda/0x000000040020bd88 at 600d90bb'
org.opentest4j.AssertionFailedError: expected: <1> but was: <2>
at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197)
at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:150)
at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:145)
at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:528)
at DynamicLoadWarningTest$AppRunner.stderrShouldContain(DynamicLoadWarningTest.java:298)
at DynamicLoadWarningTest.testLoadOneJvmtiAgent(DynamicLoadWarningTest.java:125)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
Reason seems to be the different behavior of dlopen on AIX compared to e.g. Linux
This is what I find in the manpage of AIX 7.2 or 7.3 :
https://www.ibm.com/docs/en/aix/7.2?topic=d-dlopen-subroutine
https://www.ibm.com/docs/en/aix/7.3?topic=d-dlopen-subroutine
'If the module is already loaded, it is not loaded again, but a new, unique value will be returned by the dlopen subroutine.'
Sounds different to what Linux documents in the manpage:
https://man7.org/linux/man-pages/man3/dlopen.3.html
'If the same shared object is opened again with dlopen(), the same object handle is returned.'
We skip this special subtest on AIX .
-------------
Commit messages:
- JDK-8309549
Changes: https://git.openjdk.org/jdk/pull/14393/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14393&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8309549
Stats: 7 lines in 1 file changed: 3 ins; 0 del; 4 mod
Patch: https://git.openjdk.org/jdk/pull/14393.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/14393/head:pull/14393
PR: https://git.openjdk.org/jdk/pull/14393
More information about the core-libs-dev
mailing list