RFR: 8302888: containers/docker/TestJcmd.java fails when run as root under podman [v2]
David Holmes
dholmes at openjdk.org
Wed Feb 22 00:12:26 UTC 2023
On Tue, 21 Feb 2023 09:41:55 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:
>> Could I please get a review of this trivial test fix? When `podman` is being used and the test is being run as root, which some of the other container tests require, the test fails because of the not-supported `--userns=keep-id` option:
>>
>>
>> # id -u
>> 0
>> # podman run --rm -ti --userns=keep-id fedora:37
>> Error: keep-id is only supported in rootless mode
>>
>>
>> I propose to only add it when non-root.
>>
>> Testing:
>>
>> - [x] Ran the test with podman as root/regular user. Both passed. It failed before when run as root.
>
> Severin Gehwolf has updated the pull request incrementally with one additional commit since the last revision:
>
> Only call getId() in the podman case
Looks good.
Thanks
-------------
Marked as reviewed by dholmes (Reviewer).
PR: https://git.openjdk.org/jdk/pull/12673
More information about the hotspot-runtime-dev
mailing list