author | dsamersoff |
Tue, 23 Jun 2015 12:35:39 +0300 | |
changeset 31460 | c92a5c5863fc |
parent 31454 | 4dba1183dc2f |
permissions | -rw-r--r-- |
28679
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
1 |
/* |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
2 |
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
4 |
* |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
8 |
* |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
13 |
* accompanied this code). |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
14 |
* |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
18 |
* |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
21 |
* questions. |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
22 |
*/ |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
23 |
import java.io.BufferedReader; |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
24 |
import java.io.IOException; |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
25 |
import java.io.InputStreamReader; |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
26 |
import java.math.BigDecimal; |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
27 |
import java.util.ArrayList; |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
28 |
import java.util.Arrays; |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
29 |
import java.util.HashMap; |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
30 |
import java.util.List; |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
31 |
import java.util.Map; |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
32 |
import java.util.logging.Level; |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
33 |
import java.util.logging.Logger; |
31067
483cbf74cf08
8081037: serviceability/sa/ tests time out on Windows
ykantser
parents:
28679
diff
changeset
|
34 |
|
483cbf74cf08
8081037: serviceability/sa/ tests time out on Windows
ykantser
parents:
28679
diff
changeset
|
35 |
import jdk.test.lib.apps.LingeredApp; |
28679
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
36 |
import jdk.testlibrary.JDKToolLauncher; |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
37 |
import jdk.testlibrary.Utils; |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
38 |
|
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
39 |
public class TmtoolTestScenario { |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
40 |
|
31454
4dba1183dc2f
8085813: The targeted processes in sun/tools tests should be launched with -XX:+UsePerfData flag in order to work on embedded platforms
ykantser
parents:
31067
diff
changeset
|
41 |
private final ArrayList<String> toolOutput = new ArrayList<String>(); |
28679
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
42 |
private LingeredApp theApp = null; |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
43 |
private final String toolName; |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
44 |
private final String[] toolArgs; |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
45 |
|
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
46 |
/** |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
47 |
* @param toolName - name of tool to test |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
48 |
* @param toolArgs - tool arguments |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
49 |
* @return the object |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
50 |
*/ |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
51 |
public static TmtoolTestScenario create(String toolName, String... toolArgs) { |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
52 |
return new TmtoolTestScenario(toolName, toolArgs); |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
53 |
} |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
54 |
|
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
55 |
/** |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
56 |
* @return STDOUT of tool |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
57 |
*/ |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
58 |
public List<String> getToolOutput() { |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
59 |
return toolOutput; |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
60 |
} |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
61 |
|
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
62 |
/** |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
63 |
* |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
64 |
* @return STDOUT of test app |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
65 |
*/ |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
66 |
public List<String> getAppOutput() { |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
67 |
return theApp.getAppOutput(); |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
68 |
} |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
69 |
|
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
70 |
/** |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
71 |
* @return Value of the app output with -XX:+PrintFlagsFinal as a map. |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
72 |
*/ |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
73 |
public Map<String, String> parseFlagsFinal() { |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
74 |
List<String> astr = theApp.getAppOutput(); |
31454
4dba1183dc2f
8085813: The targeted processes in sun/tools tests should be launched with -XX:+UsePerfData flag in order to work on embedded platforms
ykantser
parents:
31067
diff
changeset
|
75 |
Map<String, String> vmMap = new HashMap<String, String>(); |
28679
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
76 |
|
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
77 |
for (String line : astr) { |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
78 |
String[] lv = line.trim().split("\\s+"); |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
79 |
try { |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
80 |
vmMap.put(lv[1], lv[3]); |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
81 |
} catch (ArrayIndexOutOfBoundsException ex) { |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
82 |
// ignore mailformed lines |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
83 |
} |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
84 |
} |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
85 |
return vmMap; |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
86 |
} |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
87 |
|
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
88 |
/** |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
89 |
* |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
90 |
* @param vmArgs - vm and java arguments to launch test app |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
91 |
* @return exit code of tool |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
92 |
*/ |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
93 |
public int launch(List<String> vmArgs) { |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
94 |
System.out.println("Starting LingeredApp"); |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
95 |
try { |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
96 |
try { |
31454
4dba1183dc2f
8085813: The targeted processes in sun/tools tests should be launched with -XX:+UsePerfData flag in order to work on embedded platforms
ykantser
parents:
31067
diff
changeset
|
97 |
List<String> vmArgsExtended = new ArrayList<String>(); |
4dba1183dc2f
8085813: The targeted processes in sun/tools tests should be launched with -XX:+UsePerfData flag in order to work on embedded platforms
ykantser
parents:
31067
diff
changeset
|
98 |
vmArgsExtended.add("-XX:+UsePerfData"); |
4dba1183dc2f
8085813: The targeted processes in sun/tools tests should be launched with -XX:+UsePerfData flag in order to work on embedded platforms
ykantser
parents:
31067
diff
changeset
|
99 |
vmArgsExtended.addAll(vmArgs); |
4dba1183dc2f
8085813: The targeted processes in sun/tools tests should be launched with -XX:+UsePerfData flag in order to work on embedded platforms
ykantser
parents:
31067
diff
changeset
|
100 |
theApp = LingeredApp.startApp(vmArgsExtended); |
28679
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
101 |
|
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
102 |
System.out.println("Starting " + toolName + " against " + theApp.getPid()); |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
103 |
JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK(toolName); |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
104 |
|
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
105 |
for (String cmd : toolArgs) { |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
106 |
launcher.addToolArg(cmd); |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
107 |
} |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
108 |
launcher.addToolArg(Long.toString(theApp.getPid())); |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
109 |
|
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
110 |
ProcessBuilder processBuilder = new ProcessBuilder(launcher.getCommand()); |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
111 |
processBuilder.redirectError(ProcessBuilder.Redirect.INHERIT); |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
112 |
Process toolProcess = processBuilder.start(); |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
113 |
|
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
114 |
// By default child process output stream redirected to pipe, so we are reading it in foreground. |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
115 |
BufferedReader reader = new BufferedReader(new InputStreamReader(toolProcess.getInputStream())); |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
116 |
|
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
117 |
String line; |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
118 |
while ((line = reader.readLine()) != null) { |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
119 |
toolOutput.add(line.trim()); |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
120 |
} |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
121 |
|
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
122 |
toolProcess.waitFor(); |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
123 |
|
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
124 |
return toolProcess.exitValue(); |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
125 |
} finally { |
31460
c92a5c5863fc
8081576: serviceability/sa tests fail due to LingeredApp process fails to start
dsamersoff
parents:
31454
diff
changeset
|
126 |
LingeredApp.stopApp(theApp); |
28679
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
127 |
} |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
128 |
} catch (IOException | InterruptedException ex) { |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
129 |
throw new RuntimeException("Test ERROR " + ex, ex); |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
130 |
} |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
131 |
} |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
132 |
|
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
133 |
public void launch(String... appArgs) throws IOException { |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
134 |
launch(Arrays.asList(appArgs)); |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
135 |
} |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
136 |
|
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
137 |
private TmtoolTestScenario(String toolName, String[] toolArgs) { |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
138 |
this.toolName = toolName; |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
139 |
this.toolArgs = toolArgs; |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
140 |
} |
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
141 |
|
42f73a4a323b
8042397: tmtools/jmap/heap_config/jmap_heap_config_OldSize fails
dsamersoff
parents:
diff
changeset
|
142 |
} |