diff --git a/test/Makefile b/test/Makefile index b6fee3c59e227a44e0d143b72e9c2a99d357e0d7..25f0dc1ed6fcb3b32e218d4eda4a2fa2f462e4d3 100644 --- a/test/Makefile +++ b/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/test/ProblemList.txt b/test/ProblemList.txt index 1867d67a21860f376ec818b6c13b996778178621..f145a246fc7ed237ca96f3727f086f3f7c567a6e 100644 --- a/test/ProblemList.txt +++ b/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/test/com/sun/jdi/BadHandshakeTest.java b/test/com/sun/jdi/BadHandshakeTest.java index 6601b427230001d48c2c9737c683a2b7ff8f4059..e03aeb1001c93bed58b16a3f0adab95d62970c1c 100644 --- a/test/com/sun/jdi/BadHandshakeTest.java +++ b/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/test/com/sun/jdi/DoubleAgentTest.java b/test/com/sun/jdi/DoubleAgentTest.java index f76b17c154e193ddc49d68fd74fe1fcf64446d5a..bb06b89b9e2ea408802f2b1330e53f1a57957077 100644 --- a/test/com/sun/jdi/DoubleAgentTest.java +++ b/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/test/com/sun/jdi/ExclusiveBind.java b/test/com/sun/jdi/ExclusiveBind.java index 0f56d072e2d9a6723e2988cb8e77c01206abb308..c3690e62e402231188f50539ca1bb3f4a3d1eeb8 100644 --- a/test/com/sun/jdi/ExclusiveBind.java +++ b/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/test/com/sun/jdi/RunToExit.java b/test/com/sun/jdi/RunToExit.java index 9495e4516693a2121cb733d9ed6d15e02cb6443b..c5f11f724a2f380af27d32d776c9609b833500fd 100644 --- a/test/com/sun/jdi/RunToExit.java +++ b/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/test/com/sun/jdi/connect/spi/SimpleLaunchingConnector.java b/test/com/sun/jdi/connect/spi/SimpleLaunchingConnector.java index 858cbc711870e04b6e44f9c2792a0190bd842941..82bc3b07b9696cbc7a25f4f6b37ee65b608d9e57 100644 --- a/test/com/sun/jdi/connect/spi/SimpleLaunchingConnector.java +++ b/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";