Skip to content

Commit 87b08b6

Browse files
committedAug 7, 2023
8307408: Some jdk/sun/tools/jhsdb tests don't pass test JVM args to the debuggee JVM
Reviewed-by: sspitsyn, lmesnik
1 parent 83edffa commit 87b08b6

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed
 

‎test/jdk/ProblemList-zgc.txt

+3
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@
2828
#############################################################################
2929

3030
java/util/concurrent/locks/Lock/OOMEInAQS.java 8309218 generic-all
31+
32+
sun/tools/jhsdb/JShellHeapDumpTest.java 8276539 generic-all
33+
sun/tools/jhsdb/HeapDumpTestWithActiveProcess.java 8276539 generic-all

‎test/jdk/ProblemList.txt

+1
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,7 @@ sun/tools/jstat/jstatLineCounts3.sh 8268211 linux-aa
734734
sun/tools/jstat/jstatLineCounts4.sh 8268211 linux-aarch64
735735

736736
sun/tools/jhsdb/JStackStressTest.java 8276210 linux-aarch64
737+
sun/tools/jhsdb/HeapDumpTestWithActiveProcess.java 8313798 generic-aarch64
737738

738739
############################################################################
739740

‎test/jdk/sun/tools/jhsdb/JShellHeapDumpTest.java

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -150,7 +150,14 @@ public static void launchJshell() throws IOException {
150150
System.out.println("Starting Jshell");
151151
long startTime = System.currentTimeMillis();
152152
try {
153-
ProcessBuilder pb = new ProcessBuilder(JDKToolFinder.getTestJDKTool("jshell"));
153+
JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("jshell");
154+
if (doSleep) {
155+
launcher.addVMArgs(Utils.getTestJavaOpts());
156+
} else {
157+
// Don't allow use of SerialGC. See JDK-8313655.
158+
launcher.addVMArgs(Utils.getFilteredTestJavaOpts("-XX:\\+UseSerialGC"));
159+
}
160+
ProcessBuilder pb = new ProcessBuilder(launcher.getCommand());
154161
jShellProcess = ProcessTools.startProcess("JShell", pb,
155162
s -> { // warm-up predicate
156163
return s.contains("Welcome to JShell");

‎test/jdk/sun/tools/jhsdb/JStackStressTest.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -93,7 +93,9 @@ public static void launchJshell() throws IOException {
9393
System.out.println("Starting Jshell");
9494
long startTime = System.currentTimeMillis();
9595
try {
96-
ProcessBuilder pb = new ProcessBuilder(JDKToolFinder.getTestJDKTool("jshell"));
96+
JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("jshell");
97+
launcher.addVMArgs(Utils.getTestJavaOpts());
98+
ProcessBuilder pb = new ProcessBuilder(launcher.getCommand());
9799
jShellProcess = ProcessTools.startProcess("JShell", pb);
98100
} catch (Exception ex) {
99101
throw new RuntimeException("Test ERROR " + ex, ex);

0 commit comments

Comments
 (0)
Please sign in to comment.