Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

YaSuenag
Copy link
Member

@YaSuenag YaSuenag commented Nov 18, 2021

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 think Hyper-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

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8277370: configure script cannot distinguish WSL version

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

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Nov 18, 2021

👋 Welcome back ysuenaga! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

@openjdk openjdk bot commented Nov 18, 2021

@YaSuenag The following label will be automatically applied to this pull request:

  • build

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the build label Nov 18, 2021
@YaSuenag YaSuenag marked this pull request as ready for review Nov 18, 2021
@openjdk openjdk bot added the rfr label Nov 18, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Nov 18, 2021

Webrevs

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
Copy link
Member

@erikj79 erikj79 Nov 18, 2021

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.

Copy link
Member Author

@YaSuenag YaSuenag Nov 18, 2021

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.

@openjdk
Copy link

@openjdk openjdk bot commented Nov 18, 2021

@YaSuenag This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8277370: configure script cannot distinguish WSL version

Reviewed-by: erikj

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 master branch:

  • b15e6f0: 8277449: compiler/vectorapi/TestLongVectorNeg.java fails with release VMs
  • 11d819d: 8277439: G1: Correct include guard name in G1EvacFailureObjectsSet.hpp
  • 7a046e0: 8277371: Remove unnecessary DefNewGeneration::ref_processor_init()
  • 3a76d39: 8277324: C2 compilation fails with "bad AD file" on x86-32 after JDK-8276162 due to missing match rule
  • 2f20b0d: 8273039: JShell crashes when naming variable or method "abstract" or "strictfp"
  • f34f119: 8277213: CompileTask_lock is acquired out of order with MethodCompileQueue_lock
  • 47564ca: 8275643: C2's unaryOp vector intrinsic does not properly handle LongVector.neg
  • 2f0bde1: 8277102: Dubious PrintCompilation output
  • 839033b: 8276976: Rename LIR_OprDesc to LIR_Opr
  • 89b125f: 8275527: Refactor forward pointer access
  • ... and 18 more: https://git.openjdk.java.net/jdk/compare/91607436b79126ccb999deaf38a98209dbfe6ec1...master

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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready label Nov 18, 2021
@YaSuenag
Copy link
Member Author

@YaSuenag YaSuenag commented Nov 19, 2021

/integrate

@openjdk
Copy link

@openjdk openjdk bot commented Nov 19, 2021

Going to push as commit 2d4af22.
Since your change was applied there have been 40 commits pushed to the master branch:

  • a3406a1: 8277092: TestMetaspaceAllocationMT2.java#ndebug-default fails with "RuntimeException: Committed seems high: NNNN expected at most MMMM"
  • e47cc81: 8275386: Change nested classes in jdk.jlink to static nested classes
  • f609b8f: 8274946: Cleanup unnecessary calls to Throwable.initCause() in java.rmi
  • 36b59f3: 8274333: Redundant null comparison after Pattern.split
  • 6677554: 8274949: Use String.contains() instead of String.indexOf() in java.base
  • 09e8c8c: 8277342: vmTestbase/nsk/stress/strace/strace004.java fails with SIGSEGV in InstanceKlass::jni_id_for
  • 976c2bb: 8277212: GC accidentally cleans valid megamorphic vtable inline caches
  • 03f8c0f: 8275887: jarsigner prints invalid digest/signature algorithm warnings if keysize is weak/disabled
  • 936f7ff: 8276150: Quarantined jpackage apps are labeled as "damaged"
  • a022796: 8275745: Reproducible copyright headers
  • ... and 30 more: https://git.openjdk.java.net/jdk/compare/91607436b79126ccb999deaf38a98209dbfe6ec1...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Nov 19, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Nov 19, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Nov 19, 2021

@YaSuenag Pushed as commit 2d4af22.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@YaSuenag YaSuenag deleted the JDK-8277370 branch Nov 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build integrated
2 participants