Supporting WSL in shell tests; was Re: [PATCH] Fix for EXE_SUFFIX being set for WSL having no effect

Andrew Luo andrewluotechnologies at outlook.com
Wed Jan 23 22:38:11 UTC 2019


On WSL, “uname -s" will print Linux, however one can distinguish between WSL and “true” Linux by “uname -r" containing Microsoft.  However, in WSL we can build both a WSL Linux target, or a WSL Windows target, which means we have to either check the JDK-under-test (check if it is a Windows or Linux JDK) or have some environment variable to indicate such.

Thanks,

-Andrew

From: Alexandre (Shura) Iline <alexandre.iline at oracle.com>
Sent: Wednesday, January 23, 2019 2:16 PM
To: Jonathan Gibbons <jonathan.gibbons at oracle.com>
Cc: Andrew Luo <andrewluotechnologies at outlook.com>; quality-discuss at openjdk.java.net
Subject: Re: Supporting WSL in shell tests; was Re: [PATCH] Fix for EXE_SUFFIX being set for WSL having no effect

On my MacBook:
$ uname -s
Darwin


On my ubuntu laptop:
$ uname -s
Linux


Shura


On Jan 23, 2019, at 1:49 PM, Jonathan Gibbons <jonathan.gibbons at oracle.com<mailto:jonathan.gibbons at oracle.com>> wrote:


On 1/23/19 1:12 PM, Alexandre (Shura) Iline wrote:

I think it is only natural to expect folks to debug shell tests directly. If we accept this assumption, then, is there any reasonable alternative to “uname"? There is a “systeminfo” tool on windows, not sure if it helps. We really need to know what “uname -s” outputs, though, as it might still work.

It would help if we could crowd-source a table showing the value on different systems.

-- jon

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/quality-discuss/attachments/20190123/88965b31/attachment-0001.html>


More information about the quality-discuss mailing list