RFR: 8314094: java/lang/ProcessHandle/InfoTest.java fails on Windows when run as user with Administrator privileges [v2]
Christoph Langer
clanger at openjdk.org
Fri Sep 1 08:37:39 UTC 2023
On Thu, 31 Aug 2023 15:08:34 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
>> The problem with the environment variables is, that jtreg only passes very few of them down to the testee process - USERDOMAIN and USERNAME are not part of these as far as I know.
>
> ok, more overhead than value in the suggestion.
> If its windows, strip off the domain (before "/") and compare.
> If that doesn't work then just drop the username compare on windows.
After verifying that System.getenv yields empty results for USERDOMAIN and USERNAME, I updated the change to use System.getProperty("user.name") in the Windows Administrators case. Let's see how testing goes.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15222#discussion_r1312738642
More information about the core-libs-dev
mailing list