8150757: [TESTBUG] compiler/ciReplay/TestVM.sh and compiler/ciReplay/TestVM_no_comp_level.sh fail when no compilations are happening
authoriignatyev
Wed, 23 Jan 2019 18:45:34 -0800
changeset 53496 7ba8ce465804
parent 53495 b693b0d2053d
child 53497 2134c512a525
8150757: [TESTBUG] compiler/ciReplay/TestVM.sh and compiler/ciReplay/TestVM_no_comp_level.sh fail when no compilations are happening Reviewed-by: kvn
test/hotspot/jtreg/compiler/ciReplay/CiReplayBase.java
--- a/test/hotspot/jtreg/compiler/ciReplay/CiReplayBase.java	Wed Jan 23 16:57:01 2019 -0800
+++ b/test/hotspot/jtreg/compiler/ciReplay/CiReplayBase.java	Wed Jan 23 18:45:34 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2019, 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
@@ -71,6 +71,11 @@
         "-XX:+ReplayCompiles", REPLAY_FILE_OPTION};
     protected final Optional<Boolean> runServer;
 
+    public static class EmptyMain {
+        public static void main(String[] args) {
+        }
+    }
+
     static {
         try {
             CLIENT_VM_AVAILABLE = ProcessTools.executeTestJvm(CLIENT_VM_OPTION, VERSION_OPTION)
@@ -135,7 +140,7 @@
             options.addAll(Arrays.asList(REPLAY_GENERATION_OPTIONS));
             options.addAll(Arrays.asList(vmopts));
             options.add(needCoreDump ? ENABLE_COREDUMP_ON_CRASH : DISABLE_COREDUMP_ON_CRASH);
-            options.add(VERSION_OPTION);
+            options.add(EmptyMain.class.getName());
             if (needCoreDump) {
                 crashOut = ProcessTools.executeProcess(getTestJavaCommandlineWithPrefix(
                         RUN_SHELL_NO_LIMIT, options.toArray(new String[0])));