RFR: 8361894: sun/security/krb5/config/native/TestDynamicStore.java ensure that the test is run with sudo
Matthew Donovan
mdonovan at openjdk.org
Tue Jul 15 11:37:41 UTC 2025
On Mon, 14 Jul 2025 12:53:55 GMT, Mikhail Yankelevich <myankelevich at openjdk.org> wrote:
> sun/security/krb5/config/native/TestDynamicStore.java is commonly run without sudo, which leads to the access related failure.
> Added a ui popup reminding to run the test with sudo, making instructions clearer and more noticeable
test/jdk/sun/security/krb5/config/native/TestDynamicStore.java line 60:
> 58:
> 59: // Show a popup to remind to run this test as sudo user
> 60: PassFailJFrame.builder()
Using pass/fail in this instance is a little confusing.
Because this test runs on mac can you just check the `user.name` property? A quick, simple test shows that when java is run with `sudo`, the property returns "root". This way, the person running the test isn't constantly faced with a dialog box.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26293#discussion_r2207240717
More information about the security-dev
mailing list