RFR(S): 6963102: sun/tools/jstatd/jstatdDefaults.sh fails
Staffan Larsen
staffan.larsen at oracle.com
Wed Sep 5 04:51:26 PDT 2012
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++;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20120905/c922a26d/attachment.html
More information about the serviceability-dev
mailing list