Skip to content

Commit 5e4b944

Browse files
authored
Merge branch 'master' into goetz_backport_8358077
2 parents d2a9a2d + 6b878c8 commit 5e4b944

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

test/hotspot/jtreg/containers/docker/TestJcmdWithSideCar.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
import java.io.IOException;
4444
import java.io.InputStreamReader;
4545
import java.nio.file.Paths;
46-
import java.util.Arrays;
4746
import java.util.ArrayList;
47+
import java.util.Arrays;
4848
import java.util.Collections;
4949
import java.util.EnumSet;
5050
import java.util.List;
@@ -53,7 +53,9 @@
5353
import java.util.function.Consumer;
5454
import java.util.regex.Pattern;
5555
import java.util.stream.Collectors;
56+
5657
import jdk.test.lib.Container;
58+
import jdk.test.lib.Platform;
5759
import jdk.test.lib.Utils;
5860
import jdk.test.lib.containers.docker.Common;
5961
import jdk.test.lib.containers.docker.DockerRunOptions;
@@ -109,6 +111,11 @@ public static void main(String[] args) throws Exception {
109111
mainContainer.waitForMainMethodStart(TIME_TO_WAIT_FOR_MAIN_METHOD_START);
110112

111113
for (AttachStrategy attachStrategy : EnumSet.allOf(AttachStrategy.class)) {
114+
if (attachStrategy == AttachStrategy.ACCESS_TMP_VIA_PROC_ROOT &&
115+
elevated && !Platform.isRoot()) {
116+
// Elevated attach via proc/root not yet supported.
117+
continue;
118+
}
112119
long mainProcPid = testCase01(attachStrategy, elevated);
113120

114121
// Excluding the test case below until JDK-8228850 is fixed

test/jdk/com/sun/jdi/TwoThreadsTest.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2005, 2025, 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
@@ -55,6 +55,13 @@ public static void main(String[] args) {
5555

5656
t1.start();
5757
t2.start();
58+
// The threads might be virtual and daemon, so wait until completion.
59+
try {
60+
t1.join();
61+
t2.join();
62+
} catch (InterruptedException e) {
63+
throw new RuntimeException(e);
64+
}
5865
}
5966

6067

0 commit comments

Comments
 (0)