RFR(S): JDK-8244973: serviceability/attach/RemovingUnixDomainSocketTest.java fails "stderr was not empty"

Alex Menkov alexey.menkov at oracle.com
Thu May 14 02:38:43 UTC 2020


Hi David,

On 05/13/2020 19:27, David Holmes wrote:
> Hi Alex,
> 
> On 14/05/2020 12:20 pm, Alex Menkov wrote:
>> Hi all,
>>
>> please review tiny (and I suppose trivial) fix for
>> https://bugs.openjdk.java.net/browse/JDK-8244973
>> webrev:
>> http://cr.openjdk.java.net/~amenkov/jdk15/RemovingUnixDomainSocket_merge/webrev/ 
>>
>>
>> This bug is a result of bad merge:
>> base:
>>          out.stderrShouldBeEmpty();
>>
>> fix for JDK-8242009:
>> -        out.stderrShouldBeEmpty();
>> +        out.stderrShouldBeEmptyIgnoreVMWarnings();
>>
>> fix for JDK-8235211:
>> -        out.stderrShouldBeEmpty();
>> +        out.shouldHaveExitValue(0)
>> +                .stderrShouldBeEmpty();
> 
> Merge fix looks good but see below ...
> 
> Nit: for this style of chained call you should align the dots (as we do 
> for stream operations):
> 
>     out.shouldHaveExitValue(0)
>        .stderrShouldBeEmptyIgnoreVMWarnings();

Will fix the indent before push.

> 
>> Test run is in progress.
> 
> ... I'm puzzled by the failure mode as I see:
> 
> ----------System.err:(23/1191)----------
> [jcmd] java version "15-ea" 2020-09-15
>   stdout: [Java HotSpot(TM) 64-Bit Server VM version 15-ea+23-1102
> JDK 15.0.0
> ];
>   stderr: [Java(TM) SE Runtime Environment (fastdebug build 15-ea+23-1102)
> Java HotSpot(TM) 64-Bit Server VM (fastdebug build 15-ea+23-1102, mixed 
> mode)
> ]
> and these are not VM warnings.

Yes, I also was surprised seeing this version-related output in stderr.

As far as I understand, this was introduced by fix for
https://bugs.openjdk.java.net/browse/JDK-8242009
It excludes JAVA_WARNINGS_AND_VERSION_PATTERN which is

private static final String JVM_WARNING_MSG = ".* VM warning:.*";
private static final String JAVA_VERSION_MSG = "^java version 
.*|^Java\\(TM\\).*|^Java HotSpot\\(TM\\).*|" +
             "^openjdk version .*|^OpenJDK .*";
private static final String JAVA_WARNINGS_AND_VERSION = JVM_WARNING_MSG 
+ "|" + JAVA_VERSION_MSG;
private static final Pattern JAVA_WARNINGS_AND_VERSION_PATTERN =
             Pattern.compile(JAVA_WARNINGS_AND_VERSION.replaceAll("\\|", 
"\\\\R|") + "\\R",
                     Pattern.MULTILINE);

--alex

> 
> Thanks,
> David
> 
> 
>> --alex


More information about the serviceability-dev mailing list