[PATCH] Enable jtreg tests to run on WSL (Windows Subsystem for Linux)

Jonathan Gibbons jonathan.gibbons at oracle.com
Mon Jan 7 15:53:47 UTC 2019


Andrew,

I've been generally following the progress for supporting WSL, but now 
that I need to get more involved, (i.e. reviewing jtreg updates) can you 
point me at any reasonable general introductory material for WSL?

-- Jon

On 1/6/19 11:29 AM, Andrew Luo wrote:
> We recently added support for building OpenJDK on WSL (targeting Windows; targeting Linux always worked).  However, running tests on WSL did not work, and we determined that some changes would be needed to jtreg to support this use case.  In particular, jtreg needs to know if it is running on WSL targeting Windows or WSL targeting Linux (when targeting Linux, no changes are needed as it is the same as any other Linux system, but when targeting Windows jtreg needs to run shell scripts in a special manner - in particular, calling "wsl.exe sh" instead of just "sh" since it's a Windows boot JDK, as well as translating environment variables using WSLENV...)
>
> I've attached my patch with my proposed changes.  I welcome any thoughts/feedback.
>
> (See https://bugs.openjdk.java.net/browse/JDK-8215445 for more details about supporting WSL for building OpenJDK)
>
> Thanks,
>
> -Andrew


More information about the code-tools-dev mailing list