gettext: update to 0.23.1
[oi-userland.git] / components / runtime / openjdk-24 / patches / testsuite.patch
blob359e3b5deca1dbc64e0e7edba5668242efcf89bf
1 The fixes here are restoring Solaris and SPARC functionality to the test
2 suite. It would be nice to be complete, but that isn't true yet.
4 --- a/test/lib/jdk/test/lib/Platform.java Wed Sep 15 21:15:33 2021
5 +++ b/test/lib/jdk/test/lib/Platform.java Tue Apr 2 11:22:50 2024
6 @@ -130,6 +130,10 @@
7 return isOs("mac");
10 + public static boolean isSolaris() {
11 + return isOs("sunos");
12 + }
14 public static boolean isWindows() {
15 return isOs("win");
17 @@ -225,6 +229,11 @@
18 return isArch("s390.*") || isArch("s/390.*") || isArch("zArch_64");
21 + // Returns true for sparc and sparcv9.
22 + public static boolean isSparc() {
23 + return isArch("sparc.*");
24 + }
26 public static boolean isX64() {
27 // On OSX it's 'x86_64' and on other (Linux and Windows) platforms it's 'amd64'
28 return isArch("(amd64)|(x86_64)");
29 @@ -253,6 +262,8 @@
31 if (isAix()) {
32 return false; // SA not implemented.
33 + } else if (isSolaris()) {
34 + return false; // Testing disabled due to JDK-8193639.
35 } else if (isLinux()) {
36 if (isS390x() || isARM()) {
37 return false; // SA not implemented.
38 @@ -462,6 +473,7 @@
39 isServer() &&
40 (isLinux() ||
41 isOSX() ||
42 + isSolaris() ||
43 isWindows()) &&
44 !isZero() &&
45 !isMinimal() &&
46 @@ -472,7 +484,7 @@
47 * This should match the #if condition in ClassListParser::load_class_from_source().
49 public static boolean areCustomLoadersSupportedForCDS() {
50 - return (is64bit() && (isLinux() || isOSX() || isWindows()));
51 + return (is64bit() && (isLinux() || isSolaris() || isOSX() || isWindows()));
54 /**
55 --- a/test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java Tue Jan 9 21:18:15 2024
56 +++ b/test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java Tue Apr 2 11:28:16 2024
57 @@ -45,9 +45,9 @@
59 public class TestMutuallyExclusivePlatformPredicates {
60 private static enum MethodGroup {
61 - ARCH("isAArch64", "isARM", "isRISCV64", "isPPC", "isS390x", "isX64", "isX86"),
62 + ARCH("isAArch64", "isARM", "isRISCV64", "isPPC", "isS390x", "isSparc", "isX64", "isX86"),
63 BITNESS("is32bit", "is64bit"),
64 - OS("isAix", "isLinux", "isOSX", "isWindows"),
65 + OS("isAix", "isLinux", "isOSX", "isSolaris", "isWindows"),
66 VM_TYPE("isClient", "isServer", "isMinimal", "isZero", "isEmbedded"),
67 MODE("isInt", "isMixed", "isComp"),
68 IGNORED("isEmulatedClient", "isDebugBuild", "isFastDebugBuild", "isMusl",
69 --- a/test/jdk/java/lang/ProcessBuilder/DestroyTest.java Tue Jan 9 21:18:15 2024
70 +++ b/test/jdk/java/lang/ProcessBuilder/DestroyTest.java Tue Apr 2 12:25:30 2024
71 @@ -113,6 +113,7 @@
72 File tempFile = File.createTempFile("ProcessTrap-", ".sh", userDir);
73 if (osName.startsWith("Linux")
74 || osName.startsWith("Mac OS")
75 + || osName.equals("SunOS")
76 || osName.equals("AIX")) {
77 return new UnixTest(tempFile);
79 --- a/test/jdk/java/lang/RuntimeTests/exec/ExitValue.java Tue Jan 9 21:18:15 2024
80 +++ b/test/jdk/java/lang/RuntimeTests/exec/ExitValue.java Tue Apr 2 12:26:47 2024
81 @@ -97,7 +97,7 @@
83 checkPosixShellExitValue("exit 7", 7);
85 - int sigoffset = 128;
86 + int sigoffset = UnixCommands.isSunOS ? 0 : 128;
87 checkPosixShellExitValue(UnixCommands.kill() + " -9 $$", sigoffset+9);
90 --- a/test/jdk/java/lang/RuntimeTests/exec/UnixCommands.java Tue Jan 9 21:18:15 2024
91 +++ b/test/jdk/java/lang/RuntimeTests/exec/UnixCommands.java Tue Apr 2 12:35:44 2024
92 @@ -32,6 +32,7 @@
94 public static final boolean isUnix = ! System.getProperty("os.name").startsWith("Windows");
95 public static final boolean isLinux = System.getProperty("os.name").startsWith("Linux");
96 + public static final boolean isSunOS = System.getProperty("os.name").equals("SunOS");
98 private static final String[] paths = {"/bin", "/usr/bin"};
100 --- a/test/hotspot/jtreg/runtime/jni/terminatedThread/TestTerminatedThread.java Tue Jan 9 21:18:15 2024
101 +++ b/test/hotspot/jtreg/runtime/jni/terminatedThread/TestTerminatedThread.java Tue Apr 2 13:28:55 2024
102 @@ -25,14 +25,17 @@
104 * @test
105 * @bug 8205878 8206954
106 - * @requires os.family != "windows"
107 + * @requires os.family != "windows" & os.family != "solaris"
108 * @comment Calling pthread_getcpuclockid() with invalid pid leads to undefined
109 * behavior in musl libc (see 8240187).
110 * @requires !vm.musl
111 * @library /testlibrary
112 * @summary Basic test of Thread and ThreadMXBean queries on a natively
113 * attached thread that has failed to detach before terminating.
114 - * @comment The native code only supports POSIX so no windows testing
115 + * @comment The native code only supports POSIX so no windows testing; also
116 + * we have to skip solaris as a terminating thread that fails to
117 + * detach will hit an infinite loop due to TLS destructor issues - see
118 + * comments in JDK-8156708
119 * @run main/othervm/native TestTerminatedThread
122 --- a/test/hotspot/jtreg/runtime/NMT/CheckForProperDetailStackTrace.java Tue Jan 9 21:18:15 2024
123 +++ b/test/hotspot/jtreg/runtime/NMT/CheckForProperDetailStackTrace.java Tue Apr 2 13:33:53 2024
124 @@ -111,7 +111,7 @@
125 // We check for that here, but allow it for Aix and Windows slowdebug builds
126 // because the compiler ends up not inlining AllocateHeap.
127 Boolean okToHaveAllocateHeap = Platform.isSlowDebugBuild() &&
128 - (Platform.isAix() || Platform.isWindows());
129 + (Platform.isAix() || Platform.isSolaris() || Platform.isWindows());
130 if (!okToHaveAllocateHeap) {
131 output.shouldNotContain("AllocateHeap");
133 --- a/test/hotspot/jtreg/runtime/ReservedStack/ReservedStackTest.java Tue Jan 9 21:18:15 2024
134 +++ b/test/hotspot/jtreg/runtime/ReservedStack/ReservedStackTest.java Thu Apr 4 10:25:01 2024
135 @@ -241,6 +241,7 @@
136 (Platform.isLinux() &&
137 (Platform.isPPC() || Platform.isS390x() || Platform.isX64() ||
138 Platform.isX86() || Platform.isAArch64() || Platform.isRISCV64())) ||
139 + Platform.isSolaris() ||
140 Platform.isOSX();
143 --- a/test/jdk/java/security/Security/ClassLoaderDeadlock/Deadlock.sh Tue Jan 9 21:18:15 2024
144 +++ b/test/jdk/java/security/Security/ClassLoaderDeadlock/Deadlock.sh Thu Apr 4 11:02:00 2024
145 @@ -34,6 +34,10 @@
146 # set platform-dependent variables
147 OS=`uname -s`
148 case "$OS" in
149 + SunOS )
150 + PATHSEP=":"
151 + FILESEP="/"
152 + ;;
153 Linux )
154 PATHSEP=":"
155 FILESEP="/"
156 --- a/test/jdk/java/security/Security/ClassLoaderDeadlock/ClassLoaderDeadlock.sh Tue Jan 9 21:18:15 2024
157 +++ b/test/jdk/java/security/Security/ClassLoaderDeadlock/ClassLoaderDeadlock.sh Thu Apr 4 11:02:20 2024
158 @@ -50,6 +50,10 @@
159 # set platform-dependent variables
160 OS=`uname -s`
161 case "$OS" in
162 + SunOS )
163 + PATHSEP=":"
164 + FILESEP="/"
165 + ;;
166 Linux )
167 PATHSEP=":"
168 FILESEP="/"
169 --- a/test/jdk/sun/security/krb5/runNameEquals.sh Tue Jan 9 21:18:15 2024
170 +++ b/test/jdk/sun/security/krb5/runNameEquals.sh Thu Apr 4 11:04:28 2024
171 @@ -52,7 +52,7 @@
172 # set platform-dependent variables
173 OS=`uname -s`
174 case "$OS" in
175 - Linux | Darwin )
176 + SunOS | Linux | Darwin )
177 PATHSEP=":"
178 FILESEP="/"
179 NATIVE=true
180 --- a/test/jdk/sun/security/pkcs11/Provider/MultipleLogins.sh Tue Jan 9 21:18:15 2024
181 +++ b/test/jdk/sun/security/pkcs11/Provider/MultipleLogins.sh Thu Apr 4 11:29:40 2024
182 @@ -58,6 +58,12 @@
184 OS=`uname -s`
185 case "$OS" in
186 + SunOS )
187 + FS="/"
188 + PS=":"
189 + CP="${FS}bin${FS}cp"
190 + CHMOD="${FS}bin${FS}chmod"
191 + ;;
192 Linux )
193 FS="/"
194 PS=":"
195 --- a/test/jdk/jdk/internal/util/OSTest.java Mon Apr 8 07:22:11 2024
196 +++ b/test/jdk/jdk/internal/util/OSTest.java Wed Jun 5 20:11:03 2024
197 @@ -30,6 +30,7 @@
198 import static jdk.internal.util.OperatingSystem.AIX;
199 import static jdk.internal.util.OperatingSystem.LINUX;
200 import static jdk.internal.util.OperatingSystem.MACOS;
201 +import static jdk.internal.util.OperatingSystem.SOLARIS;
202 import static jdk.internal.util.OperatingSystem.WINDOWS;
204 import jdk.internal.util.StaticProperty;
205 @@ -60,6 +61,7 @@
206 case "win" -> WINDOWS;
207 case "lin" -> LINUX;
208 case "mac" -> MACOS;
209 + case "sun" -> SOLARIS;
210 case "aix" -> AIX;
211 default -> fail("Unknown os.name: " + osName);
213 @@ -75,6 +77,7 @@
214 Arguments.of(LINUX, OperatingSystem.isLinux()),
215 Arguments.of(WINDOWS, OperatingSystem.isWindows()),
216 Arguments.of(MACOS, OperatingSystem.isMacOS()),
217 + Arguments.of(SOLARIS, OperatingSystem.isSolaris()),
218 Arguments.of(AIX, OperatingSystem.isAix())