Skip to content

Commit

Permalink
8302888: containers/docker/TestJcmd.java fails when run as root under…
Browse files Browse the repository at this point in the history
… podman

Reviewed-by: dholmes
  • Loading branch information
jerboaa committed Feb 22, 2023
1 parent b6ecca1 commit 7f35389
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/hotspot/jtreg/containers/docker/TestJcmd.java
Expand Up @@ -169,7 +169,7 @@ private static Process startObservedContainer() throws Exception {
.addDockerOpts("--name", CONTAINER_NAME)
.addClassOptions("" + TIME_TO_RUN_CONTAINER_PROCESS);

if (IS_PODMAN) {
if (IS_PODMAN && !ROOT_UID.equals(getId("-u"))) {
// map the current userid to the one in the target namespace
opts.addDockerOpts("--userns=keep-id");
}
Expand Down

1 comment on commit 7f35389

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.