< prev index next >

test/jdk/java/nio/channels/vthread/SelectorOps.java

Print this page

 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  */
 23 
 24 /*
 25  * @test id=default
 26  * @summary Test virtual threads doing selection operations
 27  * @library /test/lib
 28  * @run junit/othervm/native --enable-native-access=ALL-UNNAMED SelectorOps
 29  */
 30 
 31 /*
 32  * @test id=poller-modes
 33  * @requires (os.family == "linux") | (os.family == "mac")
 34  * @library /test/lib
 35  * @run junit/othervm/native -Djdk.pollerMode=1 --enable-native-access=ALL-UNNAMED SelectorOps
 36  * @run junit/othervm/native -Djdk.pollerMode=2 --enable-native-access=ALL-UNNAMED SelectorOps
 37  * @run junit/othervm/native -Djdk.pollerMode=3 --enable-native-access=ALL-UNNAMED SelectorOps
 38  */
 39 












 40 /*
 41  * @test id=no-vmcontinuations
 42  * @requires vm.continuations
 43  * @library /test/lib
 44  * @run junit/othervm/native -XX:+UnlockExperimentalVMOptions -XX:-VMContinuations
 45  *     --enable-native-access=ALL-UNNAMED SelectorOps
 46  */
 47 
 48 import java.io.IOException;
 49 import java.nio.ByteBuffer;
 50 import java.nio.channels.Pipe;
 51 import java.nio.channels.SelectionKey;
 52 import java.nio.channels.Selector;
 53 import java.nio.charset.StandardCharsets;
 54 import java.util.Arrays;
 55 import java.util.concurrent.TimeUnit;
 56 
 57 import jdk.test.lib.thread.VThreadRunner;
 58 import jdk.test.lib.thread.VThreadPinner;
 59 import org.junit.jupiter.api.Test;

 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  */
 23 
 24 /*
 25  * @test id=default
 26  * @summary Test virtual threads doing selection operations
 27  * @library /test/lib
 28  * @run junit/othervm/native --enable-native-access=ALL-UNNAMED SelectorOps
 29  */
 30 
 31 /*
 32  * @test id=poller-modes
 33  * @requires (os.family == "linux") | (os.family == "mac")
 34  * @library /test/lib
 35  * @run junit/othervm/native -Djdk.pollerMode=1 --enable-native-access=ALL-UNNAMED SelectorOps
 36  * @run junit/othervm/native -Djdk.pollerMode=2 --enable-native-access=ALL-UNNAMED SelectorOps
 37  * @run junit/othervm/native -Djdk.pollerMode=3 --enable-native-access=ALL-UNNAMED SelectorOps
 38  */
 39 
 40 /*
 41  * @test id=io_uring
 42  * @requires os.family == "linux"
 43  * @library /test/lib
 44  * @run junit/othervm -Djdk.pollerMode=1 -Djdk.io_uring=true --enable-native-access=ALL-UNNAMED SelectorOps
 45  * @run junit/othervm -Djdk.pollerMode=2 -Djdk.io_uring=true --enable-native-access=ALL-UNNAMED SelectorOps
 46  * @run junit/othervm -Djdk.pollerMode=3 -Djdk.io_uring=true --enable-native-access=ALL-UNNAMED SelectorOps
 47  * @run junit/othervm -Djdk.pollerMode=1 -Djdk.io_uring=true -Djdk.io_uring.sqpoll_idle=20 --enable-native-access=ALL-UNNAMED SelectorOps
 48  * @run junit/othervm -Djdk.pollerMode=2 -Djdk.io_uring=true -Djdk.io_uring.sqpoll_idle=20 --enable-native-access=ALL-UNNAMED SelectorOps
 49  * @run junit/othervm -Djdk.pollerMode=3 -Djdk.io_uring=true -Djdk.io_uring.sqpoll_idle=20 --enable-native-access=ALL-UNNAMED SelectorOps
 50  */
 51 
 52 /*
 53  * @test id=no-vmcontinuations
 54  * @requires vm.continuations
 55  * @library /test/lib
 56  * @run junit/othervm/native -XX:+UnlockExperimentalVMOptions -XX:-VMContinuations
 57  *     --enable-native-access=ALL-UNNAMED SelectorOps
 58  */
 59 
 60 import java.io.IOException;
 61 import java.nio.ByteBuffer;
 62 import java.nio.channels.Pipe;
 63 import java.nio.channels.SelectionKey;
 64 import java.nio.channels.Selector;
 65 import java.nio.charset.StandardCharsets;
 66 import java.util.Arrays;
 67 import java.util.concurrent.TimeUnit;
 68 
 69 import jdk.test.lib.thread.VThreadRunner;
 70 import jdk.test.lib.thread.VThreadPinner;
 71 import org.junit.jupiter.api.Test;
< prev index next >