[PATCH] Enable jtreg tests to run on WSL (Windows Subsystem for Linux)
Jonathan Gibbons
jonathan.gibbons at oracle.com
Wed Jan 9 21:34:38 UTC 2019
I have pushed a version of this patch to the jtreg repo.
I did some renaming: I've simplified the command-line option to just
`-wsl`, improved the command line help, and internally, used more
verbose names like "useWindowsSubsystemForLinux" instead of the more
cryptic "wslWindowsTarget".
It may still be possible to refine the use of the option, so that it may
not be necessary to specify the option if jtreg can determine whether to
use Cygwin or WSL. But this can be done as a followup changeset.
We'll do some additional testing of this feature before promoting a new
version of jtreg for more widespread use.
-- Jon
On 01/08/2019 01:21 PM, Jonathan Gibbons wrote:
> Andrew,
>
> One more enhancement, in webrev.03. The new command line option is
> rejected if jtreg is not running on Windows.
>
> -- Jon
>
>
> On 01/08/2019 10:30 AM, Andrew Luo wrote:
>>
>> Hi Jon,
>>
>> Thanks, looks good to me.
>>
>> I guess that a path is a subset of path list, although I’m not sure
>> why Microsoft gives them separate suffixes…
>>
>> 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.
>>
>> I didn’t see any blank env elements, the .isEmpty() check must have
>> been by habit.
>>
>> I did test your changes on my WSL environment and everything
>> compiles/works.
>>
>> Thanks,
>>
>> -Andrew
>>
>> *From:*Jonathan Gibbons <jonathan.gibbons at oracle.com>
>> *Sent:* Monday, January 7, 2019 4:26 PM
>> *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)
>>
>> Andrew,
>>
>> I've put out an updated webrev, that is somewhat simpler than your
>> version, although it should be functionally equivalent. In
>> particular, it has a much smaller impact on the non-WSL code.
>>
>> Some questions:
>>
>> * Why is it important to distinguish "path" and "path list"? Isn't a
>> "path" just a "path list" with a single entry? In other words, can
>> we always use suffix `/l` for a list of one-or-more paths?
>> * Is it important to ignore case when checking for "PATH"? Would the
>> Windows environment ever contain an env variable "path"?
>> * The env should never have entries in it with "blank" names; was it
>> just defensive programming on your part to check for blank names
>> and ignore them, or did you see them in practice?
>> * I'm not set up here right now to be able to test with WSL; can you
>> try building and testing this version of jtreg?
>>
>> -- Jon
>>
>> Webrev: http://cr.openjdk.java.net/~jjg/7902357/webrev.02/
>> <http://cr.openjdk.java.net/%7Ejjg/7902357/webrev.02/>
>>
>
More information about the code-tools-dev
mailing list