[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Integrated: 8260378: [TESTBUG] DcmdMBeanTestCheckJni.java reports false positive
From:       Severin Gehwolf <sgehwolf () openjdk ! java ! net>
Date:       2021-01-26 15:21:40
Message-ID: OaiPBb3R7qP1ydPn0ser3Iuto25CstnpZztklqyy9q4=.5db2bd82-3787-4113-a5da-d077e737b7e2 () github ! com
[Download RAW message or body]

On Tue, 26 Jan 2021 11:33:37 GMT, Severin Gehwolf <sgehwolf@openjdk.org> wrote:

> I propose to add additional context to the string which must not match after \
> [JDK-8258836](https://bugs.openjdk.java.net/browse/JDK-8258836). This then passes \
> the test for a fixed JDK (including JDKs with JDK-8187450 *not* fixed). 
> Testing:
> - [x] Reverted the fix from product code of JDK-8258836, ran the test. Failed as \
>                 expected.
> - [x] Ran the updated test on current head. Passed.
> - [x] Ran the updated test with [1] included. Passed even though the processes' \
> stdout contained [2]. 
> [1] Explicitly add a call to NetworkInterface.getNetworkInterfaces()
> diff --git a/test/jdk/com/sun/management/DiagnosticCommandMBean/DcmdMBeanTestCheckJni.java \
> b/test/jdk/com/sun/management/DiagnosticCommandMBean/DcmdMBeanTestCheckJni.java \
>                 index 73e53da63f1..4f32af3f463 100644
> --- a/test/jdk/com/sun/management/DiagnosticCommandMBean/DcmdMBeanTestCheckJni.java
> +++ b/test/jdk/com/sun/management/DiagnosticCommandMBean/DcmdMBeanTestCheckJni.java
> @@ -62,6 +62,7 @@ class DcmdMBeanRunner {
> "com.sun.management:type=DiagnosticCommand";
> 
> public static void main(String[] args) throws Exception {
> +        java.net.NetworkInterface.getNetworkInterfaces();
> MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
> JMXServiceURL url = new JMXServiceURL("rmi", null, 0);
> JMXConnectorServer cs = null;
> [2]
> --- ProcessLog ---
> cmd: /disk/openjdk/upstream-sources/git/jdk-jdk/./build/linux-x86_64-server-release/images/jdk/bin/java \
> -cp /disk/openjdk/upstream-sources/git/jdk-jdk/JTwork/classes/com/sun/management/Dia \
> gnosticCommandMBean/DcmdMBeanTestCheckJni.d:/disk/openjdk/upstream-sources/git/jdk-j \
> dk/test/jdk/com/sun/management/DiagnosticCommandMBean:/disk/openjdk/upstream-sources \
> /git/jdk-jdk/JTwork/classes/test/lib:/disk/openjdk/upstream-sources/git/jdk-jdk/test \
> /lib:/disk/openjdk/upstream-sources/jtreg-5.1-b01/lib/javatest.jar:/disk/openjdk/upstream-sources/jtreg-5.1-b01/lib/jtreg.jar \
>                 -Xcheck:jni DcmdMBeanRunner
> exitvalue: 0
> stderr:
> stdout: WARNING: JNI local refs: 33, exceeds capacity: 32
> at java.net.NetworkInterface.getAll(java.base@17-internal/Native Method)
> at java.net.NetworkInterface.getNetworkInterfaces(java.base@17-internal/NetworkInterface.java:351)
>  at DcmdMBeanRunner.main(DcmdMBeanTestCheckJni.java:65)
> DiagnosticCommand MBean: com.sun.management:type=DiagnosticCommand
> DcmdMBeanRunner COMPLETE

This pull request has now been integrated.

Changeset: af8a08f5
Author:    Severin Gehwolf <sgehwolf@openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/af8a08f5
Stats:     3 lines in 2 files changed: 1 ins; 1 del; 1 mod

8260378: [TESTBUG] DcmdMBeanTestCheckJni.java reports false positive

Reviewed-by: dcubed

-------------

PR: https://git.openjdk.java.net/jdk/pull/2234


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic