From 3cdcc8bd4dd77a27454c9fd7a489884e3cea5ffe Mon Sep 17 00:00:00 2001 From: sla Date: Thu, 10 Oct 2013 09:38:06 +0200 Subject: [PATCH] 8025427: jstat tests fails on 32-bit platforms Reviewed-by: ehelin, dsamersoff, dholmes, sspitsyn --- src/share/classes/sun/tools/jstat/RowClosure.java | 3 +++ test/ProblemList.txt | 12 ------------ test/sun/tools/jstat/gcCauseOutput1.awk | 2 +- test/sun/tools/jstat/lineCounts1.awk | 2 +- test/sun/tools/jstat/lineCounts2.awk | 2 +- test/sun/tools/jstat/lineCounts3.awk | 2 +- test/sun/tools/jstat/lineCounts4.awk | 2 +- test/sun/tools/jstat/timeStamp1.awk | 2 +- test/sun/tools/jstatd/jstatGcutilOutput1.awk | 2 +- 9 files changed, 10 insertions(+), 19 deletions(-) diff --git a/src/share/classes/sun/tools/jstat/RowClosure.java b/src/share/classes/sun/tools/jstat/RowClosure.java index b48fcf0d8..00b722085 100644 --- a/src/share/classes/sun/tools/jstat/RowClosure.java +++ b/src/share/classes/sun/tools/jstat/RowClosure.java @@ -62,6 +62,9 @@ public class RowClosure implements Closure { double d = ((Number)value).doubleValue(); double scaledValue = c.getScale().scale(d); DecimalFormat df = new DecimalFormat(c.getFormat()); + DecimalFormatSymbols syms = df.getDecimalFormatSymbols(); + syms.setNaN("-"); + df.setDecimalFormatSymbols(syms); s = df.format(scaledValue); } diff --git a/test/ProblemList.txt b/test/ProblemList.txt index 484fbc700..441fe6732 100644 --- a/test/ProblemList.txt +++ b/test/ProblemList.txt @@ -322,18 +322,6 @@ tools/pack200/Pack200Test.java solaris-all, mac # 8007410 tools/launcher/FXLauncherTest.java linux-all -# 8025427 -sun/tools/jstat/jstatLineCounts1.sh generic-all -sun/tools/jstat/jstatLineCounts2.sh generic-all -sun/tools/jstat/jstatLineCounts3.sh generic-all -sun/tools/jstat/jstatTimeStamp1.sh generic-all -sun/tools/jstat/jstatGcCauseOutput1.sh generic-all -sun/tools/jstat/jstatLineCounts4.sh generic-all -sun/tools/jstatd/jstatdDefaults.sh generic-all -sun/tools/jstatd/jstatdExternalRegistry.sh generic-all -sun/tools/jstatd/jstatdPort.sh generic-all -sun/tools/jstatd/jstatdServerName.sh generic-all - ############################################################################ # jdk_jdi diff --git a/test/sun/tools/jstat/gcCauseOutput1.awk b/test/sun/tools/jstat/gcCauseOutput1.awk index f6127e415..3041291ac 100644 --- a/test/sun/tools/jstat/gcCauseOutput1.awk +++ b/test/sun/tools/jstat/gcCauseOutput1.awk @@ -23,7 +23,7 @@ BEGIN { # or more letters and spaces. It also provides for the ".", "(", and ")" # characters to allow for the string "System.gc()". # -/^[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[a-zA-Z]+[a-zA-Z \.\(\)]*[ ]*[a-zA-Z]+[a-zA-Z \.\(\)]*$/ { +/^[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*([0-9]+\.[0-9]+)|-[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[a-zA-Z]+[a-zA-Z \.\(\)]*[ ]*[a-zA-Z]+[a-zA-Z \.\(\)]*$/ { datalines++; } diff --git a/test/sun/tools/jstat/lineCounts1.awk b/test/sun/tools/jstat/lineCounts1.awk index b5cb1cdd0..dd6d5f8fb 100644 --- a/test/sun/tools/jstat/lineCounts1.awk +++ b/test/sun/tools/jstat/lineCounts1.awk @@ -18,7 +18,7 @@ BEGIN { headerlines++; } -/^[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+$/ { +/^[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*([0-9]+\.[0-9]+)|-[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+$/ { datalines++; } diff --git a/test/sun/tools/jstat/lineCounts2.awk b/test/sun/tools/jstat/lineCounts2.awk index 1309d04f8..adecd0a05 100644 --- a/test/sun/tools/jstat/lineCounts2.awk +++ b/test/sun/tools/jstat/lineCounts2.awk @@ -14,7 +14,7 @@ BEGIN { headerlines++; } -/^[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+$/ { +/^[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*([0-9]+\.[0-9]+)|-[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+$/ { datalines++; } diff --git a/test/sun/tools/jstat/lineCounts3.awk b/test/sun/tools/jstat/lineCounts3.awk index 2d8d4bf13..24788b429 100644 --- a/test/sun/tools/jstat/lineCounts3.awk +++ b/test/sun/tools/jstat/lineCounts3.awk @@ -23,7 +23,7 @@ BEGIN { headerlines++; } -/^[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+$/ { +/^[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*([0-9]+\.[0-9]+)|-[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+$/ { datalines++; } diff --git a/test/sun/tools/jstat/lineCounts4.awk b/test/sun/tools/jstat/lineCounts4.awk index 5ec4ac7e9..c4ea918fd 100644 --- a/test/sun/tools/jstat/lineCounts4.awk +++ b/test/sun/tools/jstat/lineCounts4.awk @@ -26,7 +26,7 @@ BEGIN { headerlines++; } -/^[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+$/ { +/^[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*([0-9]+\.[0-9]+)|-[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+$/ { if (headerlines == 2) { datalines2++; } diff --git a/test/sun/tools/jstat/timeStamp1.awk b/test/sun/tools/jstat/timeStamp1.awk index 1d90a18f7..cce381ce4 100644 --- a/test/sun/tools/jstat/timeStamp1.awk +++ b/test/sun/tools/jstat/timeStamp1.awk @@ -14,7 +14,7 @@ BEGIN { headerlines++; } -/^[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+$/ { +/^[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*([0-9]+\.[0-9]+)|-[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+$/ { datalines++; } diff --git a/test/sun/tools/jstatd/jstatGcutilOutput1.awk b/test/sun/tools/jstatd/jstatGcutilOutput1.awk index 76b355e67..9456f1909 100644 --- a/test/sun/tools/jstatd/jstatGcutilOutput1.awk +++ b/test/sun/tools/jstatd/jstatGcutilOutput1.awk @@ -18,7 +18,7 @@ BEGIN { headerlines++; } -/^[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+$/ { +/^[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*([0-9]+\.[0-9]+)|-[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+$/ { datalines++; } -- GitLab