[PATCH] Enable jtreg tests to run on WSL (Windows Subsystem for Linux)
Andrew Luo
andrewluotechnologies at outlook.com
Tue Jan 8 22:17:39 UTC 2019
When running on WSL targeting Windows, the boot JDK is a Windows JDK, so there is only one Path. However, the env map could have PATH, Path, path, etc. from the environment of the specific test case or from the native library path, etc (I believe, although I’m not sure – I’m not that familiar with jtreg but I assumed it would be possible). We don’t need to add any form of Path to WSLENV; it is auto-translated from Windows -> WSL by appending. However, if you add Path to WSLENV, then it will be translated both ways (Windows -> WSL and WSL -> Windows). Translating Path from WSL -> Windows is almost never what you want to do, since it would overwrite (rather than append to) the Windows Path (which includes things you need such as System32, etc.)
Thanks,
-Andrew
From: Jonathan Gibbons <jonathan.gibbons at oracle.com>
Sent: Tuesday, January 8, 2019 11:21 AM
To: Andrew Luo <andrewluotechnologies at outlook.com>; code-tools-dev at openjdk.java.net
Subject: Re: [PATCH] Enable jtreg tests to run on WSL (Windows Subsystem for Linux)
On 1/8/19 10:30 AM, Andrew Luo wrote:
In Windows, technically the correct case is “Path”. However often times people use PATH (or path), and Linux environment variables are case sensitive, while Windows environment variables are not, so if someone set Linux PATH, path, and Path, we don’t want any of them to be translated to Windows, as I believe any of them would override the Windows path.
OK, thanks for the explanation. Here, we're going from Windows binary (the JDK running jtreg) to WSL, and while jtreg is typically invoked by script (implying WSL or Cygwin) it is not required to be so, so I guess we could theoretically see any of the variants of "path", "Path", "PATH" etc, Is that right?
-- Jon
More information about the code-tools-dev
mailing list