RFR: 8362834: Several runtime/Thread tests should mark as /native
David Holmes
dholmes at openjdk.org
Mon Jul 21 12:19:40 UTC 2025
On Mon, 21 Jul 2025 09:45:53 GMT, SendaoYan <syan at openjdk.org> wrote:
> Hi all,
>
> Some of the runtime/Thread tests ready mark as /native:
> runtime/Thread/SuspendAtExit.java
> runtime/Thread/StopAtExit.java
>
> But there are some of the runtime/Thread tests needed to mark as /native:
> runtime/Thread/AsyncExceptionTest.java
> runtime/Thread/AsyncExceptionOnMonitorEnter.java
> runtime/Thread/TestBreakSignalThreadDump.java#with_jsig
> runtime/Thread/TestBreakSignalThreadDump.java#default
>
> Without -nativepath jtreg option, the test will report test failure, such as: "Execution failed: `main' threw exception: java.lang.RuntimeException: Expected to get exit value of [0], exit value is: [1]", after this PR without -nativepath jtreg option, the test will report "Error. Use -nativepath to specify the location of native code", this will make test usage more friendly.
>
> Change has been verified locally, test-fix only, no risk.
Seems reasonable.
FWIW I always use a jtreg wrapper that sets the -nativepath no matter what test I'm running.
test/hotspot/jtreg/runtime/Thread/AsyncExceptionOnMonitorEnter.java line 2:
> 1: /*
> 2: * Copyright (c) 2022, 2025 Oracle and/or its affiliates. All rights reserved.
Suggestion:
* Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved.
-------------
Marked as reviewed by dholmes (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/26411#pullrequestreview-3037822628
PR Review Comment: https://git.openjdk.org/jdk/pull/26411#discussion_r2219019242
More information about the hotspot-runtime-dev
mailing list