Skip to content

Commit

Permalink
common: Update GraalVM config
Browse files Browse the repository at this point in the history
... and update build-selftest script to include JEP380 tests
  • Loading branch information
kohlschuetter committed Jul 4, 2024
1 parent ce43a46 commit 262827d
Show file tree
Hide file tree
Showing 6 changed files with 178 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@
"name":"org.newsclub.net.unix.NoSuchDeviceSocketException",
"methods":[{"name":"<init>","parameterTypes":["java.lang.String"] }]
},
{
"name":"org.newsclub.net.unix.NotConnectedSocketException",
"methods":[{"name":"<init>","parameterTypes":["java.lang.String"] }]
},
{
"name":"org.newsclub.net.unix.AddressUnavailableSocketException",
"methods":[{"name":"<init>","parameterTypes":["java.lang.String"] }]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,20 @@
"name":"java.net.InetSocketAddress"
},
{
"name":"java.net.UnixDomainSocketAddress"
"name":"java.net.UnixDomainSocketAddress",
"methods":[{"name":"of","parameterTypes":["java.nio.file.Path"] }]
},
{
"name":"java.nio.channels.DatagramChannel",
"methods":[{"name":"open","parameterTypes":["java.net.ProtocolFamily"] }]
},
{
"name":"java.nio.channels.ServerSocketChannel",
"methods":[{"name":"open","parameterTypes":["java.net.ProtocolFamily"] }]
},
{
"name":"java.nio.channels.SocketChannel",
"methods":[{"name":"open","parameterTypes":["java.net.ProtocolFamily"] }]
},
{
"name":"org.newsclub.net.unix.AFSYSTEMSocketAddress",
Expand Down
12 changes: 8 additions & 4 deletions junixsocket-native-graalvm/bin/build-selftest
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,18 @@ else
echo "[WARNING] mysql-connector-j dependency is missing: $mysqlDep" >&2
fi

selftestArgs=(
-Dselftest.enable-module.junixsocket-common.JavaInet=true
-Dselftest.enable-module.junixsocket-common.JEP380=true
-cp "$jar":"$mysqlDep"
)

echo
echo Running junixsocket-selftest with GraalVM native-image-agent...
(
set -x
java -agentlib:native-image-agent=config-output-dir=${tmpDir}/native-image.{pid} \
-Dselftest.enable-module.junixsocket-common.JavaInet=true \
-cp "$jar":"$mysqlDep" org.newsclub.net.unix.selftest.Selftest >/dev/null
${selftestArgs[@]} org.newsclub.net.unix.selftest.Selftest >/dev/null
)

if [[ $? -ne 0 ]]; then
Expand All @@ -120,8 +125,7 @@ echo Running native-image...
(
set -x
native-image -cp "$tmpDir" --initialize-at-build-time=sun.rmi.transport.GC --report-unsupported-elements-at-runtime --no-fallback \
-Dselftest.enable-module.junixsocket-common.JavaInet=true \
-cp "$jar":"$mysqlDep" org.newsclub.net.unix.selftest.Selftest
${selftestArgs[@]} org.newsclub.net.unix.selftest.Selftest
)
if [[ $? -ne 0 ]]; then
echo "Error: Failed to run native-image" >&2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@
"name":"org.newsclub.net.unix.NoSuchDeviceSocketException",
"methods":[{"name":"<init>","parameterTypes":["java.lang.String"] }]
},
{
"name":"org.newsclub.net.unix.NotConnectedSocketException",
"methods":[{"name":"<init>","parameterTypes":["java.lang.String"] }]
},
{
"name":"org.newsclub.net.unix.OperationNotSupportedSocketException",
"methods":[{"name":"<init>","parameterTypes":["java.lang.String"] }]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,20 @@
"name":"java.net.InetSocketAddress"
},
{
"name":"java.net.UnixDomainSocketAddress"
"name":"java.net.UnixDomainSocketAddress",
"methods":[{"name":"of","parameterTypes":["java.nio.file.Path"] }]
},
{
"name":"java.nio.channels.DatagramChannel",
"methods":[{"name":"open","parameterTypes":["java.net.ProtocolFamily"] }]
},
{
"name":"java.nio.channels.ServerSocketChannel",
"methods":[{"name":"open","parameterTypes":["java.net.ProtocolFamily"] }]
},
{
"name":"java.nio.channels.SocketChannel",
"methods":[{"name":"open","parameterTypes":["java.net.ProtocolFamily"] }]
},
{
"name":"java.nio.channels.spi.AbstractSelectableChannel"
Expand Down Expand Up @@ -316,6 +329,10 @@
"name":"org.junit.jupiter.api.Test",
"queryAllPublicMethods":true
},
{
"name":"org.junit.jupiter.api.TestInstance",
"queryAllPublicMethods":true
},
{
"name":"org.junit.jupiter.api.TestMethodOrder",
"queryAllPublicMethods":true
Expand Down Expand Up @@ -367,6 +384,16 @@
"name":"org.junit.jupiter.params.provider.EnumSource",
"queryAllPublicMethods":true
},
{
"name":"org.junit.jupiter.params.provider.MethodArgumentsProvider",
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"org.junit.jupiter.params.provider.MethodSource",
"queryAllPublicMethods":true
},
{
"name":"org.junit.jupiter.params.support.AnnotationConsumer",
"queryAllPublicMethods":true
Expand Down Expand Up @@ -573,6 +600,14 @@
"queryAllDeclaredConstructors":true,
"methods":[{"name":"<init>","parameterTypes":[] }, {"name":"testFromToBytes","parameterTypes":[] }, {"name":"testHostnameString","parameterTypes":[] }, {"name":"testHostnameStringEndsWithJunixSocket","parameterTypes":[] }, {"name":"testIsLoopbackAddress","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.InterruptIssue158Test",
"allDeclaredFields":true,
"allDeclaredClasses":true,
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"methods":[{"name":"afterEach","parameterTypes":[] }, {"name":"beforeEach","parameterTypes":["org.junit.jupiter.api.TestInfo"] }, {"name":"clientProvider","parameterTypes":[] }, {"name":"serverProvider","parameterTypes":[] }, {"name":"testClientInterruption","parameterTypes":["boolean","org.newsclub.net.unix.InterruptIssue158Test$IOSupplier","org.newsclub.net.unix.InterruptIssue158Test$IOConsumer","java.lang.Class","java.util.function.Predicate"] }, {"name":"testClientInterruptionWithDelay","parameterTypes":["boolean","org.newsclub.net.unix.InterruptIssue158Test$IOSupplier","org.newsclub.net.unix.InterruptIssue158Test$IOConsumer","java.lang.Class","java.util.function.Predicate"] }, {"name":"testServerInterruption","parameterTypes":["org.newsclub.net.unix.InterruptIssue158Test$IOSupplier","org.newsclub.net.unix.InterruptIssue158Test$IOConsumer","java.lang.Class","java.util.function.Predicate"] }, {"name":"testServerInterruptionWithDelay","parameterTypes":["org.newsclub.net.unix.InterruptIssue158Test$IOSupplier","org.newsclub.net.unix.InterruptIssue158Test$IOConsumer","java.lang.Class","java.util.function.Predicate"] }]
},
{
"name":"org.newsclub.net.unix.InterruptTest",
"allDeclaredFields":true,
Expand Down Expand Up @@ -656,7 +691,7 @@
"allDeclaredClasses":true,
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"methods":[{"name":"testByteBufferWithPositionOffset","parameterTypes":[] }, {"name":"testDoubleBindAddressNotReusable","parameterTypes":[] }, {"name":"testDoubleBindAddressReusable","parameterTypes":[] }, {"name":"testNonBlockingConnect","parameterTypes":[] }]
"methods":[{"name":"testAcceptNotBoundYet","parameterTypes":[] }, {"name":"testByteBufferWithPositionOffset","parameterTypes":[] }, {"name":"testDoubleBindAddressNotReusable","parameterTypes":[] }, {"name":"testDoubleBindAddressReusable","parameterTypes":[] }, {"name":"testNonBlockingConnect","parameterTypes":[] }, {"name":"testReadNotConnectedYet","parameterTypes":[] }, {"name":"testWriteNotConnectedYet","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.SocketClosedException"
Expand Down Expand Up @@ -817,6 +852,15 @@
"queryAllDeclaredConstructors":true,
"methods":[{"name":"<init>","parameterTypes":[] }, {"name":"testAncillaryReceiveBufferTooSmall","parameterTypes":[] }, {"name":"testBadFileDescriptor","parameterTypes":[] }, {"name":"testDatagramSocket","parameterTypes":[] }, {"name":"testEmptyFileDescriptorArray","parameterTypes":[] }, {"name":"testFileInputStream","parameterTypes":[] }, {"name":"testFileInputStreamPartiallyConsumed","parameterTypes":[] }, {"name":"testNoAncillaryReceiveBuffer","parameterTypes":[] }, {"name":"testNullFileDescriptorArray","parameterTypes":[] }, {"name":"testSendRecvFileDescriptors","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.domain.InterruptIssue158Test",
"allDeclaredFields":true,
"allDeclaredClasses":true,
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"queryAllDeclaredConstructors":true,
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.domain.InterruptTest",
"allDeclaredFields":true,
Expand Down Expand Up @@ -905,7 +949,7 @@
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"queryAllDeclaredConstructors":true,
"methods":[{"name":"<init>","parameterTypes":[] }]
"methods":[{"name":"<init>","parameterTypes":[] }, {"name":"testUnixDomainProtocolFamily","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.domain.SocketFactoryTest",
Expand Down Expand Up @@ -981,6 +1025,15 @@
{
"name":"org.newsclub.net.unix.generic.AFGenericSelectorProvider"
},
{
"name":"org.newsclub.net.unix.java.InterruptIssue158Test",
"allDeclaredFields":true,
"allDeclaredClasses":true,
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"queryAllDeclaredConstructors":true,
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.java.InterruptTest",
"allDeclaredFields":true,
Expand All @@ -1007,6 +1060,15 @@
"queryAllDeclaredConstructors":true,
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.java.SocketChannelTest",
"allDeclaredFields":true,
"allDeclaredClasses":true,
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"queryAllDeclaredConstructors":true,
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.java.ThroughputTest",
"allDeclaredFields":true,
Expand All @@ -1016,6 +1078,24 @@
"queryAllDeclaredConstructors":true,
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.jep380.InterruptIssue158Test",
"allDeclaredFields":true,
"allDeclaredClasses":true,
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"queryAllDeclaredConstructors":true,
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.jep380.SocketChannelTest",
"allDeclaredFields":true,
"allDeclaredClasses":true,
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"queryAllDeclaredConstructors":true,
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"org.newsclub.net.unix.rmi.AFRMIService",
"queryAllPublicMethods":true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@
"name":"org.junit.jupiter.api.Test",
"queryAllPublicMethods":true
},
{
"name":"org.junit.jupiter.api.TestInstance",
"queryAllPublicMethods":true
},
{
"name":"org.junit.jupiter.api.TestMethodOrder",
"queryAllPublicMethods":true
Expand Down Expand Up @@ -530,6 +534,15 @@
"allPublicMethods":true,
"allDeclaredConstructors":true
},
{
"name":"org.newsclub.net.unix.java.SocketChannelTest",
"allDeclaredMethods":true,
"allDeclaredFields":true,
"allDeclaredClasses":true,
"queryAllDeclaredMethods":true,
"allPublicMethods":true,
"allDeclaredConstructors":true
},
{
"name":"org.newsclub.net.unix.java.ThroughputTest",
"allDeclaredFields":true,
Expand All @@ -538,6 +551,15 @@
"allPublicMethods":true,
"allDeclaredConstructors":true
},
{
"name":"org.newsclub.net.unix.jep380.SocketChannelTest",
"allDeclaredMethods":true,
"allDeclaredFields":true,
"allDeclaredClasses":true,
"queryAllDeclaredMethods":true,
"allPublicMethods":true,
"allDeclaredConstructors":true
},
{
"name":"org.newsclub.net.unix.java.JavaInetStackCondition",
"methods":[{"name":"<init>","parameterTypes":[] }]
Expand Down Expand Up @@ -1039,6 +1061,16 @@
"name":"org.junit.jupiter.params.provider.EnumSource",
"queryAllPublicMethods":true
},
{
"name":"org.junit.jupiter.params.provider.MethodArgumentsProvider",
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"org.junit.jupiter.params.provider.MethodSource",
"queryAllPublicMethods":true
},
{
"name":"org.junit.jupiter.params.support.AnnotationConsumer",
"queryAllPublicMethods":true
Expand Down Expand Up @@ -1071,6 +1103,39 @@
"queryAllPublicMethods":true,
"queryAllDeclaredConstructors":true
},
{
"name":"org.newsclub.net.unix.InterruptIssue158Test",
"allDeclaredConstructors" : true,
"allPublicConstructors" : true,
"allDeclaredMethods":true,
"allDeclaredFields":true,
"allDeclaredClasses":true,
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"queryAllDeclaredConstructors":true
},
{
"name":"org.newsclub.net.unix.domain.InterruptIssue158Test",
"allDeclaredConstructors" : true,
"allPublicConstructors" : true,
"allDeclaredMethods":true,
"allDeclaredFields":true,
"allDeclaredClasses":true,
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"queryAllDeclaredConstructors":true
},
{
"name":"org.newsclub.net.unix.jep380.InterruptIssue158Test",
"allDeclaredConstructors" : true,
"allPublicConstructors" : true,
"allDeclaredMethods":true,
"allDeclaredFields":true,
"allDeclaredClasses":true,
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"queryAllDeclaredConstructors":true
},
{
"name":"org.newsclub.net.unix.rmi.NaiveFileInputStreamRemote",
"allDeclaredConstructors" : true,
Expand Down

0 comments on commit 262827d

Please sign in to comment.