The fixes here are restoring Solaris and SPARC functionality to the test
suite. It would be nice to be complete, but that isn't true yet.

--- jdk23u-jdk-23.0.1-ga/test/lib/jdk/test/lib/Platform.java.orig
+++ jdk23u-jdk-23.0.1-ga/test/lib/jdk/test/lib/Platform.java
@@ -129,6 +129,10 @@
         return isOs("mac");
     }
 
+    public static boolean isSolaris() {
+        return isOs("sunos");
+    }
+
     public static boolean isWindows() {
         return isOs("win");
     }
@@ -224,6 +228,11 @@
         return isArch("s390.*") || isArch("s/390.*") || isArch("zArch_64");
     }
 
+    // Returns true for sparc and sparcv9.
+    public static boolean isSparc() {
+        return isArch("sparc.*");
+    }
+
     public static boolean isX64() {
         // On OSX it's 'x86_64' and on other (Linux and Windows) platforms it's 'amd64'
         return isArch("(amd64)|(x86_64)");
@@ -252,6 +261,8 @@
         }
         if (isAix()) {
             return false; // SA not implemented.
+        } else if (isSolaris()) {
+            return false; // Testing disabled due to JDK-8193639.
         } else if (isLinux()) {
             if (isS390x() || isARM()) {
                 return false; // SA not implemented.
@@ -461,6 +472,7 @@
                 isServer() &&
                 (isLinux()   ||
                  isOSX()     ||
+                 isSolaris() ||
                  isWindows()) &&
                 !isZero()    &&
                 !isMinimal() &&
@@ -471,7 +483,7 @@
      * This should match the #if condition in ClassListParser::load_class_from_source().
      */
     public static boolean areCustomLoadersSupportedForCDS() {
-        return (is64bit() && (isLinux() || isOSX() || isWindows()));
+        return (is64bit() && (isLinux() || isSolaris() || isOSX() || isWindows()));
     }
 
     /**
--- jdk23u-jdk-23.0.1-ga/test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java.orig
+++ jdk23u-jdk-23.0.1-ga/test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java
@@ -45,9 +45,9 @@
  */
 public class TestMutuallyExclusivePlatformPredicates {
     private static enum MethodGroup {
-        ARCH("isAArch64", "isARM", "isRISCV64", "isPPC", "isS390x", "isX64", "isX86"),
+        ARCH("isAArch64", "isARM", "isRISCV64", "isPPC", "isS390x", "isSparc", "isX64", "isX86"),
         BITNESS("is32bit", "is64bit"),
-        OS("isAix", "isLinux", "isOSX", "isWindows"),
+        OS("isAix", "isLinux", "isOSX", "isSolaris", "isWindows"),
         VM_TYPE("isClient", "isServer", "isMinimal", "isZero", "isEmbedded"),
         MODE("isInt", "isMixed", "isComp"),
         IGNORED("isEmulatedClient", "isDebugBuild", "isFastDebugBuild", "isMusl",
--- jdk23u-jdk-23.0.1-ga/test/jdk/java/lang/ProcessBuilder/DestroyTest.java.orig
+++ jdk23u-jdk-23.0.1-ga/test/jdk/java/lang/ProcessBuilder/DestroyTest.java
@@ -113,6 +113,7 @@
             File tempFile = File.createTempFile("ProcessTrap-", ".sh", userDir);
             if (osName.startsWith("Linux")
                     || osName.startsWith("Mac OS")
+                    || osName.equals("SunOS")
                     || osName.equals("AIX")) {
                 return new UnixTest(tempFile);
             }
--- jdk23u-jdk-23.0.1-ga/test/jdk/java/lang/RuntimeTests/exec/ExitValue.java.orig
+++ jdk23u-jdk-23.0.1-ga/test/jdk/java/lang/RuntimeTests/exec/ExitValue.java
@@ -97,7 +97,7 @@
 
         checkPosixShellExitValue("exit 7", 7);
 
-        int sigoffset = 128;
+        int sigoffset = UnixCommands.isSunOS ? 0 : 128;
         checkPosixShellExitValue(UnixCommands.kill() + " -9 $$", sigoffset+9);
     }
 
--- jdk23u-jdk-23.0.1-ga/test/jdk/java/lang/RuntimeTests/exec/UnixCommands.java.orig
+++ jdk23u-jdk-23.0.1-ga/test/jdk/java/lang/RuntimeTests/exec/UnixCommands.java
@@ -32,6 +32,7 @@
 
     public static final boolean isUnix = ! System.getProperty("os.name").startsWith("Windows");
     public static final boolean isLinux = System.getProperty("os.name").startsWith("Linux");
+    public static final boolean isSunOS = System.getProperty("os.name").equals("SunOS");
 
     private static final String[] paths = {"/bin", "/usr/bin"};
 
--- jdk23u-jdk-23.0.1-ga/test/hotspot/jtreg/runtime/jni/terminatedThread/TestTerminatedThread.java.orig
+++ jdk23u-jdk-23.0.1-ga/test/hotspot/jtreg/runtime/jni/terminatedThread/TestTerminatedThread.java
@@ -25,14 +25,17 @@
 /*
  * @test
  * @bug     8205878 8206954
- * @requires os.family != "windows"
+ * @requires os.family != "windows" & os.family != "solaris"
  * @comment Calling pthread_getcpuclockid() with invalid pid leads to undefined
  * behavior in musl libc (see 8240187).
  * @requires !vm.musl
  * @library /testlibrary
  * @summary Basic test of Thread and ThreadMXBean queries on a natively
  *          attached thread that has failed to detach before terminating.
- * @comment The native code only supports POSIX so no windows testing
+ * @comment The native code only supports POSIX so no windows testing; also
+ *          we have to skip solaris as a terminating thread that fails to
+ *          detach will hit an infinite loop due to TLS destructor issues - see
+ *          comments in JDK-8156708
  * @run main/othervm/native TestTerminatedThread
  */
 
--- jdk23u-jdk-23.0.1-ga/test/hotspot/jtreg/runtime/NMT/CheckForProperDetailStackTrace.java.orig
+++ jdk23u-jdk-23.0.1-ga/test/hotspot/jtreg/runtime/NMT/CheckForProperDetailStackTrace.java
@@ -109,7 +109,7 @@
         // We check for that here, but allow it for Aix and Windows slowdebug builds
         // because the compiler ends up not inlining AllocateHeap.
         Boolean okToHaveAllocateHeap = Platform.isSlowDebugBuild() &&
-                                       (Platform.isAix() || Platform.isWindows());
+                                       (Platform.isAix() || Platform.isSolaris() || Platform.isWindows());
         if (!okToHaveAllocateHeap) {
             output.shouldNotContain("AllocateHeap");
         }
--- jdk23u-jdk-23.0.1-ga/test/hotspot/jtreg/runtime/ReservedStack/ReservedStackTest.java.orig
+++ jdk23u-jdk-23.0.1-ga/test/hotspot/jtreg/runtime/ReservedStack/ReservedStackTest.java
@@ -241,6 +241,7 @@
             (Platform.isLinux() &&
              (Platform.isPPC() || Platform.isS390x() || Platform.isX64() ||
               Platform.isX86() || Platform.isAArch64() || Platform.isRISCV64())) ||
+            Platform.isSolaris() ||
             Platform.isOSX();
     }
 
--- jdk23u-jdk-23.0.1-ga/test/jdk/java/security/Security/ClassLoaderDeadlock/Deadlock.sh.orig
+++ jdk23u-jdk-23.0.1-ga/test/jdk/java/security/Security/ClassLoaderDeadlock/Deadlock.sh
@@ -34,6 +34,10 @@
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
+  SunOS )
+    PATHSEP=":"
+    FILESEP="/"
+    ;;
   Linux )
     PATHSEP=":"
     FILESEP="/"
--- jdk23u-jdk-23.0.1-ga/test/jdk/java/security/Security/ClassLoaderDeadlock/ClassLoaderDeadlock.sh.orig
+++ jdk23u-jdk-23.0.1-ga/test/jdk/java/security/Security/ClassLoaderDeadlock/ClassLoaderDeadlock.sh
@@ -50,6 +50,10 @@
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
+  SunOS )
+    PATHSEP=":"
+    FILESEP="/"
+    ;;
   Linux )
     PATHSEP=":"
     FILESEP="/"
--- jdk23u-jdk-23.0.1-ga/test/jdk/sun/security/krb5/runNameEquals.sh.orig
+++ jdk23u-jdk-23.0.1-ga/test/jdk/sun/security/krb5/runNameEquals.sh
@@ -52,7 +52,7 @@
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
-  Linux | Darwin )
+  SunOS | Linux | Darwin )
     PATHSEP=":"
     FILESEP="/"
     NATIVE=true
--- jdk23u-jdk-23.0.1-ga/test/jdk/sun/security/provider/PolicyFile/getinstance/getinstance.sh.orig
+++ jdk23u-jdk-23.0.1-ga/test/jdk/sun/security/provider/PolicyFile/getinstance/getinstance.sh
@@ -51,6 +51,10 @@
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
+  SunOS )
+    PS=":"
+    FS="/"
+    ;;
   Linux )
     PS=":"
     FS="/"
--- jdk23u-jdk-23.0.1-ga/test/jdk/sun/security/ssl/SSLSocketImpl/NotifyHandshakeTest.sh.orig
+++ jdk23u-jdk-23.0.1-ga/test/jdk/sun/security/ssl/SSLSocketImpl/NotifyHandshakeTest.sh
@@ -46,7 +46,7 @@
 
 OS=`uname -s`
 case "$OS" in
-    Linux | Darwin | AIX )
+    SunOS | Linux | Darwin | AIX )
         FILESEP="/"
         PATHSEP=":"
         ;;
--- jdk23u-jdk-23.0.1-ga/test/jdk/sun/security/pkcs11/Provider/MultipleLogins.sh.orig
+++ jdk23u-jdk-23.0.1-ga/test/jdk/sun/security/pkcs11/Provider/MultipleLogins.sh
@@ -57,6 +57,12 @@
 
 OS=`uname -s`
 case "$OS" in
+  SunOS )
+    FS="/"
+    PS=":"
+    CP="${FS}bin${FS}cp"
+    CHMOD="${FS}bin${FS}chmod"
+    ;;
   Linux )
     FS="/"
     PS=":"
--- jdk23u-jdk-23.0.1-ga/test/jdk/jdk/internal/util/OSTest.java.orig
+++ jdk23u-jdk-23.0.1-ga/test/jdk/jdk/internal/util/OSTest.java
@@ -30,6 +30,7 @@
 import static jdk.internal.util.OperatingSystem.AIX;
 import static jdk.internal.util.OperatingSystem.LINUX;
 import static jdk.internal.util.OperatingSystem.MACOS;
+import static jdk.internal.util.OperatingSystem.SOLARIS;
 import static jdk.internal.util.OperatingSystem.WINDOWS;
 
 import jdk.internal.util.StaticProperty;
@@ -60,6 +61,7 @@
             case "win" -> WINDOWS;
             case "lin" -> LINUX;
             case "mac" -> MACOS;
+            case "sun" -> SOLARIS;
             case "aix" -> AIX;
             default    -> fail("Unknown os.name: " + osName);
         };
@@ -75,6 +77,7 @@
                 Arguments.of(LINUX, OperatingSystem.isLinux()),
                 Arguments.of(WINDOWS, OperatingSystem.isWindows()),
                 Arguments.of(MACOS, OperatingSystem.isMacOS()),
+                Arguments.of(SOLARIS, OperatingSystem.isSolaris()),
                 Arguments.of(AIX, OperatingSystem.isAix())
         );
     }
