Skip to content
Permalink
Browse files
8256417: Exclude TestJFRWithJMX test from running with PodMan
Reviewed-by: iignatyev
  • Loading branch information
Mikhailo Seledtsov committed Feb 26, 2021
1 parent c9e9189 commit 07061fc73a2349237b94743b6425557626116fbf
Showing with 14 additions and 3 deletions.
  1. +1 −2 test/hotspot/jtreg/ProblemList.txt
  2. +13 −1 test/hotspot/jtreg/containers/docker/TestJFRWithJMX.java
@@ -1,5 +1,5 @@
#
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# 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
runtime/cds/DeterministicDump.java 8253495 generic-all
runtime/jni/terminatedThread/TestTerminatedThread.java 8219652 aix-ppc64
runtime/ReservedStack/ReservedStackTest.java 8231031 generic-all
containers/docker/TestJFRWithJMX.java 8256417 linux-5.4.17-2011.5.3.el8uek.x86_64

#############################################################################

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -54,6 +54,7 @@

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

if (isPodman() & !Platform.isRoot()) {
throw new SkippedException("test cannot be run under rootless podman configuration");
}

DockerTestUtils.buildJdkDockerImage(imageName, "Dockerfile-BasicTest", "jdk-docker");

try {
@@ -215,4 +220,11 @@ static File transferRecording(FlightRecorderMXBean bean, long streamId) throws E
}
}
}

static boolean isPodman() {
String[] parts = Container.ENGINE_COMMAND
.toLowerCase()
.split(File.pathSeparator);
return "podman".equals(parts[parts.length - 1]);
}
}

1 comment on commit 07061fc

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 07061fc Feb 26, 2021

Please sign in to comment.