RFR(S): 6963102: sun/tools/jstatd/jstatdDefaults.sh fails
Rickard Bäckman
rickard.backman at oracle.com
Wed Sep 5 05:20:39 PDT 2012
Looks good.
/R
On Sep 5, 2012, at 1:51 PM, Staffan Larsen wrote:
> Please review the patch below to make the jstatd tests a little bit more resilient to different outputs of the jps command.
>
> The jps command can output a couple of different error messages when information is missing about the target process. See the errorString variable in http://hg.openjdk.java.net/jdk8/tl/jdk/file/7dda50fe8e1c/src/share/classes/sun/tools/jps/Jps.java
>
> All of these are preceded by "-- " which makes it easy to match these in the test. We currently have a matcher for "-- process information unavailable". This change makes that rule more general.
>
> Thanks,
> /Staffan
>
> diff --git a/test/sun/tools/jstatd/jpsOutput1.awk b/test/sun/tools/jstatd/jpsOutput1.awk
> --- a/test/sun/tools/jstatd/jpsOutput1.awk
> +++ b/test/sun/tools/jstatd/jpsOutput1.awk
> @@ -7,7 +7,7 @@
> matched++;
> }
>
> -/^[0-9]+ -- process information unavailable$/ {
> +/^[0-9]+ -- .*$/ {
> matched++;
> }
More information about the serviceability-dev
mailing list