8304888: Add dedicated VMProps for linker and fallback linker
Reviewed-by: alanb, mcimadamore
This commit is contained in:
parent
75a4edca6b
commit
a8bf2acb7d
@ -44,7 +44,10 @@ requires.extraPropDefns.bootlibs = ../../lib/jdk/test/whitebox
|
||||
requires.extraPropDefns.libs = \
|
||||
../../lib/jdk/test/lib/Platform.java \
|
||||
../../lib/jdk/test/lib/Container.java
|
||||
requires.extraPropDefns.vmOpts = -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
requires.extraPropDefns.javacOpts = --add-exports java.base/jdk.internal.foreign=ALL-UNNAMED
|
||||
requires.extraPropDefns.vmOpts = \
|
||||
-XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI \
|
||||
--add-exports java.base/jdk.internal.foreign=ALL-UNNAMED
|
||||
requires.properties= \
|
||||
sun.arch.data.model \
|
||||
vm.simpleArch \
|
||||
|
@ -12,7 +12,7 @@
|
||||
# A "headful" test requires a graphical environment to meaningfully
|
||||
# run. Tests that are not headful are "headless".
|
||||
# A test flagged with key sound needs audio devices on the system, this
|
||||
# may be accompanied by the headful keyword since audio device access
|
||||
# may be accompanied by the headful keyword since audio device access
|
||||
# is often linked to access to desktop resources and headful systems are
|
||||
# also more likely to have audio devices (ie meaning both input and output)
|
||||
# A test flagged with key "printer" requires a printer to succeed, else
|
||||
@ -46,7 +46,10 @@ requires.extraPropDefns.bootlibs = ../lib/jdk/test/whitebox
|
||||
requires.extraPropDefns.libs = \
|
||||
../lib/jdk/test/lib/Platform.java \
|
||||
../lib/jdk/test/lib/Container.java
|
||||
requires.extraPropDefns.vmOpts = -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
requires.extraPropDefns.javacOpts = --add-exports java.base/jdk.internal.foreign=ALL-UNNAMED
|
||||
requires.extraPropDefns.vmOpts = \
|
||||
-XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI \
|
||||
--add-exports java.base/jdk.internal.foreign=ALL-UNNAMED
|
||||
requires.properties= \
|
||||
sun.arch.data.model \
|
||||
java.runtime.name \
|
||||
@ -69,7 +72,8 @@ requires.properties= \
|
||||
vm.jvmci \
|
||||
docker.support \
|
||||
release.implementor \
|
||||
jdk.containerized
|
||||
jdk.containerized \
|
||||
jdk.foreign.linker
|
||||
|
||||
# Minimum jtreg version
|
||||
requiredVersion=7.2+1
|
||||
|
@ -36,7 +36,7 @@ import static org.testng.Assert.*;
|
||||
/*
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @run testng/othervm --enable-native-access=ALL-UNNAMED LibraryLookupTest
|
||||
*/
|
||||
public class LibraryLookupTest {
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @run testng/othervm --enable-native-access=ALL-UNNAMED SafeFunctionAccessTest
|
||||
*/
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @run testng/othervm --enable-native-access=ALL-UNNAMED StdLibTest
|
||||
*/
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @library ../ /test/lib
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @run testng/othervm --enable-native-access=ALL-UNNAMED TestAddressDereference
|
||||
*/
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @run testng/othervm --enable-native-access=ALL-UNNAMED TestClassLoaderFindNative
|
||||
*/
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @build NativeTestHelper CallGeneratorHelper TestDowncallBase
|
||||
*
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @build NativeTestHelper CallGeneratorHelper TestDowncallBase
|
||||
*
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64")
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @run testng/othervm -Dos.name=Windows --enable-native-access=ALL-UNNAMED TestFallbackLookup
|
||||
*/
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
/*
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @run testng/othervm --enable-native-access=ALL-UNNAMED TestFunctionDescriptor
|
||||
*/
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
/*
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @run testng/othervm --enable-native-access=ALL-UNNAMED TestHeapAlignment
|
||||
*/
|
||||
|
||||
|
@ -25,8 +25,8 @@
|
||||
/*
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @run testng/othervm --enable-native-access=ALL-UNNAMED TestIllegalLink
|
||||
*/
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @requires os.arch=="amd64" | os.arch=="x86_64" | os.arch=="aarch64" | os.arch=="riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @run testng/othervm
|
||||
* -Djdk.internal.foreign.DowncallLinker.USE_SPEC=true
|
||||
* --enable-native-access=ALL-UNNAMED
|
||||
|
@ -24,16 +24,21 @@
|
||||
/*
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @requires os.arch=="amd64" | os.arch=="x86_64" | os.arch=="aarch64" | os.arch=="riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @run testng TestLinker
|
||||
*/
|
||||
|
||||
import jdk.internal.foreign.CABI;
|
||||
import org.testng.annotations.DataProvider;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import java.lang.foreign.FunctionDescriptor;
|
||||
import java.lang.foreign.Linker;
|
||||
import java.lang.invoke.MethodHandle;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import static java.lang.foreign.MemoryLayout.*;
|
||||
import static java.lang.foreign.ValueLayout.JAVA_CHAR;
|
||||
@ -43,6 +48,8 @@ import static org.testng.Assert.assertNotSame;
|
||||
|
||||
public class TestLinker extends NativeTestHelper {
|
||||
|
||||
static final boolean IS_FALLBACK_LINKER = CABI.current() == CABI.FALLBACK;
|
||||
|
||||
record LinkRequest(FunctionDescriptor descriptor, Linker.Option... options) {}
|
||||
|
||||
@Test(dataProvider = "notSameCases")
|
||||
@ -75,7 +82,7 @@ public class TestLinker extends NativeTestHelper {
|
||||
|
||||
@DataProvider
|
||||
public static Object[][] namedDescriptors() {
|
||||
return new Object[][]{
|
||||
List<Object[]> cases = new ArrayList<>(Arrays.asList(new Object[][]{
|
||||
{ FunctionDescriptor.ofVoid(C_INT),
|
||||
FunctionDescriptor.ofVoid(C_INT.withName("x")) },
|
||||
{ FunctionDescriptor.ofVoid(structLayout(C_INT)),
|
||||
@ -90,17 +97,22 @@ public class TestLinker extends NativeTestHelper {
|
||||
FunctionDescriptor.ofVoid(structLayout(sequenceLayout(1, C_INT).withName("x"))) },
|
||||
{ FunctionDescriptor.ofVoid(structLayout(sequenceLayout(1, C_INT))),
|
||||
FunctionDescriptor.ofVoid(structLayout(sequenceLayout(1, C_INT.withName("x")))) },
|
||||
{ FunctionDescriptor.ofVoid(unionLayout(C_INT)),
|
||||
FunctionDescriptor.ofVoid(unionLayout(C_INT).withName("x")) },
|
||||
{ FunctionDescriptor.ofVoid(unionLayout(C_INT)),
|
||||
FunctionDescriptor.ofVoid(unionLayout(C_INT.withName("x"))) },
|
||||
{ FunctionDescriptor.ofVoid(C_POINTER),
|
||||
FunctionDescriptor.ofVoid(C_POINTER.withName("x")) },
|
||||
{ FunctionDescriptor.ofVoid(C_POINTER.withTargetLayout(C_INT)),
|
||||
FunctionDescriptor.ofVoid(C_POINTER.withTargetLayout(C_INT.withName("x"))) },
|
||||
{ FunctionDescriptor.ofVoid(C_POINTER.withTargetLayout(C_INT)),
|
||||
FunctionDescriptor.ofVoid(C_POINTER.withName("x").withTargetLayout(C_INT.withName("x"))) },
|
||||
};
|
||||
}));
|
||||
|
||||
if (!IS_FALLBACK_LINKER) {
|
||||
cases.add(new Object[]{ FunctionDescriptor.ofVoid(unionLayout(C_INT)),
|
||||
FunctionDescriptor.ofVoid(unionLayout(C_INT).withName("x")) });
|
||||
cases.add(new Object[]{ FunctionDescriptor.ofVoid(unionLayout(C_INT)),
|
||||
FunctionDescriptor.ofVoid(unionLayout(C_INT.withName("x"))) });
|
||||
}
|
||||
|
||||
return cases.toArray(Object[][]::new);
|
||||
}
|
||||
|
||||
@DataProvider
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
/* @test id=UpcallHighArity-FF
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @build NativeTestHelper CallGeneratorHelper TestUpcallHighArity
|
||||
*
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
/* @test id=UpcallHighArity-TF
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @build NativeTestHelper CallGeneratorHelper TestUpcallHighArity
|
||||
*
|
||||
@ -59,7 +59,7 @@
|
||||
|
||||
/* @test id=UpcallHighArity-FT
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @build NativeTestHelper CallGeneratorHelper TestUpcallHighArity
|
||||
*
|
||||
@ -72,7 +72,7 @@
|
||||
|
||||
/* @test id=UpcallHighArity-TT
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @build NativeTestHelper CallGeneratorHelper TestUpcallHighArity
|
||||
*
|
||||
@ -85,7 +85,7 @@
|
||||
|
||||
/* @test id=DowncallScope-F
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @build NativeTestHelper CallGeneratorHelper TestDowncallBase
|
||||
*
|
||||
@ -97,7 +97,7 @@
|
||||
|
||||
/* @test id=DowncallScope-T
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @build NativeTestHelper CallGeneratorHelper TestDowncallBase
|
||||
*
|
||||
@ -109,7 +109,7 @@
|
||||
|
||||
/* @test id=DowncallStack-F
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @build NativeTestHelper CallGeneratorHelper TestDowncallBase
|
||||
*
|
||||
@ -121,7 +121,7 @@
|
||||
|
||||
/* @test id=DowncallStack-T
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @build NativeTestHelper CallGeneratorHelper TestDowncallBase
|
||||
*
|
||||
@ -133,7 +133,7 @@
|
||||
|
||||
/* @test id=UpcallScope-FF
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @build NativeTestHelper CallGeneratorHelper TestUpcallBase
|
||||
*
|
||||
@ -146,7 +146,7 @@
|
||||
|
||||
/* @test id=UpcallScope-TF
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @build NativeTestHelper CallGeneratorHelper TestUpcallBase
|
||||
*
|
||||
@ -159,7 +159,7 @@
|
||||
|
||||
/* @test id=UpcallScope-FT
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @build NativeTestHelper CallGeneratorHelper TestUpcallBase
|
||||
*
|
||||
@ -172,7 +172,7 @@
|
||||
|
||||
/* @test id=UpcallScope-TT
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @build NativeTestHelper CallGeneratorHelper TestUpcallBase
|
||||
*
|
||||
@ -185,7 +185,7 @@
|
||||
|
||||
/* @test id=UpcallAsync-FF
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @build NativeTestHelper CallGeneratorHelper TestUpcallBase
|
||||
*
|
||||
@ -198,7 +198,7 @@
|
||||
|
||||
/* @test id=UpcallAsync-TF
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @build NativeTestHelper CallGeneratorHelper TestUpcallBase
|
||||
*
|
||||
@ -211,7 +211,7 @@
|
||||
|
||||
/* @test id=UpcallAsync-FT
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @build NativeTestHelper CallGeneratorHelper TestUpcallBase
|
||||
*
|
||||
@ -224,7 +224,7 @@
|
||||
|
||||
/* @test id=UpcallAsync-TT
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @build NativeTestHelper CallGeneratorHelper TestUpcallBase
|
||||
*
|
||||
@ -237,7 +237,7 @@
|
||||
|
||||
/* @test id=UpcallStack-FF
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @build NativeTestHelper CallGeneratorHelper TestUpcallBase
|
||||
*
|
||||
@ -250,7 +250,7 @@
|
||||
|
||||
/* @test id=UpcallStack-TF
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @build NativeTestHelper CallGeneratorHelper TestUpcallBase
|
||||
*
|
||||
@ -263,7 +263,7 @@
|
||||
|
||||
/* @test id=UpcallStack-FT
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @build NativeTestHelper CallGeneratorHelper TestUpcallBase
|
||||
*
|
||||
@ -276,7 +276,7 @@
|
||||
|
||||
/* @test id=UpcallStack-TT
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @build NativeTestHelper CallGeneratorHelper TestUpcallBase
|
||||
*
|
||||
@ -290,7 +290,7 @@
|
||||
/*
|
||||
* @test id=VarArgs
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @build NativeTestHelper CallGeneratorHelper
|
||||
*
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @run testng/othervm
|
||||
* --enable-native-access=ALL-UNNAMED
|
||||
* TestNULLAddress
|
||||
|
@ -25,7 +25,7 @@
|
||||
/*
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @run testng/othervm --enable-native-access=ALL-UNNAMED TestNative
|
||||
*/
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.ref
|
||||
* @run testng/othervm
|
||||
* --enable-native-access=ALL-UNNAMED
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @run testng/othervm --enable-native-access=ALL-UNNAMED TestScopedOperations
|
||||
*/
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @run testng/othervm -Xmx4G -XX:MaxDirectMemorySize=1M --enable-native-access=ALL-UNNAMED TestSegments
|
||||
*/
|
||||
|
||||
|
@ -31,7 +31,7 @@ import static org.testng.Assert.*;
|
||||
/*
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @run testng TestStringEncoding
|
||||
*/
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @requires !vm.musl
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @build NativeTestHelper CallGeneratorHelper TestUpcallBase
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @library /test/lib
|
||||
* @build TestUpcallException
|
||||
*
|
||||
|
@ -25,7 +25,7 @@
|
||||
/*
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @build NativeTestHelper CallGeneratorHelper TestUpcallHighArity
|
||||
*
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @build NativeTestHelper CallGeneratorHelper TestUpcallBase
|
||||
*
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @build NativeTestHelper CallGeneratorHelper TestUpcallBase
|
||||
*
|
||||
|
@ -25,7 +25,7 @@
|
||||
/*
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
*
|
||||
* @run testng/othervm/native
|
||||
* --enable-native-access=ALL-UNNAMED
|
||||
|
@ -25,7 +25,7 @@
|
||||
/*
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @run testng/othervm --enable-native-access=ALL-UNNAMED -Dgenerator.sample.factor=17 TestVarArgs
|
||||
*/
|
||||
|
@ -25,7 +25,7 @@
|
||||
* @test id=specialized
|
||||
* @enablePreview
|
||||
* @library ../
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @run testng/othervm
|
||||
* --enable-native-access=ALL-UNNAMED
|
||||
@ -38,7 +38,7 @@
|
||||
* @test id=interpreted
|
||||
* @enablePreview
|
||||
* @library ../
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @run testng/othervm
|
||||
* --enable-native-access=ALL-UNNAMED
|
||||
|
@ -25,7 +25,7 @@
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @library ../ /test/lib
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @run testng/othervm --enable-native-access=ALL-UNNAMED TestCaptureCallState
|
||||
*/
|
||||
|
||||
@ -129,4 +129,3 @@ public class TestCaptureCallState extends NativeTestHelper {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
* @enablePreview
|
||||
* @library ../ /test/lib
|
||||
* @modules java.base/jdk.internal.ref java.base/jdk.internal.foreign
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @run testng/othervm --enable-native-access=ALL-UNNAMED TestDontRelease
|
||||
*/
|
||||
|
||||
@ -78,4 +78,3 @@ public class TestDontRelease extends NativeTestHelper {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @requires !vm.musl
|
||||
*
|
||||
* @library /test/lib
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @requires !vm.musl
|
||||
*
|
||||
* @library /test/lib
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @build invoker_module/* lookup_module/*
|
||||
* @run testng/othervm --enable-native-access=invoker_module
|
||||
* lookup_module/handle.lookup.MethodHandleLookup
|
||||
|
@ -25,7 +25,7 @@
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @library ../
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @modules java.base/jdk.internal.foreign
|
||||
* @run testng/othervm --enable-native-access=ALL-UNNAMED TestLargeStub
|
||||
*/
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @compile lookup/Lookup.java
|
||||
* @compile invoker/Invoker.java
|
||||
* @run main/othervm --enable-native-access=ALL-UNNAMED TestLoaderLookup
|
||||
|
@ -30,7 +30,7 @@ import static org.testng.Assert.*;
|
||||
/*
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @run testng/othervm TestLoaderLookupJNI
|
||||
*/
|
||||
public class TestLoaderLookupJNI {
|
||||
|
@ -25,8 +25,8 @@
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @library ../ /test/lib
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires vm.flavor != "zero"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @requires jdk.foreign.linker != "FALLBACK"
|
||||
* @build NativeTestHelper
|
||||
* @run testng/othervm --enable-native-access=ALL-UNNAMED TestNested
|
||||
*/
|
||||
|
@ -25,7 +25,7 @@
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @library ../
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @run testng/othervm
|
||||
* --enable-native-access=ALL-UNNAMED
|
||||
* -Xbatch
|
||||
|
@ -25,7 +25,7 @@
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @library ../ /test/lib
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @run testng/othervm --enable-native-access=ALL-UNNAMED TestPassHeapSegment
|
||||
*/
|
||||
|
||||
@ -83,4 +83,3 @@ public class TestPassHeapSegment extends UpcallTestHelper {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* @test id=default_gc
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @library /test/lib
|
||||
* @library ../
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
@ -42,7 +42,7 @@
|
||||
/*
|
||||
* @test id=zgc
|
||||
* @enablePreview
|
||||
* @requires (((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64")
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @requires vm.gc.Z
|
||||
* @library /test/lib
|
||||
* @library ../
|
||||
@ -61,7 +61,7 @@
|
||||
/*
|
||||
* @test id=shenandoah
|
||||
* @enablePreview
|
||||
* @requires (((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64")
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @library /test/lib
|
||||
* @library ../
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @library /test/lib
|
||||
* @library ../
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* @test id=default_gc
|
||||
* @enablePreview
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @library /test/lib
|
||||
* @library ../
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
@ -42,7 +42,7 @@
|
||||
/*
|
||||
* @test id=zgc
|
||||
* @enablePreview
|
||||
* @requires (((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64")
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @requires vm.gc.Z
|
||||
* @library /test/lib
|
||||
* @library ../
|
||||
@ -61,7 +61,7 @@
|
||||
/*
|
||||
* @test id=shenandoah
|
||||
* @enablePreview
|
||||
* @requires (((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64")
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @requires vm.gc.Shenandoah
|
||||
* @library /test/lib
|
||||
* @library ../
|
||||
|
@ -25,7 +25,7 @@
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @library ../ /test/lib
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @run testng/othervm --enable-native-access=ALL-UNNAMED TestTrivial
|
||||
*/
|
||||
|
||||
|
@ -25,8 +25,8 @@
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @library ../ /test/lib
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires vm.flavor != "zero"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @requires jdk.foreign.linker != "FALLBACK"
|
||||
* @run testng/othervm --enable-native-access=ALL-UNNAMED TestTrivialUpcall
|
||||
*/
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
* @test id=default_gc
|
||||
* @enablePreview
|
||||
* @bug 8277602
|
||||
* @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @library /test/lib
|
||||
* @library ../
|
||||
* @build jdk.test.whitebox.WhiteBox
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* @test
|
||||
* @enablePreview
|
||||
* @requires os.arch=="amd64" | os.arch=="x86_64" | os.arch=="aarch64" | os.arch=="riscv64"
|
||||
* @requires jdk.foreign.linker != "UNSUPPORTED"
|
||||
* @library ../
|
||||
* @run testng/othervm
|
||||
* --enable-native-access=ALL-UNNAMED
|
||||
|
@ -47,6 +47,8 @@ import java.util.function.Supplier;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import jdk.internal.foreign.CABI;
|
||||
|
||||
import jdk.test.whitebox.code.Compiler;
|
||||
import jdk.test.whitebox.cpuinfo.CPUInfo;
|
||||
import jdk.test.whitebox.gc.GC;
|
||||
@ -126,6 +128,7 @@ public class VMProps implements Callable<Map<String, String>> {
|
||||
map.put("release.implementor", this::implementor);
|
||||
map.put("jdk.containerized", this::jdkContainerized);
|
||||
map.put("vm.flagless", this::isFlagless);
|
||||
map.put("jdk.foreign.linker", this::jdkForeignLinker);
|
||||
vmGC(map); // vm.gc.X = true/false
|
||||
vmGCforCDS(map); // may set vm.gc
|
||||
vmOptFinalFlags(map);
|
||||
@ -472,7 +475,7 @@ public class VMProps implements Callable<Map<String, String>> {
|
||||
return "" + Compiler.isC2Enabled();
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* A simple check for docker support
|
||||
*
|
||||
* @return true if docker is supported in a given environment
|
||||
@ -652,6 +655,17 @@ public class VMProps implements Callable<Map<String, String>> {
|
||||
return "" + result;
|
||||
}
|
||||
|
||||
/*
|
||||
* A string indicating the foreign linker that is currently being used. See jdk.internal.foreign.CABI
|
||||
* for valid values.
|
||||
*
|
||||
* "FALLBACK" and "UNSUPPORTED" are special values. The former indicates the fallback linker is
|
||||
* being used. The latter indicates an unsupported platform.
|
||||
*/
|
||||
private String jdkForeignLinker() {
|
||||
return String.valueOf(CABI.current());
|
||||
}
|
||||
|
||||
/**
|
||||
* Dumps the map to the file if the file name is given as the property.
|
||||
* This functionality could be helpful to know context in the real
|
||||
|
@ -37,6 +37,9 @@ requires.extraPropDefns.bootlibs = ../lib/jdk/test/whitebox
|
||||
requires.extraPropDefns.libs = \
|
||||
../lib/jdk/test/lib/Platform.java \
|
||||
../lib/jdk/test/lib/Container.java
|
||||
requires.extraPropDefns.vmOpts = -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||
requires.extraPropDefns.javacOpts = --add-exports java.base/jdk.internal.foreign=ALL-UNNAMED
|
||||
requires.extraPropDefns.vmOpts = \
|
||||
-XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI \
|
||||
--add-exports java.base/jdk.internal.foreign=ALL-UNNAMED
|
||||
requires.properties= \
|
||||
vm.continuations
|
||||
|
Loading…
Reference in New Issue
Block a user