RFR(XS): 8066106: sun/tools/jps/TestJpsClass.java failed to remove stale attach pid file

Yekaterina Kantserova yekaterina.kantserova at oracle.com
Fri Nov 28 14:51:57 UTC 2014


Hi Jaroslav,

1. Thank you for the catch!

2. Right, the test inspects jps output buffer (stdout and stderr) and 
expects the only jps related output appears there. But stderr may 
contain VM warnings.

In description even "Exception in thread "main" 
java.lang.RuntimeException: The line 'Java HotSpot(TM) Server VM 
warning: failed to remove stale attach pid file at /tmp/.java_pid13932' 
does not match pattern '^\\d+\\s+.*': expected true, was false" is 
mentioned which is the true cause of the failure. The other one is the 
secondary failure.

You can find the new webrev here: 
http://cr.openjdk.java.net/~ykantser/8066106/webrev.01/

Thanks,
Katja



On 11/28/2014 02:40 PM, Jaroslav Bachorik wrote:
> Hi Katja,
>
> test/sun/tools/jps/JpsHelper.java
> typo @ L183 - "[E|e]xeption" -> "[E|e]xception"
>
> Just to be sure: the "java.lang.RuntimeException: Expected to get exit 
> value of [0]" exception mentioned in the issue description is actually 
> caused by JpsBase failing because of the stale pid file error message 
> in the jps stderr, right?
>
> -JB-
>
>
> On 11/28/2014 10:47 AM, Yekaterina Kantserova wrote:
>> Hi,
>>
>> Could I please have a review of this fix.
>>
>> Since VM warnings go to stderr the suggested fix is to check only stdout
>> for expected output and ignore warnings in stderr.
>>
>> bug: https://bugs.openjdk.java.net/browse/JDK-8066106
>> webrev: http://cr.openjdk.java.net/~ykantser/8066106/webrev.00/
>>
>> The tests have been run and passed on all basic platforms.
>>
>> Thanks,
>> Katj
>



More information about the serviceability-dev mailing list