Skip to content

Commit 07061fc

Browse files
author
Mikhailo Seledtsov
committed
8256417: Exclude TestJFRWithJMX test from running with PodMan
Reviewed-by: iignatyev
1 parent c9e9189 commit 07061fc

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

test/hotspot/jtreg/ProblemList.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2016, 2021, 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
@@ -86,7 +86,6 @@ runtime/cds/appcds/jigsaw/modulepath/ModulePathAndCP_JFR.java 8253437 windows-x6
8686
runtime/cds/DeterministicDump.java 8253495 generic-all
8787
runtime/jni/terminatedThread/TestTerminatedThread.java 8219652 aix-ppc64
8888
runtime/ReservedStack/ReservedStackTest.java 8231031 generic-all
89-
containers/docker/TestJFRWithJMX.java 8256417 linux-5.4.17-2011.5.3.el8uek.x86_64
9089

9190
#############################################################################
9291

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2020, 2021, 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
@@ -54,6 +54,7 @@
5454

5555
import jdk.test.lib.Asserts;
5656
import jdk.test.lib.Container;
57+
import jdk.test.lib.Platform;
5758
import jdk.test.lib.Utils;
5859
import jdk.test.lib.containers.docker.Common;
5960
import jdk.test.lib.containers.docker.DockerRunOptions;
@@ -75,6 +76,10 @@ public static void main(String[] args) throws Exception {
7576
throw new SkippedException("Docker is not supported on this host");
7677
}
7778

79+
if (isPodman() & !Platform.isRoot()) {
80+
throw new SkippedException("test cannot be run under rootless podman configuration");
81+
}
82+
7883
DockerTestUtils.buildJdkDockerImage(imageName, "Dockerfile-BasicTest", "jdk-docker");
7984

8085
try {
@@ -215,4 +220,11 @@ static File transferRecording(FlightRecorderMXBean bean, long streamId) throws E
215220
}
216221
}
217222
}
223+
224+
static boolean isPodman() {
225+
String[] parts = Container.ENGINE_COMMAND
226+
.toLowerCase()
227+
.split(File.pathSeparator);
228+
return "podman".equals(parts[parts.length - 1]);
229+
}
218230
}

0 commit comments

Comments
 (0)