diff --git a/jdk/test/Makefile b/jdk/test/Makefile index b6fee3c59e2..25f0dc1ed6f 100644 --- a/jdk/test/Makefile +++ b/jdk/test/Makefile @@ -282,11 +282,23 @@ STATS_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/$(STATS_TXT_NAME) RUNLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/runlist.txt PASSLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/passlist.txt FAILLIST = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/faillist.txt +EXITCODE = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/exitcode.txt + +TESTEXIT = \ + if [ ! -s $(EXITCODE) ] ; then \ + $(ECHO) "ERROR: EXITCODE file not filled in."; \ + $(ECHO) "1" > $(EXITCODE); \ + fi ; \ + testExitCode=`$(CAT) $(EXITCODE)`; \ + $(ECHO) "EXIT CODE: $${testExitCode}"; \ + exit ${testExitCode} + BUNDLE_UP_AND_EXIT = \ ( \ - exitCode=$$? && \ + jtregExitCode=$$? && \ _summary="$(SUMMARY_TXT)"; \ - $(RM) -f $(STATS_TXT) $(RUNLIST) $(PASSLIST) $(FAILLIST); \ + $(RM) -f $(STATS_TXT) $(RUNLIST) $(PASSLIST) $(FAILLIST) $(EXITCODE); \ + $(ECHO) "$${jtregExitCode}" > $(EXITCODE); \ if [ -r "$${_summary}" ] ; then \ $(ECHO) "Summary: $${_summary}" > $(STATS_TXT); \ $(EXPAND) $${_summary} | $(EGREP) -v ' Not run\.' > $(RUNLIST); \ @@ -297,10 +309,13 @@ BUNDLE_UP_AND_EXIT = \ $(EGREP) ' Error\.' $(RUNLIST); \ $(EGREP) -v ' Passed\.' $(RUNLIST) ) \ | $(SORT) | $(UNIQ) > $(FAILLIST); \ - if [ $${exitCode} != 0 -o -s $(FAILLIST) ] ; then \ + if [ $${jtregExitCode} != 0 -o -s $(FAILLIST) ] ; then \ $(EXPAND) $(FAILLIST) \ | $(CUT) -d' ' -f1 \ | $(SED) -e 's@^@FAILED: @' >> $(STATS_TXT); \ + if [ $${jtregExitCode} = 0 ] ; then \ + jtregExitCode=1; \ + fi; \ fi; \ runc="`$(CAT) $(RUNLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \ passc="`$(CAT) $(PASSLIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \ @@ -312,8 +327,8 @@ BUNDLE_UP_AND_EXIT = \ $(ECHO) "Missing file: $${_summary}" >> $(STATS_TXT); \ fi; \ $(CAT) $(STATS_TXT); \ - $(ZIP_UP_RESULTS) && $(KILL_DISPLAY) && \ - exit $${exitCode} \ + $(ZIP_UP_RESULTS) && $(KILL_DISPLAY) ; \ + $(TESTEXIT) \ ) ################################################################ @@ -598,7 +613,7 @@ jtreg_tests: prep $(PRODUCT_HOME) $(JTREG) $(EXCLUDELIST) $(JTREG_TEST_OPTIONS) \ $(TESTDIRS) \ ) ; $(BUNDLE_UP_AND_EXIT) \ - ) 2>&1 | $(TEE) $(ABS_TEST_OUTPUT_DIR)/output.txt + ) 2>&1 | $(TEE) $(ABS_TEST_OUTPUT_DIR)/output.txt ; $(TESTEXIT) PHONY_LIST += jtreg_tests diff --git a/jdk/test/ProblemList.txt b/jdk/test/ProblemList.txt index 1867d67a218..f145a246fc7 100644 --- a/jdk/test/ProblemList.txt +++ b/jdk/test/ProblemList.txt @@ -893,6 +893,10 @@ java/rmi/server/UnicastRemoteObject/unexportObject/UnexportLeak.java generic-all # jdk_security +# Fails on OpenSolaris, IOException: Attempt to obtain kerberos service ticket +# for host/`hostname`@RABBIT.HOLE failed! +sun/security/krb5/auto/SSL.java generic-all + # Run too slow on Solaris 10 sparc sun/security/ssl/com/sun/net/ssl/internal/ssl/InputRecord/SSLSocketTimeoutNulls.java solaris-sparc sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLSocketImpl/ClientTimeout.java solaris-sparc @@ -1099,6 +1103,14 @@ sun/tools/jps/jps-lm.sh generic-all sun/tools/jps/jps-Vvml_2.sh generic-all sun/tools/jps/jps-m_2.sh generic-all +# Fails on OpenSolaris "Could not synchronize with target" +sun/tools/jps/jps-Defaults.sh generic-all +sun/tools/jps/jps-V_2.sh generic-all +sun/tools/jps/jps-Vm_2.sh generic-all +sun/tools/jps/jps-Vvm.sh generic-all +sun/tools/jps/jps-Vvml.sh generic-all +sun/tools/jps/jps-m.sh generic-all + # Server name error, port 2098 problem? sun/tools/jstatd/jstatdServerName.sh generic-all diff --git a/jdk/test/com/sun/jdi/BadHandshakeTest.java b/jdk/test/com/sun/jdi/BadHandshakeTest.java index 6601b427230..e03aeb1001c 100644 --- a/jdk/test/com/sun/jdi/BadHandshakeTest.java +++ b/jdk/test/com/sun/jdi/BadHandshakeTest.java @@ -110,9 +110,10 @@ public class BadHandshakeTest { String exe = System.getProperty("java.home") + File.separator + "bin" + File.separator; String arch = System.getProperty("os.arch"); - if (arch.equals("sparcv9")) { + String osname = System.getProperty("os.name"); + if (osname.equals("SunOS") && arch.equals("sparcv9")) { exe += "sparcv9/java"; - } else if (arch.equals("amd64")) { + } else if (osname.equals("SunOS") && arch.equals("amd64")) { exe += "amd64/java"; } else { exe += "java"; diff --git a/jdk/test/com/sun/jdi/DoubleAgentTest.java b/jdk/test/com/sun/jdi/DoubleAgentTest.java index f76b17c154e..bb06b89b9e2 100644 --- a/jdk/test/com/sun/jdi/DoubleAgentTest.java +++ b/jdk/test/com/sun/jdi/DoubleAgentTest.java @@ -92,9 +92,10 @@ public class DoubleAgentTest { String exe = System.getProperty("java.home") + File.separator + "bin" + File.separator; String arch = System.getProperty("os.arch"); - if (arch.equals("sparcv9")) { + String osname = System.getProperty("os.name"); + if (osname.equals("SunOS") && arch.equals("sparcv9")) { exe += "sparcv9/java"; - } else if (arch.equals("amd64")) { + } else if (osname.equals("SunOS") && arch.equals("amd64")) { exe += "amd64/java"; } else { exe += "java"; diff --git a/jdk/test/com/sun/jdi/ExclusiveBind.java b/jdk/test/com/sun/jdi/ExclusiveBind.java index 0f56d072e2d..c3690e62e40 100644 --- a/jdk/test/com/sun/jdi/ExclusiveBind.java +++ b/jdk/test/com/sun/jdi/ExclusiveBind.java @@ -99,9 +99,10 @@ public class ExclusiveBind { String exe = System.getProperty("java.home") + File.separator + "bin" + File.separator; String arch = System.getProperty("os.arch"); - if (arch.equals("sparcv9")) { + String osname = System.getProperty("os.name"); + if (osname.equals("SunOS") && arch.equals("sparcv9")) { exe += "sparcv9/java"; - } else if (arch.equals("amd64")) { + } else if (osname.equals("SunOS") && arch.equals("amd64")) { exe += "amd64/java"; } else { exe += "java"; diff --git a/jdk/test/com/sun/jdi/RunToExit.java b/jdk/test/com/sun/jdi/RunToExit.java index 9495e451669..c5f11f724a2 100644 --- a/jdk/test/com/sun/jdi/RunToExit.java +++ b/jdk/test/com/sun/jdi/RunToExit.java @@ -115,9 +115,10 @@ public class RunToExit { String exe = System.getProperty("java.home") + File.separator + "bin" + File.separator; String arch = System.getProperty("os.arch"); - if (arch.equals("sparcv9")) { + String osname = System.getProperty("os.name"); + if (osname.equals("SunOS") && arch.equals("sparcv9")) { exe += "sparcv9/java"; - } else if (arch.equals("amd64")) { + } else if (osname.equals("SunOS") && arch.equals("amd64")) { exe += "amd64/java"; } else { exe += "java"; diff --git a/jdk/test/com/sun/jdi/connect/spi/SimpleLaunchingConnector.java b/jdk/test/com/sun/jdi/connect/spi/SimpleLaunchingConnector.java index 858cbc71187..82bc3b07b96 100644 --- a/jdk/test/com/sun/jdi/connect/spi/SimpleLaunchingConnector.java +++ b/jdk/test/com/sun/jdi/connect/spi/SimpleLaunchingConnector.java @@ -145,9 +145,10 @@ public class SimpleLaunchingConnector implements LaunchingConnector { String exe = System.getProperty("java.home") + File.separator + "bin" + File.separator; String arch = System.getProperty("os.arch"); - if (arch.equals("sparcv9")) { + String osname = System.getProperty("os.name"); + if (osname.equals("SunOS") && arch.equals("sparcv9")) { exe += "sparcv9/java"; - } else if (arch.equals("amd64")) { + } else if (osname.equals("SunOS") && arch.equals("amd64")) { exe += "amd64/java"; } else { exe += "java";