Integrated: JDK-8309549: com/sun/tools/attach/warnings/DynamicLoadWarningTest.java fails on AIX
Matthias Baesken
mbaesken at openjdk.org
Mon Jun 12 07:10:57 UTC 2023
On Fri, 9 Jun 2023 13:39:26 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
> 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 .
This pull request has now been integrated.
Changeset: 4d66d977
Author: Matthias Baesken <mbaesken at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/4d66d977450e083214da3dba6ad4ed851c6c1cb4
Stats: 7 lines in 1 file changed: 3 ins; 0 del; 4 mod
8309549: com/sun/tools/attach/warnings/DynamicLoadWarningTest.java fails on AIX
Reviewed-by: alanb, cjplummer, sspitsyn
-------------
PR: https://git.openjdk.org/jdk/pull/14393
More information about the core-libs-dev
mailing list