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

8274122: java/io/File/createTempFile/SpecialTempFile.java fails in Windows 11 #15460

Closed
wants to merge 3 commits into from

Conversation

bplb
Copy link
Member

@bplb bplb commented Aug 28, 2023

Windows 11 does not reserve as many names as prior versions of Windows so do not expect exceptions for COM7 and LPT1.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8274122: java/io/File/createTempFile/SpecialTempFile.java fails in Windows 11 (Bug - P3)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/15460/head:pull/15460
$ git checkout pull/15460

Update a local copy of the PR:
$ git checkout pull/15460
$ git pull https://git.openjdk.org/jdk.git pull/15460/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 15460

View PR using the GUI difftool:
$ git pr show -t 15460

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/15460.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 28, 2023

👋 Welcome back bpb! 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 openjdk bot added the rfr Pull request is ready for review label Aug 28, 2023
@openjdk
Copy link

openjdk bot commented Aug 28, 2023

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

  • core-libs

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 core-libs core-libs-dev@openjdk.org label Aug 28, 2023
@mlbridge
Copy link

mlbridge bot commented Aug 29, 2023

Webrevs

@bplb
Copy link
Member Author

bplb commented Oct 16, 2023

I am not sure what else could be done here. Does anyone have any suggestions? Thanks.

@openjdk
Copy link

openjdk bot commented Oct 24, 2023

@bplb 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:

8274122: java/io/File/createTempFile/SpecialTempFile.java fails in Windows 11

Reviewed-by: lancea, djelinski, rriggs

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 783 new commits pushed to the master branch:

  • 5ce718e: 8318100: Remove redundant check for Metal support
  • f1dfdc1: 8311877: [macos] Add CLI options to provide signing identity directly to codesign and productbuild
  • 9c819fd: 8318051: Duration.between uses exceptions for control flow
  • 1ddf826: 8316964: Security tools should not call System.exit
  • 1f2a80b: 8318306: java/util/Arrays/Sorting.java fails with "Array is not sorted at 8228-th position: 8251.0 and 8153.0"
  • 1165037: 8318569: Add getter methods for Locale and Patterns in ListFormat
  • 6f35274: 8318702: G1: Fix nonstandard indentation in g1HeapTransition.cpp
  • e272098: 8318160: javac does not reject private method reference with type-variable receiver
  • 54c613a: 8318693: Fix rendering for code blocks nested under list items in building.md
  • e67550c: 8318509: x86 count_positives intrinsic broken for -XX:AVX3Threshold=0
  • ... and 773 more: https://git.openjdk.org/jdk/compare/99ea8bf2b962011e57d02a93217d65d7259e8f80...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 Pull request is ready to be integrated label Oct 24, 2023
Copy link
Contributor

@RogerRiggs RogerRiggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are newer jdk.internal.util APIs to check OS and version but they need jtreg to open up java.base. See OperatingSystem and OSVersion if interested.

@bplb
Copy link
Member Author

bplb commented Oct 24, 2023

Thanks @LanceAndersen , @djelinski , and @RogerRiggs . I will look at OSVersion.

@bplb
Copy link
Member Author

bplb commented Oct 24, 2023

On Windows 11 hardware jdk/internal/util/OSTest.java prints

STARTED    OSTest::checkOsVersion 'checkOsVersion()'
os.version: 10.0, version().toString(): 10.0
SUCCESSFUL OSTest::checkOsVersion 'checkOsVersion()'

as the kernel version is still 10.

@bplb
Copy link
Member Author

bplb commented Oct 24, 2023

To allow creation of files with reserved names, it appears that the OS must be Windows 11, or some future variant with a kernel version > 10. Windows 10 and 11, and Server 2019 and 2022 all appear to have kernel version 10, but from what I've seen only Windows 11 allows creation of these files. This test will probably break again in the future, but commit 7d3b243 passed 102 repeats.

Copy link
Contributor

@RogerRiggs RogerRiggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for trying out the OSVersion API. (Though it doesn't seem to cover all the cases).

@bplb
Copy link
Member Author

bplb commented Oct 26, 2023

/integrate

@openjdk
Copy link

openjdk bot commented Oct 26, 2023

Going to push as commit 4a142c3.
Since your change was applied there have been 817 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Oct 26, 2023
@openjdk openjdk bot closed this Oct 26, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Oct 26, 2023
@openjdk
Copy link

openjdk bot commented Oct 26, 2023

@bplb Pushed as commit 4a142c3.

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

@bplb bplb deleted the SpecialTempFile-8274122 branch October 26, 2023 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated
4 participants