-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8353489: Increase timeout and improve Windows compatibility in test/jdk/java/lang/ProcessBuilder/Basic.java #23933
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
8353489: Increase timeout and improve Windows compatibility in test/jdk/java/lang/ProcessBuilder/Basic.java #23933
Conversation
- remove unused import - increase timeout by one minute For Windows: - add "/d" to `winEnvCommand` - to disable the execution of AutoRun commands - replace "echo" with "cmd /c echo."
👋 Welcome back asilichenko! A progress list of the required criteria for merging this PR into |
@asilichenko 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:
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 1038 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. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@RogerRiggs) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
@asilichenko The following label will be automatically applied to this pull request:
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. |
Webrevs
|
@asilichenko This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
1 similar comment
@asilichenko This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
keep-alive |
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.
Looks good, thanks for the update.
/integrate |
@asilichenko |
/sponsor |
Going to push as commit 6bcbc3b.
Your commit was automatically rebased without conflicts. |
@RogerRiggs @asilichenko Pushed as commit 6bcbc3b. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
This PR proposes three improvements to the
Basic.java
test:Increase Timeout
Fix Incompatibility with Windows (Cygwin vs. Native)
echo
command.cmd /c echo/
, which produces the same output (a single newline) in Windows, ensuring compatibility.Prevent Autorun Scripts in the
cmd /c set
Commandcmd /c set
, but in Windows, this may trigger autorun scripts./d
options to prevent autorun scripts from affecting the test results.These changes improve test reliability and ensure compatibility across different environments.
Testing:
cmd /c echo/
produces the expected output in Windows.cmd /d /c set
correctly lists environment variables without executing autorun scripts.Detailed Description
echo
The following test fails in a clean Windows environment (e.g., when run from IntelliJ IDEA without Cygwin):
with following error:
If we try to run
echo
as a process in Windows, for example from IntelliJ IDEA, we get the error above, because Windows does not have such an executable, but instead this is a command of the Command Processor (CMD).The
echo.
command with the.
works the same way as callingecho
without parameters in Unix — it outputs an empty line. Was implemented using the analogousecho/
command to avoid compatibility issues.See: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/echo
To ensure that the
echo/
command is supported in Cygwin, we need to invoke it viacmd /c
, because Cygwin has its own executable "echo".cmd.exe /c set
The following test fails in a Windows environment under specific conditions:
with following error:
Reason
In my environment, Miniconda was installed, which adds a script execution to the autorun of
cmd
. This script sets additional environment variables that break this test.To reproduce this bug, you can manually add a custom script to the autorun. I have described the steps in detail in my article: AutoRun for Windows Command Processor (cmd.exe).
Changes
For Windows
/d
towinEnvCommand
- to disable the execution of AutoRun commandsecho
withcmd /c echo.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/23933/head:pull/23933
$ git checkout pull/23933
Update a local copy of the PR:
$ git checkout pull/23933
$ git pull https://git.openjdk.org/jdk.git pull/23933/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 23933
View PR using the GUI difftool:
$ git pr show -t 23933
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/23933.diff
Using Webrev
Link to Webrev Comment