New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8277370: configure script cannot distinguish WSL version #6446
Conversation
|
Webrevs
|
make/autoconf/basic_windows.m4
Outdated
if test -d "/run/WSL" ; then | ||
# distinguishing between WSL1 and WSL2. | ||
# Check whether "Hyper-V" appears in /proc/interrupts because WSL2 runs on Hyper-V. | ||
grep Hyper-V /proc/interrupts > /dev/null 2>&1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use the -q switch to grep instead of piping to /dev/null.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your review! I updated to add -q
and to use $GREP
instead of grep
.
@YaSuenag This change now passes all automated pre-integration checks. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 28 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.
|
/integrate |
Going to push as commit 2d4af22.
Your commit was automatically rebased without conflicts. |
configure script distinguish WSL version if it is run on WSL. It is assumed WSL 2 if
/run/WSL
exists.However it exists in spite of WSL 1 on Windows 11 at least. We need to check it with other method.
The method to distinguish WSL version has been discussed on microsoft/WSL#4555 , however they do not seem to get consensus about it.
/run/WSL
was introduced in it, but I thinkHyper-V
in/proc/interrupt
is more robustness because WSL 2 is run on Hyper-V. https://docs.microsoft.com/en-us/windows/wsl/faq#does-wsl-2-use-hyper-v--will-it-be-available-on-windows-10-home-Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6446/head:pull/6446
$ git checkout pull/6446
Update a local copy of the PR:
$ git checkout pull/6446
$ git pull https://git.openjdk.java.net/jdk pull/6446/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 6446
View PR using the GUI difftool:
$ git pr show -t 6446
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6446.diff