1 /* 2 * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 /* 25 * Note: to run this test manually, you need to build the tests first to get native 26 * libraries compiled, and then execute it with plain jtreg, like: 27 * 28 * $ bin/jtreg -jdk:<path-to-tested-jdk> \ 29 * -nativepath:<path-to-build-dir>/support/test/jdk/jtreg/native/manual/lib/ \ 30 * -concurrency:auto \ 31 * ./test/jdk/java/foreign/TestMatrix.java 32 */ 33 34 /* @test id=UpcallHighArity-FF 35 * @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" 36 * @modules jdk.incubator.foreign/jdk.internal.foreign 37 * @build NativeTestHelper CallGeneratorHelper TestUpcallHighArity 38 * 39 * @run testng/othervm/native/manual 40 * --enable-native-access=ALL-UNNAMED 41 * -Djdk.internal.foreign.ProgrammableInvoker.USE_SPEC=false 42 * -Djdk.internal.foreign.ProgrammableUpcallHandler.USE_SPEC=false 43 * TestUpcallHighArity 44 */ 45 46 /* @test id=UpcallHighArity-TF 47 * @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" 48 * @modules jdk.incubator.foreign/jdk.internal.foreign 49 * @build NativeTestHelper CallGeneratorHelper TestUpcallHighArity 50 * 51 * @run testng/othervm/native/manual 52 * --enable-native-access=ALL-UNNAMED 53 * -Djdk.internal.foreign.ProgrammableInvoker.USE_SPEC=true 54 * -Djdk.internal.foreign.ProgrammableUpcallHandler.USE_SPEC=false 55 * TestUpcallHighArity 56 */ 57 58 /* @test id=UpcallHighArity-FT 59 * @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" 60 * @modules jdk.incubator.foreign/jdk.internal.foreign 61 * @build NativeTestHelper CallGeneratorHelper TestUpcallHighArity 62 * 63 * @run testng/othervm/native/manual 64 * --enable-native-access=ALL-UNNAMED 65 * -Djdk.internal.foreign.ProgrammableInvoker.USE_SPEC=false 66 * -Djdk.internal.foreign.ProgrammableUpcallHandler.USE_SPEC=true 67 * TestUpcallHighArity 68 */ 69 70 /* @test id=UpcallHighArity-TT 71 * @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" 72 * @modules jdk.incubator.foreign/jdk.internal.foreign 73 * @build NativeTestHelper CallGeneratorHelper TestUpcallHighArity 74 * 75 * @run testng/othervm/native/manual 76 * --enable-native-access=ALL-UNNAMED 77 * -Djdk.internal.foreign.ProgrammableInvoker.USE_SPEC=true 78 * -Djdk.internal.foreign.ProgrammableUpcallHandler.USE_SPEC=true 79 * TestUpcallHighArity 80 */ 81 82 /* @test id=Downcall-F 83 * @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" 84 * @modules jdk.incubator.foreign/jdk.internal.foreign 85 * @build NativeTestHelper CallGeneratorHelper TestDowncall 86 * 87 * @run testng/othervm/native/manual 88 * --enable-native-access=ALL-UNNAMED 89 * -Djdk.internal.foreign.ProgrammableInvoker.USE_SPEC=false 90 * TestDowncall 91 */ 92 93 /* @test id=Downcall-T 94 * @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" 95 * @modules jdk.incubator.foreign/jdk.internal.foreign 96 * @build NativeTestHelper CallGeneratorHelper TestDowncall 97 * 98 * @run testng/othervm/native/manual 99 * --enable-native-access=ALL-UNNAMED 100 * -Djdk.internal.foreign.ProgrammableInvoker.USE_SPEC=true 101 * TestDowncall 102 */ 103 104 /* @test id=UpcallScope-FF 105 * @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" 106 * @modules jdk.incubator.foreign/jdk.internal.foreign 107 * @build NativeTestHelper CallGeneratorHelper TestUpcallBase 108 * 109 * @run testng/othervm/native/manual 110 * --enable-native-access=ALL-UNNAMED 111 * -Djdk.internal.foreign.ProgrammableInvoker.USE_SPEC=false 112 * -Djdk.internal.foreign.ProgrammableUpcallHandler.USE_SPEC=false 113 * TestUpcallScope 114 */ 115 116 /* @test id=UpcallScope-TF 117 * @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" 118 * @modules jdk.incubator.foreign/jdk.internal.foreign 119 * @build NativeTestHelper CallGeneratorHelper TestUpcallBase 120 * 121 * @run testng/othervm/native/manual 122 * --enable-native-access=ALL-UNNAMED 123 * -Djdk.internal.foreign.ProgrammableInvoker.USE_SPEC=true 124 * -Djdk.internal.foreign.ProgrammableUpcallHandler.USE_SPEC=false 125 * TestUpcallScope 126 */ 127 128 /* @test id=UpcallScope-FT 129 * @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" 130 * @modules jdk.incubator.foreign/jdk.internal.foreign 131 * @build NativeTestHelper CallGeneratorHelper TestUpcallBase 132 * 133 * @run testng/othervm/native/manual 134 * --enable-native-access=ALL-UNNAMED 135 * -Djdk.internal.foreign.ProgrammableInvoker.USE_SPEC=false 136 * -Djdk.internal.foreign.ProgrammableUpcallHandler.USE_SPEC=true 137 * TestUpcallScope 138 */ 139 140 /* @test id=UpcallScope-TT 141 * @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" 142 * @modules jdk.incubator.foreign/jdk.internal.foreign 143 * @build NativeTestHelper CallGeneratorHelper TestUpcallBase 144 * 145 * @run testng/othervm/native/manual 146 * --enable-native-access=ALL-UNNAMED 147 * -Djdk.internal.foreign.ProgrammableInvoker.USE_SPEC=true 148 * -Djdk.internal.foreign.ProgrammableUpcallHandler.USE_SPEC=true 149 * TestUpcallScope 150 */ 151 152 /* @test id=UpcallAsync-FF 153 * @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" 154 * @modules jdk.incubator.foreign/jdk.internal.foreign 155 * @build NativeTestHelper CallGeneratorHelper TestUpcallBase 156 * 157 * @run testng/othervm/native/manual/timeout=960 158 * --enable-native-access=ALL-UNNAMED 159 * -Djdk.internal.foreign.ProgrammableInvoker.USE_SPEC=false 160 * -Djdk.internal.foreign.ProgrammableUpcallHandler.USE_SPEC=false 161 * TestUpcallAsync 162 */ 163 164 /* @test id=UpcallAsync-TF 165 * @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" 166 * @modules jdk.incubator.foreign/jdk.internal.foreign 167 * @build NativeTestHelper CallGeneratorHelper TestUpcallBase 168 * 169 * @run testng/othervm/native/manual/timeout=960 170 * --enable-native-access=ALL-UNNAMED 171 * -Djdk.internal.foreign.ProgrammableInvoker.USE_SPEC=true 172 * -Djdk.internal.foreign.ProgrammableUpcallHandler.USE_SPEC=false 173 * TestUpcallAsync 174 */ 175 176 /* @test id=UpcallAsync-FT 177 * @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" 178 * @modules jdk.incubator.foreign/jdk.internal.foreign 179 * @build NativeTestHelper CallGeneratorHelper TestUpcallBase 180 * 181 * @run testng/othervm/native/manual/timeout=960 182 * --enable-native-access=ALL-UNNAMED 183 * -Djdk.internal.foreign.ProgrammableInvoker.USE_SPEC=false 184 * -Djdk.internal.foreign.ProgrammableUpcallHandler.USE_SPEC=true 185 * TestUpcallAsync 186 */ 187 188 /* @test id=UpcallAsync-TT 189 * @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" 190 * @modules jdk.incubator.foreign/jdk.internal.foreign 191 * @build NativeTestHelper CallGeneratorHelper TestUpcallBase 192 * 193 * @run testng/othervm/native/manual/timeout=960 194 * --enable-native-access=ALL-UNNAMED 195 * -Djdk.internal.foreign.ProgrammableInvoker.USE_SPEC=true 196 * -Djdk.internal.foreign.ProgrammableUpcallHandler.USE_SPEC=true 197 * TestUpcallAsync 198 */ 199 200 /* @test id=UpcallStack-FF 201 * @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" 202 * @modules jdk.incubator.foreign/jdk.internal.foreign 203 * @build NativeTestHelper CallGeneratorHelper TestUpcallBase 204 * 205 * @run testng/othervm/native/manual 206 * --enable-native-access=ALL-UNNAMED 207 * -Djdk.internal.foreign.ProgrammableInvoker.USE_SPEC=false 208 * -Djdk.internal.foreign.ProgrammableUpcallHandler.USE_SPEC=false 209 * TestUpcallStack 210 */ 211 212 /* @test id=UpcallStack-TF 213 * @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" 214 * @modules jdk.incubator.foreign/jdk.internal.foreign 215 * @build NativeTestHelper CallGeneratorHelper TestUpcallBase 216 * 217 * @run testng/othervm/native/manual 218 * --enable-native-access=ALL-UNNAMED 219 * -Djdk.internal.foreign.ProgrammableInvoker.USE_SPEC=true 220 * -Djdk.internal.foreign.ProgrammableUpcallHandler.USE_SPEC=false 221 * TestUpcallStack 222 */ 223 224 /* @test id=UpcallStack-FT 225 * @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" 226 * @modules jdk.incubator.foreign/jdk.internal.foreign 227 * @build NativeTestHelper CallGeneratorHelper TestUpcallBase 228 * 229 * @run testng/othervm/native/manual 230 * --enable-native-access=ALL-UNNAMED 231 * -Djdk.internal.foreign.ProgrammableInvoker.USE_SPEC=false 232 * -Djdk.internal.foreign.ProgrammableUpcallHandler.USE_SPEC=true 233 * TestUpcallStack 234 */ 235 236 /* @test id=UpcallStack-TT 237 * @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" 238 * @modules jdk.incubator.foreign/jdk.internal.foreign 239 * @build NativeTestHelper CallGeneratorHelper TestUpcallBase 240 * 241 * @run testng/othervm/native/manual 242 * --enable-native-access=ALL-UNNAMED 243 * -Djdk.internal.foreign.ProgrammableInvoker.USE_SPEC=true 244 * -Djdk.internal.foreign.ProgrammableUpcallHandler.USE_SPEC=true 245 * TestUpcallStack 246 */ 247