On Wed, 12 Feb 2025 03:24:07 GMT, SendaoYan <s...@openjdk.org> wrote:
> Hi all, > > Test test/jdk/java/lang/Thread/virtual/ThreadPollOnYield.java run passed > unexpected without native library or with the incorrect native library path. > The test command with incorrect native library path shows below. We will seen > this tests run passed unexpected before this PR, because the first virtual > thread do not run normally without the dependent shared library > libVThreadPinner.so, and there is no assert when the first virtual thread run > abnormal. > > > mkdir -p empty-directory ; jtreg -v:fail,error -w tmp -nr > -jdk:build/linux-x86_64-server-release/images/jdk -nativepath:empty-directory > test/jdk/java/lang/Thread/virtual/ThreadPollOnYield.java#default > > > This PR add a latch variable will make sure the first virtual thread run once > at least. After this PR run the same test command which with incorrect native > library path, and we will seen this pass run timed out as expected. > > Change has been verified locally, test-fix only, no risk. This pull request has now been integrated. Changeset: adc3f53d Author: SendaoYan <s...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/adc3f53d2403cd414a91e71c079b4108b2346da0 Stats: 4 lines in 1 file changed: 3 ins; 0 del; 1 mod 8349787: java/lang/Thread/virtual/ThreadPollOnYield.java#default passes unexpectedly without libVThreadPinner.so Reviewed-by: alanb ------------- PR: https://git.openjdk.org/jdk/pull/23576