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
diff --git a/test/063-process-manager/src/Main.java b/test/063-process-manager/src/Main.java
index 6cb5949..1005b77 100644
--- a/test/063-process-manager/src/Main.java
+++ b/test/063-process-manager/src/Main.java
@@ -3,6 +3,16 @@
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();