Skip to content

8353190: Use "/native" Run Option for TestAvailableProcessors Execution #205

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sendaoYan
Copy link
Member

@sendaoYan sendaoYan commented Apr 24, 2025

Hi all,

This pull request contains a backport of commit 34c4d895 from the openjdk/jdk repository.

The commit being backported was authored by Oleksii Sylichenko on 24 Apr 2025 and was reviewed by David Holmes.

Thanks!


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8353190 needs maintainer approval

Issue

  • JDK-8353190: Use "/native" Run Option for TestAvailableProcessors Execution (Enhancement - P4 - Requested)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 205

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk24u/pull/205.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 24, 2025

👋 Welcome back syan! 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 bot commented Apr 24, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot changed the title Backport 34c4d895ca321508c24b13338900d617679aadae 8353190: Use "/native" Run Option for TestAvailableProcessors Execution Apr 24, 2025
@openjdk
Copy link

openjdk bot commented Apr 24, 2025

This backport pull request has now been updated with issue from the original commit.

@openjdk
Copy link

openjdk bot commented Apr 24, 2025

⚠️ @sendaoYan This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 24, 2025
@mlbridge
Copy link

mlbridge bot commented Apr 24, 2025

Webrevs

@sendaoYan
Copy link
Member Author

Locally verify commnad:

rm -rf tmp ; jtreg -v:fail,error -nr -w tmp -nativepath:C:/cygwin/home/Administrator/yansendao/software/jdk/OpenJDK24U-testimage_x64_windows_hotspot_24.0.1_9/jdk-24.0.1+9-test-image/hotspot/jtreg/native test/hotspot/jtreg/runtime/os/windows/TestAvailableProcessors.java

@sendaoYan
Copy link
Member Author

/approval request Clean backport to make test more standardized and easier to use. Change has been verified locally, test-fix only, no risk.

@openjdk
Copy link

openjdk bot commented Apr 25, 2025

@sendaoYan
8353190: The approval request has been created successfully.

@openjdk openjdk bot added the approval label Apr 25, 2025
@sendaoYan
Copy link
Member Author

Before this backport PR, run this test without -nativepath: args will cause test report fails shows as below:

test TestAvailableProcessors.testProcessorAvailability(): failure [12ms]
java.io.IOException: Cannot run program "C:\cygwin\home\Administrator\yansendao\jdk24u\tmp\scratch\.\GetProcessorInfo.exe": CreateProcess error=2, The system cannot find the file specified
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1044)
        at TestAvailableProcessors.testProcessorAvailability(TestAvailableProcessors.java:181)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
        at java.base/java.lang.reflect.Method.invoke(Method.java:565)
        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
        at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:599)
        at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:174)
        at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
        at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:822)
        at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:147)
        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
        at org.testng.TestRunner.privateRun(TestRunner.java:764)
        at org.testng.TestRunner.run(TestRunner.java:585)
        at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
        at org.testng.SuiteRunner.run(SuiteRunner.java:286)
        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1218)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
        at org.testng.TestNG.runSuites(TestNG.java:1069)
        at org.testng.TestNG.run(TestNG.java:1037)
        at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:107)
        at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:63)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
        at java.base/java.lang.reflect.Method.invoke(Method.java:565)
        at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
        at java.base/java.lang.Thread.run(Thread.java:1447)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
        at java.base/java.lang.ProcessImpl.create(Native Method)
        at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:485)
        at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:146)
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1076)
        ... 31 more

@sendaoYan
Copy link
Member Author

sendaoYan commented Apr 25, 2025

Before this backport PR, run this test without -nativepath: args will cause test report fails shows as below:

test TestAvailableProcessors.testProcessorAvailability(): failure [12ms]
java.io.IOException: Cannot run program "C:\cygwin\home\Administrator\yansendao\jdk21u-dev\tmp\scratch\.\GetProcessorInfo.exe": CreateProcess error=2, The system cannot find the file specified
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1170)
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1089)
        at TestAvailableProcessors.testProcessorAvailability(TestAvailableProcessors.java:181)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
        at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:599)
        at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:174)
        at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
        at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:822)
        at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:147)
        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
        at org.testng.TestRunner.privateRun(TestRunner.java:764)
        at org.testng.TestRunner.run(TestRunner.java:585)
        at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
        at org.testng.SuiteRunner.run(SuiteRunner.java:286)
        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1218)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
        at org.testng.TestNG.runSuites(TestNG.java:1069)
        at org.testng.TestNG.run(TestNG.java:1037)
        at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:107)
        at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:63)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
        at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
        at java.base/java.lang.ProcessImpl.create(Native Method)
        at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:506)
        at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:159)
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1126)
        ... 31 more

@sendaoYan
Copy link
Member Author

Locally verify command:

jtreg -v:fail,error -nr -w tmp -nativepath:C:/Users/Administrator/Downloads/OpenJDK21U-testimage_x64_windows_hotspot_21.0.7_6/jdk-21.0.7+6-test-image/hotspot/jtreg/native test/hotspot/jtreg/runtime/os/windows/TestAvailableProcessors.java

@sendaoYan
Copy link
Member Author

/approval request Clean backport to make test more standardized and easier to use. Change has been verified locally, test-fix only, no risk.

@openjdk
Copy link

openjdk bot commented May 6, 2025

@sendaoYan
8353190: The approval request was already up to date.

@bridgekeeper bridgekeeper bot added the oca Needs verification of OCA signatory status label May 13, 2025
@openjdk openjdk bot removed the rfr Pull request is ready for review label May 13, 2025
@bridgekeeper
Copy link

bridgekeeper bot commented Jun 3, 2025

@sendaoYan 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 issue a /touch or /keepalive command to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@sendaoYan
Copy link
Member Author

/touch

@openjdk
Copy link

openjdk bot commented Jun 3, 2025

@sendaoYan The pull request is being re-evaluated and the inactivity timeout has been reset.

@bridgekeeper bridgekeeper bot removed the oca Needs verification of OCA signatory status label Jun 4, 2025
@openjdk openjdk bot added the rfr Pull request is ready for review label Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approval backport clean rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

1 participant