From fcc119531a3badaa5f7b5602b3d74c2ac5bf7b81 Mon Sep 17 00:00:00 2001 From: Aleksey Shipilev Date: Mon, 1 Aug 2022 14:20:27 +0000 Subject: [PATCH] 8290531: Loom: Parallelize a few tests more deeply Reviewed-by: rpressler, jpai, alanb --- .../java/net/vthread/BlockingSocketOps.java | 11 ++++-- .../channels/vthread/BlockingChannelOps.java | 11 ++++-- .../jdk/internal/vm/Continuation/Fuzz.java | 34 ++++++++++++------- 3 files changed, 39 insertions(+), 17 deletions(-) diff --git a/test/jdk/java/net/vthread/BlockingSocketOps.java b/test/jdk/java/net/vthread/BlockingSocketOps.java index ae686f8cb12..2c39e0db388 100644 --- a/test/jdk/java/net/vthread/BlockingSocketOps.java +++ b/test/jdk/java/net/vthread/BlockingSocketOps.java @@ -22,17 +22,24 @@ */ /** - * @test + * @test id=default * @bug 8284161 * @summary Basic tests of virtual threads doing blocking I/O with java.net sockets * @enablePreview * @library /test/lib * @run testng/othervm/timeout=300 BlockingSocketOps + */ + +/** + * @test id=indirect-register + * @summary Basic tests of virtual threads doing blocking I/O with java.net sockets + * @enablePreview + * @library /test/lib * @run testng/othervm/timeout=300 -Djdk.useDirectRegister BlockingSocketOps */ /** - * @test + * @test id=no-vmcontinuations * @requires vm.continuations * @enablePreview * @library /test/lib diff --git a/test/jdk/java/nio/channels/vthread/BlockingChannelOps.java b/test/jdk/java/nio/channels/vthread/BlockingChannelOps.java index 06f2afa4e6b..0ad332a8702 100644 --- a/test/jdk/java/nio/channels/vthread/BlockingChannelOps.java +++ b/test/jdk/java/nio/channels/vthread/BlockingChannelOps.java @@ -22,17 +22,24 @@ */ /** - * @test + * @test id=default * @bug 8284161 * @summary Basic tests of virtual threads doing blocking I/O with NIO channels * @enablePreview * @library /test/lib * @run testng/othervm/timeout=300 BlockingChannelOps + */ + +/** + * @test id=indirect-register + * @summary Basic tests of virtual threads doing blocking I/O with NIO channels + * @enablePreview + * @library /test/lib * @run testng/othervm/timeout=300 -Djdk.useDirectRegister BlockingChannelOps */ /** - * @test + * @test id=no-vmcontinuations * @requires vm.continuations * @enablePreview * @library /test/lib diff --git a/test/jdk/jdk/internal/vm/Continuation/Fuzz.java b/test/jdk/jdk/internal/vm/Continuation/Fuzz.java index b8440ea79c1..e486fc63ce7 100644 --- a/test/jdk/jdk/internal/vm/Continuation/Fuzz.java +++ b/test/jdk/jdk/internal/vm/Continuation/Fuzz.java @@ -22,31 +22,39 @@ */ /* - * @test + * @test id=default * @key randomness * @summary Fuzz tests for jdk.internal.vm.Continuation * @requires vm.continuations - * @modules java.base/jdk.internal.vm - * * @requires vm.flavor == "server" & (vm.opt.TieredStopAtLevel == null | vm.opt.TieredStopAtLevel == 4) * @requires vm.opt.TieredCompilation == null | vm.opt.TieredCompilation == true - * @modules java.base java.base/jdk.internal.vm.annotation + * @modules java.base java.base/jdk.internal.vm.annotation java.base/jdk.internal.vm * @library /test/lib * @build java.base/java.lang.StackWalkerHelper * @build jdk.test.whitebox.WhiteBox * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * - * @run main/othervm/timeout=300 --enable-preview -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. Fuzz - * @run main/othervm/timeout=300 --enable-preview -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. -XX:+PreserveFramePointer Fuzz - * + * @run main/othervm/timeout=300 --enable-preview -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * Fuzz */ -// * @run main/othervm/timeout=3000 -XX:StartFlightRecording=filename=test.jfr,settings=profile -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. Fuzz - -// Anything excluded or not compileonly is not compiled; see CompilerOracle::should_exclude - -// @run driver jdk.test.lib.FileInstaller compilerDirectives.json compilerDirectives.json -// -XX:CompilerDirectivesFile=compilerDirectives.json +/* + * @test id=preserve-fp + * @key randomness + * @summary Fuzz tests for jdk.internal.vm.Continuation + * @requires vm.continuations + * @requires vm.flavor == "server" & (vm.opt.TieredStopAtLevel == null | vm.opt.TieredStopAtLevel == 4) + * @requires vm.opt.TieredCompilation == null | vm.opt.TieredCompilation == true + * @modules java.base java.base/jdk.internal.vm.annotation java.base/jdk.internal.vm + * @library /test/lib + * @build java.base/java.lang.StackWalkerHelper + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * + * @run main/othervm/timeout=300 --enable-preview -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. + * -XX:+PreserveFramePointer + * Fuzz + */ import jdk.internal.vm.Continuation; import jdk.internal.vm.ContinuationScope;