RFR: 8314094: java/lang/ProcessHandle/InfoTest.java fails on Windows when run as user with Administrator privileges

Roger Riggs rriggs at openjdk.org
Thu Aug 31 15:11:02 UTC 2023


On Thu, 31 Aug 2023 06:56:06 GMT, Arno Zeller <azeller at openjdk.org> wrote:

>> The system environment has the domainname and the username.
>> 
>> String username = (System.getenv("USERDOMAIN") + "/" + System.getenv("USERNAME")).toLowerCase(Locale.ROOT);
>
> 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.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15222#discussion_r1311783371


More information about the core-libs-dev mailing list