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

(bf) test java/nio/Buffer/LimitDirectMemory.sh fails (64-bit)

    XMLWordPrintable

Details

    • itanium
    • linux

    Description

      Name: vsR10238 Date: 05/12/2003


      Filed By : J2SE-SQA [###@###.###
      JDK : JDK1.4.2-b08 - JDK1.4.2-b22
      Testbase : Regression-test
      Platform[s] : RedHat Linux 2.1 Adv. Server (64bit)
      switch/Mode : -server
      Falling test[s]:
              java/nio/Buffer/LimitDirectMemory.sh

      Regression-test java/nio/Buffer/LimitDirectMemory.sh test fails on JDK1.4.2 (64 bit).

      The following table summarizes the test behaviour with both 32 and 64 JDK1.4.2 java versions
      on RedHat Linux 2.1 Adv. Server (64 bit, itanium):

      ---------------------------------------------------------------------
      build 64 bit (ia64) | 32 bit (i586)
      ---------------------------------------------------------------------
      b05 failed (-XX:MaxDirectMemorySize is not implemented)
      ......................................................................
      b06,b07 failed (sun.nio.MaxDirectMemorySize defined)
      ......................................................................
      b08-b22 failed (as described below) | passed
      ---------------------------------------------------------------------


      The first failed testcase is:
      runTest -XX:MaxDirectMemorySize=42g -cp ${TESTCLASSES} \
        LimitDirectMemory true 0 ${MAXDEFAULTPLUSONE}

      The following comments can be found in LimitDirectMemory.sh:
      # A really bad value will be ignored. We will only be able to allocate the default
      # amount.

      According to these comments the 42g value should be considered senseless and ignored.
      But such values are not senseless on 64 bit platforms.

      Test source location:
      =====================
      /java/re/jdk/1.4.2/promoted/latest/ws/j2se/test/java/nio/Buffer/LimitDirectMemory.sh

      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
      JT_HOME="/net/jtgb4u4c/export/sail16/jct-tools/3.1.1"
      JAVA_HOME="/java/re/jdk/1.4.2/promoted/rc/b22/binaries/linux-ia64"
      TEST_BASE_PATH="/java/re/jdk/1.4.2/promoted/rc/b22/ws/j2se/test"
                                                                                                                     
      JEMMY_JAR=/net/jtgb4u4c/export/sail16/Jemmy/jemmy.jar
                                                                                                                     
      HOST=`uname -n`
                                                                                                                     
      TESTWITH=$JAVA_HOME
      TESTJAVA=$JAVA_HOME
                                                                                                                     
      JTOPTS="-server"
      TESTVMOPTS="-server"
                                                                                                                     
      CLASSPATH="$JT_HOME/classes:$JT_HOME/lib/javatest.jar:$JT_HOME/lib/jtreg.jar"
                                                                                                                     
      export JAVA_HOME
      export JT_HOME
      export TESTWITH
      export CLASSPATH
                                                                                                                     
      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 -cp $CLASSPATH $JTOPTS \
      -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="$HOST" -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/java/nio/Buffer/LimitDirectMemory.sh"
                                                                                                                     
      --- script end ---

      Test output (jtr part):
      =======================
      ....
      Testing: -Dsun.nio.MaxDirectMemorySize=1K -cp /tmp/vs144077/test/classes/java/nio/Buffer LimitDirectMemory false 63M 32M
      OK - Error not thrown
      --- passed as expected
      Testing: -XX:MaxDirectMemorySize=42g -cp /tmp/vs144077/test/classes/java/nio/Buffer LimitDirectMemory false 0 64M
      OK - Error not thrown
      --- passed as expected
      Testing: -XX:MaxDirectMemorySize=42g -cp /tmp/vs144077/test/classes/java/nio/Buffer LimitDirectMemory true 0 67108865
      --- failed
      ----------System.err:(2/147)----------
      Exception in thread "main" java.lang.RuntimeException: OutOfMemoryError not thrown: 67108865
      at LimitDirectMemory.main(LimitDirectMemory.java:32)
      result: Failed. Execution failed: exit code 1


      test result: Failed. Execution failed: exit code 1


      Specific machine info:
      ======================
      Hostname: JCC-ITANIUM-01
      OS: RedHat Linux 2.1 Adv. Server

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

      Attachments

        Issue Links

          Activity

            People

              iris Iris Clark
              vshsunw Vsh Vsh (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: