changeset 1947:44ad385143a8

6905705: Fix broken exit code values in jdk/test/Makefile Reviewed-by: tbell
author ohair
date Tue, 01 Dec 2009 08:51:16 -0800
parents 026e0baaef90
children f07f6eb5d597
files test/Makefile test/ProblemList.txt test/com/sun/jdi/BadHandshakeTest.java test/com/sun/jdi/DoubleAgentTest.java test/com/sun/jdi/ExclusiveBind.java test/com/sun/jdi/RunToExit.java test/com/sun/jdi/connect/spi/SimpleLaunchingConnector.java
diffstat 7 files changed, 48 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/test/Makefile	Mon Nov 30 14:15:15 2009 -0800
+++ b/test/Makefile	Tue Dec 01 08:51:16 2009 -0800
@@ -282,11 +282,23 @@
 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 @@
       $(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 @@
     $(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_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
 
--- a/test/ProblemList.txt	Mon Nov 30 14:15:15 2009 -0800
+++ b/test/ProblemList.txt	Tue Dec 01 08:51:16 2009 -0800
@@ -893,6 +893,10 @@
 
 # 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-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
 
--- a/test/com/sun/jdi/BadHandshakeTest.java	Mon Nov 30 14:15:15 2009 -0800
+++ b/test/com/sun/jdi/BadHandshakeTest.java	Tue Dec 01 08:51:16 2009 -0800
@@ -110,9 +110,10 @@
         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";
--- a/test/com/sun/jdi/DoubleAgentTest.java	Mon Nov 30 14:15:15 2009 -0800
+++ b/test/com/sun/jdi/DoubleAgentTest.java	Tue Dec 01 08:51:16 2009 -0800
@@ -92,9 +92,10 @@
         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";
--- a/test/com/sun/jdi/ExclusiveBind.java	Mon Nov 30 14:15:15 2009 -0800
+++ b/test/com/sun/jdi/ExclusiveBind.java	Tue Dec 01 08:51:16 2009 -0800
@@ -99,9 +99,10 @@
         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";
--- a/test/com/sun/jdi/RunToExit.java	Mon Nov 30 14:15:15 2009 -0800
+++ b/test/com/sun/jdi/RunToExit.java	Tue Dec 01 08:51:16 2009 -0800
@@ -115,9 +115,10 @@
         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";
--- a/test/com/sun/jdi/connect/spi/SimpleLaunchingConnector.java	Mon Nov 30 14:15:15 2009 -0800
+++ b/test/com/sun/jdi/connect/spi/SimpleLaunchingConnector.java	Tue Dec 01 08:51:16 2009 -0800
@@ -145,9 +145,10 @@
         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";