On Wed, 4 May 2022 03:01:19 GMT, Ichiroh Takiguchi <itakigu...@openjdk.org> wrote:
>> Do we need to verify the intermediate byte encoding? Could we simply compare >> the text given to environ.put() in Start process and System.getenv() in >> Verify process match? > > Hello @naotoj . > I think if 2nd process' encoder (like UTF-8) and 3rd process' decoder are > same encoding, System.getenv() returns expected data. > Actually the testcase checks 3 parts on Verify process: > 1. Expected environment variable is defined or not (it uses System.getenv()) > 2. Expected argument is received or not > 3. Expected environment variable is encoded by proper encoding > > When I ran this testcase with jdk18.0.1, I got following result: > > Unexpected argument was received: \u6F22\u5B57<->\u7FB2\u221A\uFFFD > Unexpected environment variables: > \xE6\xBC\xA2\xE5\xAD\x97\x3D\xE6\xBC\xA2\xE5\xAD\x97 > > It means 1st test was passed, 2nd and 3rd test were failed. > I don't think environment variable issue can be seen without 3rd test. > Please let me know if you find out another way. This part of the test is very brittle; I'm pretty sure it will fail on AIX that adds its own environment variables. It should not fail if it finds the two entries it expects. It should ignore other entries. I don't see what value it has over checking the entries from System.getEnv(), please elaborate. ------------- PR: https://git.openjdk.java.net/jdk/pull/8378