summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew McDermott <andrew.mcdermott@linaro.org>2014-01-28 19:03:38 +0000
committerAndrew McDermott <andrew.mcdermott@linaro.org>2014-01-28 19:03:38 +0000
commit155459ac9f6e575be681fc4df497fc0811650f8f (patch)
treecfbc70f5b8ccff014d6d0da405a166d21d588c5f
parent3240cb5450d57403d90e9fc99bcdebe207282aa2 (diff)
jtreg.jar: updated with patch to handle corrupt summary.txt files
Locally build and applied the following patch: jtreg: handle StringIndexOutOfBoundsException when parsing summary.txt Handle a case where a badly formatted summary.txt causes a StringIndexOutOfBoundsException to be generated. This can happen when the format in the summary.txt file has additional lines of output from a failed test. A real-world example is as follows: runtime/8026365/InvokeSpecialAnonTest.java Passed. Execution successful runtime/8026394/InterfaceObjectTest.java Passed. Execution successful runtime/CDSCompressedKPtrs/CDSCompressedKPtrsError.java Passed. Execution successful runtime/ClassFile/JsrRewriting.java Failed. Execution failed: `main' [...elided...] java.lang.LinkageError java.lang.NoSuchMethodError Main method not found in class OOMCrashClass4000_1 runtime/ClassFile/OomWhileParsingRepeatedJsr.java Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: 'Cannot reserve enough memory' missing from stdout/stderr runtime/ClassUnload/KeepAliveClass.java Passed. Execution successful runtime/ClassUnload/KeepAliveClassLoader.java Passed. Execution successful diff --git a/src/share/classes/com/sun/javatest/diff/Diff.java b/src/share/classes/com/sun/javatest/diff/Diff.java --- a/src/share/classes/com/sun/javatest/diff/Diff.java +++ b/src/share/classes/com/sun/javatest/diff/Diff.java @@ -75,7 +75,9 @@ int[] counts = new int[Status.NUM_STATES]; for (TestResult tr: r) { table.addRow(index, tr.getTestName(), tr); - counts[tr.getStatus().getType()]++; + if (tr.getStatus() != null) { + counts[tr.getStatus().getType()]++; + } } testCounts.add(counts); } diff --git a/src/share/classes/com/sun/javatest/diff/ReportReader.java b/src/share/classes/com/sun/javatest/diff/ReportReader.java --- a/src/share/classes/com/sun/javatest/diff/ReportReader.java +++ b/src/share/classes/com/sun/javatest/diff/ReportReader.java @@ -105,8 +105,8 @@ String line; while ((line = in.readLine()) != null) { int sp = line.indexOf(' '); - String t = line.substring(0, sp); - Status s = Status.parse(line.substring(sp).trim()); + String t = line.substring(0, sp == -1 ? line.length() : sp); + Status s = Status.parse(line.substring(sp == -1 ? line.length() : sp).trim()); TestDescription td = new TestDescription(root, new File(t), Collections.emptyMap()); TestResult tr = new TestResult(td, s); list.add(tr);
-rw-r--r--jtreg/lib/jtreg.jarbin518027 -> 423158 bytes
1 files changed, 0 insertions, 0 deletions
diff --git a/jtreg/lib/jtreg.jar b/jtreg/lib/jtreg.jar
index 1c42f21..4c26d0a 100644
--- a/jtreg/lib/jtreg.jar
+++ b/jtreg/lib/jtreg.jar
Binary files differ