File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
hotspot/jtreg/containers/docker Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 4343import java .io .IOException ;
4444import java .io .InputStreamReader ;
4545import java .nio .file .Paths ;
46- import java .util .Arrays ;
4746import java .util .ArrayList ;
47+ import java .util .Arrays ;
4848import java .util .Collections ;
4949import java .util .EnumSet ;
5050import java .util .List ;
5353import java .util .function .Consumer ;
5454import java .util .regex .Pattern ;
5555import java .util .stream .Collectors ;
56+
5657import jdk .test .lib .Container ;
58+ import jdk .test .lib .Platform ;
5759import jdk .test .lib .Utils ;
5860import jdk .test .lib .containers .docker .Common ;
5961import 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
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments