changeset 6298:02d0c44df163

Merge
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 28 Aug 2012 12:22:19 +0200
parents 3e48cbd4b0aa (diff) 471b9eb7419d (current diff)
children 1ed726759f65
files
diffstat 2 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/hotpath/HP_series.java	Mon Aug 27 18:02:22 2012 +0200
+++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/hotpath/HP_series.java	Tue Aug 28 12:22:19 2012 +0200
@@ -98,10 +98,15 @@
         return (0.0);
     }
 
-    // TODO (ds) disabled as JDK 7u6 + Graal breaks this for some as yet unknown reason)
-    //@Test
+    /* This test is sensible to the implementation of Math.pow, cos and sin.
+     * Since for these functions, the specs says "The computed result must be within 1 ulp of the exact result",
+     * different implementation may return different results.
+     * The 11 ulp delta allowed for test(100) tries to account for that but is not guaranteed to work forever.
+     */
+    @Test
     public void run0() throws Throwable {
-        Assert.assertEquals(0.6248571921291398d, test(100), 0);
+        double expected = 0.6248571921291398d;
+        Assert.assertEquals(expected, test(100), 11 * Math.ulp(expected));
     }
 
 }
--- a/mx/sanitycheck.py	Mon Aug 27 18:02:22 2012 +0200
+++ b/mx/sanitycheck.py	Tue Aug 28 12:22:19 2012 +0200
@@ -115,10 +115,10 @@
     if specjvm2008 is None or not exists(join(specjvm2008, 'SPECjvm2008.jar')):
         mx.abort('Please set the SPECJVM2008 environment variable to a SPECjvm2008 directory')
     
-    score = re.compile(r"^(Score on|Noncompliant) (?P<benchmark>[a-zA-Z0-9\._]+)( result)?: (?P<score>[0-9]+(,|\.)[0-9]+)( SPECjvm2008 Base)? ops/m$")
+    score = re.compile(r"^(Score on|Noncompliant) (?P<benchmark>[a-zA-Z0-9\._]+)( result)?: (?P<score>[0-9]+((,|\.)[0-9]+)?)( SPECjvm2008 Base)? ops/m$")
     error = re.compile(r"^Errors in benchmark: ")
     # The ' ops/m' at the end of the success string is important : it's how you can tell valid and invalid runs apart
-    success = re.compile(r"^(Noncompliant c|C)omposite result: [0-9]+(,|\.)[0-9]+( SPECjvm2008 (Base|Peak))? ops/m$")
+    success = re.compile(r"^(Noncompliant c|C)omposite result: [0-9]+((,|\.)[0-9]+)?( SPECjvm2008 (Base|Peak))? ops/m$")
     matcher = Matcher(score, {'const:group' : "const:SPECjvm2008", 'const:name' : 'benchmark', 'const:score' : 'score'}, startNewLine=True)
     
     opts = []