8159328: [TESTBUG] ProblematicFrameTest.java throws an exception (due to trying to access Unsafe) but still passes
authorgtriantafill
Tue, 14 Jun 2016 14:31:36 -0400
changeset 39283 cce7f4eedf89
parent 39282 2ee0ade492f9
child 39284 d504ca981ccf
8159328: [TESTBUG] ProblematicFrameTest.java throws an exception (due to trying to access Unsafe) but still passes Reviewed-by: hseigel, ddmitriev
hotspot/test/runtime/ErrorHandling/ProblematicFrameTest.java
--- a/hotspot/test/runtime/ErrorHandling/ProblematicFrameTest.java	Tue Jun 14 14:35:34 2016 -0400
+++ b/hotspot/test/runtime/ErrorHandling/ProblematicFrameTest.java	Tue Jun 14 14:31:36 2016 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -48,8 +48,9 @@
 
     public static void main(String[] args) throws Exception {
         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
-            "-Xmx64m", "-XX:-TransmitErrorReport", "-XX:-CreateCoredumpOnCrash", Crasher.class.getName());
+            "-Xmx64m", "-XX:-TransmitErrorReport", "-XaddExports:java.base/jdk.internal.misc=ALL-UNNAMED", "-XX:-CreateCoredumpOnCrash", Crasher.class.getName());
         OutputAnalyzer output = new OutputAnalyzer(pb.start());
+        output.shouldNotContain("Exception in thread");
         output.shouldNotMatch("error occurred during error reporting \\(printing problematic frame\\)");
     }
 }