提交 0c57d941 编写于 作者: A anoll

8068440: Test6857159.java times out

Summary: Replace shell script with Java-only code
Reviewed-by: kvn, iignatyev
上级 1b55810b
/* /*
* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -26,15 +26,24 @@ ...@@ -26,15 +26,24 @@
* @test * @test
* @bug 6857159 * @bug 6857159
* @summary local schedule failed with checkcast of Thread.currentThread() * @summary local schedule failed with checkcast of Thread.currentThread()
* * @library /testlibrary
* @run shell Test6857159.sh
*/ */
public class Test6857159 extends Thread { import com.oracle.java.testlibrary.*;
static class ct0 extends Test6857159 {
public void message() { public class Test6857159 {
// System.out.println("message"); public static void main(String[] args) throws Exception {
} ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xbatch", "-XX:+PrintCompilation",
"-XX:CompileOnly=Test$ct.run", "Test");
OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
analyzer.shouldNotContain("COMPILE SKIPPED");
analyzer.shouldContain("Test$ct0::run (16 bytes)");
}
}
class Test extends Thread {
static class ct0 extends Test {
public void message() { }
public void run() { public void run() {
message(); message();
...@@ -43,14 +52,10 @@ public class Test6857159 extends Thread { ...@@ -43,14 +52,10 @@ public class Test6857159 extends Thread {
} }
} }
static class ct1 extends ct0 { static class ct1 extends ct0 {
public void message() { public void message() { }
// System.out.println("message");
}
} }
static class ct2 extends ct0 { static class ct2 extends ct0 {
public void message() { public void message() { }
// System.out.println("message");
}
} }
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册