RFR: 8361894: sun/security/krb5/config/native/TestDynamicStore.java ensure that the test is run with sudo [v3]

Matthew Donovan mdonovan at openjdk.org
Mon Jul 21 11:55:15 UTC 2025


On Fri, 18 Jul 2025 20:51:36 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
>
> Mikhail Yankelevich has updated the pull request incrementally with one additional commit since the last revision:
> 
>   changing alert to JOptionPane

test/jdk/sun/security/krb5/config/native/TestDynamicStore.java line 63:

> 61:         // Show a popup to remind to run this test as sudo user
> 62:         // this will only trigger if sudo (root) user is not detected
> 63:         if ("root".equals(System.getProperty("user.name"))) {

I think you're missing a `!` here.

test/jdk/sun/security/krb5/config/native/TestDynamicStore.java line 66:

> 64: 
> 65:             JOptionPane.showMessageDialog(null, """
> 66:                             This test MUST be run with SUDO user.\s

Instead of saying "sudo user", maybe just say "this test must be run as root" then they can run it with sudo or su or whatever they prefer.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/26293#discussion_r2218961779
PR Review Comment: https://git.openjdk.org/jdk/pull/26293#discussion_r2218963613


More information about the security-dev mailing list