Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6410440

JAVAWS does not produce "##TCKHarnesRun##" output anymore

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P1 P1
    • 6
    • 6
    • deploy
    • b85
    • generic
    • generic
    • Verified

      TCK : TCK JNLP 1.5 FCS
      J2SE : FAIL - mustang b74+
                       PASS - mustang b73
      Platform[s] : FAIL - tested on Windows Vista 32 bit 5308, SUSE9.3 x86, Solaris 10 AMD64

      Most of JNLP TCK 1.5 tests fail since b74. JNLP TCK requires ##TCKHarnesRun## output to work properly. Javaws stopped producing it since b74. Most of tests fail with "result: Failed. The jnlp client exit code is -2" (see attached jtr)

      For information on how TCK is using ##TCKHarnesRun## output see JNLPProcess.java (attached).

      Here is excerpt from JNLPProcess.java of JNLP TCK 1.5 explaining how ##TCKHarnesRun## output is used

      ===========================================================================
          //From com.sun.jnet.debug.Debug
          public static final String TCK_PREAMBLE = "##TCKHarnesRun##";
          
          //Status codes we interpret.
          static public final String JNLP_FAILED = "FAILED";
          static public final String JNLP_SUCCESS = "SUCCESS";
          static public final String JNLP_RUNNING = "RUNNING";

          ...

          private Hashtable _status = new Hashtable();

          ...

          private synchronized String setState(String msg) {

              ...

      if (key != null && value != null) {
      _status.put(key, value);
      return key;
      }
      return null;
          }
          
          private synchronized void setState(String key, String state) {
      _status.put(key,state);
          }

          ...


          synchronized public int waitFor() {
      int exitCode = 1;
      do {
      try {
      wait(1000*2);
      } catch (InterruptedException ie) {
      exitCode = -2;
      }
      dprintln("_status="+_status.toString());

      if (_status.containsValue(JNLP_SUCCESS)) {
      exitCode = 0;
      }

      if (_status.containsValue(JNLP_FAILED)) {
      exitCode = -1;
      }
      } while (exitCode == 1);

              destroy();
              return exitCode;

          }

          ...

          class SockRdrThr extends Thread{

              ...

      public void run() {

              ...

      if (msg.startsWith(TCK_PREAMBLE)) {
      procHash = setState(msg);

              ...
                  

      //If we get here then the socket writer has
      //closed the connection, we now see and act upon
      //the last message the writer sent.
      if (procHash != null) {

              ...
                  
      setState(procHash, JNLP_SUCCESS);

              ...
                  
      setState(procHash, JNLP_SUCCESS);

              ...
                  
      setState(procHash,JNLP_RUNNING);
      }

              ...

      }
          }
      ===========================================================================

      Due to absence of ##TCKHarnesRun## output JNLPProcess waitFor() never ends until it is interrupted (see above). So waitFor() always returns -2. So test will be treated as failed even if it passed because TCK does not know it. See b74.log, b74.trace and b73.log, b73.trace (all atatched) to find out difference in output produced by Javaws.

      Javaws ##TCKHarnesRun## output in b74+ must be fixed to be JNLP TCK 1.5 compatible.

      How to reproduce:
      =================
      Run JNLP TCK 1.5 (/java/re/jnlp_tck/1.5.0/archive/fcs/)

            ngthomas Thomas Ng (Inactive)
            idergali Ilya Dergalin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: