RFR(S): 8204654: [testbug] Fix pattern matching in jstat tests.
Thomas Stüfe
thomas.stuefe at gmail.com
Thu Jun 14 10:39:23 UTC 2018
Hi Goetz,
test/jdk/sun/jvmstat/testlibrary/utils.sh
consider better comment:
-# The awk scripts parsing the output do not respect any locale
dependent setting.
+# The awk scripts parsing the jstat output expect it to be in en-us locale.
--------------
http://cr.openjdk.java.net/~goetz/wr18/8204654-fixJstatTest/01/test/jdk/sun/tools/jstat/classloadOutput1.awk.udiff.html
I assume
([0-9])|-+
should match a single whole number for column "FindClass", or "-"?
do not think you need grouping here, and the '+' is misplaced. Better:
[0-9]+|-
---
similar here: + misplaced:
- ([0-9]+\.[0-9])|-+
+ ([0-9]+\.[0-9]+)|-
Also, it would be helpful if you could print column name or at least
number atop the matching sequences, in a comment, that makes the
reading easer.
But this is hard to read! Any chance of splitting this expression into
sub expressions?
Rest seems fine.
..Thomas
On Mon, Jun 11, 2018 at 3:14 PM, Lindenmaier, Goetz
<goetz.lindenmaier at sap.com> wrote:
> Hi,
>
> please review this test fix:
> http://cr.openjdk.java.net/~goetz/wr18/8204654-fixJstatTest/01
>
> gcCauseOutput1.awk:
> The pattern scans 11 numbers, while the output contains 13. Also, more '-' are possible then checked.
>
> The other awk scripts need to check more patterns where '-' can appear.
>
> We have a machine with user.country=de where jstat prints ',' instead of '.' in numbers. Explicitly
> start with user.country=en as already done for user.language=en.
>
> I also refactored the common flags to a variable in utils.sh ... so there won't be the need
> to edit all these files once more :)
>
> Best regards,
> Goetz
>
> (Sorry for the second mail, first missed the bug text ...)
More information about the serviceability-dev
mailing list