summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2017-09-19 08:10:00 -0700
committer Andreas Gampe <agampe@google.com> 2017-09-19 09:06:05 -0700
commitaa3317eb551064da69c84e1a1f053278ba562339 (patch)
treecbfe8f26dafadf085d592b2c79b86bb09ede09fe
parent216ba99075c650822585b92c37161aabd45f74a0 (diff)
ART: Add warmup to 063-process-manager
Experimental CL to see if it fixes a guessed race for static initialization of internal helper classes. Bug: 2310700 Test: art/test/testrunner/testrunner.py -b --host -t 063 Change-Id: I4e1706771aae9ba21494b754a50277d2c7df9ec1
-rw-r--r--test/063-process-manager/src/Main.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/063-process-manager/src/Main.java b/test/063-process-manager/src/Main.java
index 6cb594959e..1005b77107 100644
--- a/test/063-process-manager/src/Main.java
+++ b/test/063-process-manager/src/Main.java
@@ -3,6 +3,16 @@ import java.util.Map;
public class Main {
static public void main(String[] args) throws Exception {
checkManager();
+
+ // Warm up the reaper so that there are no issues with scheduling because of static
+ // initialization.
+ {
+ ProcessBuilder pb = new ProcessBuilder("sleep", "0");
+ Process proc = pb.start();
+ proc.waitFor();
+ Thread.sleep(500); // Consider checking for (and waiting on) the reaper state here.
+ }
+
for (int i = 1; i <= 2; i++) {
System.out.println("\nspawning child #" + i);
child();