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

(ch) Test .../spi/SelectorProvider/inheritedChannel/run_tests.sh throws SocketTimeoutException

XMLWordPrintable

    • x86, sparc
    • linux, solaris_8

      Name: vsR10238 Date: 11/05/2003


      Filed By : J2SE-SQA [###@###.###
      JDK : JDK1.5.0-(b22-b26)
      Testbase : Regression-test
      Platform[s] : Solaris 8 (sparc)
      Falling test[s]:
               java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh

      Regression test java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh fails with
      SocketTimeoutException on slow platforms:

      java.net.SocketTimeoutException
      at sun.nio.ch.DatagramSocketAdaptor.receive(DatagramSocketAdaptor.java:188)

      The test sets the socket timeout to 2000 but it is not enough for slow platforms.

           private static void UDPEchoTest() throws IOException {
      ...
      dc.socket().setSoTimeout(2000);
      dc.socket().receive(pkt2);
      ...
           }

      The test passes with the timeout increased to 5000.

      The test appeared in the test suite starting from 1.5.0-b22 and it fails to compile with JDK1.5.0-b21.


      Test source location:
      =====================
      /java/re/jdk/1.5.0/promoted/all/b26/ws/j2se/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh

      jtr file location:
      ==================
      /net/jtgb4u4c.sfbay/export/sail15/results.2/tiger/b26/regtest/sparc/sol8_sparc_cde_linux-1/workDir/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.jtr

      How to reproduce:
      =================
      Run the following script (you may need to change its variables)

      --- script start ---
      #!/bin/sh
      RESULT_DIR=`pwd`
      WORK_DIR=$RESULT_DIR/workDir/test
      REPORT_DIR=$RESULT_DIR/reportDir

      #Paths in Java Software:
      JT_HOME="/java/re/jct-tools/3.1.2/archive/fcs/binaries"
      JEMMY_JAR="/net/jdk/export/jpse04/Jemmy/jemmy.jar"
      JAVA_HOME="/java/re/jdk/1.5.0/promoted/all/b26/binaries/solaris-sparc"
      TEST_BASE_PATH="/java/re/jdk/1.5.0/promoted/all/b26/ws/j2se/test"

      #Alternative paths outside Java Software:
      #JT_HOME="/net/koori.sfbay/onestop/jct-tools/3.1.2/archive/fcs/binaries"
      #JEMMY_JAR="/net/jdk/export/jpse04/Jemmy/jemmy.jar"
      #JAVA_HOME="/net/koori.sfbay/onestop/jdk/1.5.0/promoted/all/b26/binaries/solaris-sparc"
      #TEST_BASE_PATH="/net/koori.sfbay/onestop/jdk/1.5.0/promoted/all/b26/ws/j2se/test"

      #Alternative paths for the NSK site:
      #JT_HOME="/net/linux-15/export/home/java/jct"
      #JEMMY_JAR="$JT_HOME/jemmy/jemmy.jar"
      #JAVA_HOME="/net/linux-15/export/home/java/jdk1.5.0/sparc"
      #TEST_BASE_PATH="/net/linux-15/export/home/java/regtest.tiger/test"


      TESTVMOPTS="-client"
      CLASSPATH="$JT_HOME/classes:$JT_HOME/lib/javatest.jar:$JT_HOME/lib/jtreg.jar"

      TEST="java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh"

      mkdir -p $WORK_DIR/scratch 2>&1
      mkdir -p $WORK_DIR/jtData 2>&1
      mkdir -p $REPORT_DIR 2>&1

      #rm $WORK_DIR/jtData/ResultCache.jtw 2>&1

      cd $WORK_DIR/scratch

      $JAVA_HOME/bin/java -server -cp $CLASSPATH -DenvVars=TESTJAVAHOME=$JAVA_HOME,TESTVMOPTS=$TESTVMOPTS,DISPLAY=:0,HOME=$HOME/.regtest,PATH=/bin:/usr/bin,CPAPPEND=$JEMMY_JAR,TZ=,LC_ALL=en_US,LC_CTYPE=en_US,LANG=en_US,LPDEST= -DDISPLAY=:0 -DlocalHost="linux-1" -Dprogram=jtreg com.sun.javatest.regtest.Main -a -v default -batch -params -w "$WORK_DIR" -r "$REPORT_DIR" -t "$TEST_BASE_PATH" "$TEST_BASE_PATH/$TEST"

      --- script end ---


      Test output (jtr part):
      =======================
      ----------System.out:(20/765)----------
      lib/solaris-sparcv9

      + /net/linux-15/export/home/java/jdk1.5.0/sparc/bin/java -d64 StateTest
      All tests passed.

      + /net/linux-15/export/home/java/jdk1.5.0/sparc/bin/java -d64 EchoTest
      TCP echo test passed.
      java.net.SocketTimeoutException
      at sun.nio.ch.DatagramSocketAdaptor.receive(DatagramSocketAdaptor.java:188)
      at sun.nio.ch.DatagramSocketAdaptor.receive(DatagramSocketAdaptor.java:207)
      at EchoTest.UDPEchoTest(EchoTest.java:122)
      at EchoTest.main(EchoTest.java:144)
      java.net.SocketTimeoutException
      Exception in thread "main" java.lang.RuntimeException: Test failed - see log for details
      at EchoTest.main(EchoTest.java:153)

      + /net/linux-15/export/home/java/jdk1.5.0/sparc/bin/java -d64 CloseTest
      Test passed - service closed connection.

      1 test(s) failed
      ----------System.err:(0/0)----------
      result: Failed. Execution failed: exit code 1


      test result: Failed. Execution failed: exit code 1


      Specific machine info:
      ======================
      Hostname: linux-1
      OS: Solaris 8 (sparc) (CDE)


      ======================================================================

            sherman Xueming Shen
            vshsunw Vsh Vsh (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: