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

TEST_BUG: RegTest-test javax/print/CloseStreamTest.java failed

    XMLWordPrintable

Details

    • 2d
    • tiger
    • x86
    • linux
    • Verified

    Description



      Name: aaR10208 Date: 04/03/2003


      Filed By : J2SE-SQA [###@###.###
      JDK : JDK1.5.0-b03
      Testbase : RegTest-test
      Platform[s] : RedHat Advanced Server 2.1 (Gnome)
      switch/Mode : -client
      Falling test[s]: javax/print/CloseStreamTest.java

      Here is part of the test's source code:
      file: javax/print/CloseStreamTest.java
      =====
            6 * @run main CloseStreamTest
      [...]
           65 public static void main(String args[]) {
           66 service = PrintServiceLookup.lookupDefaultPrintService();
      ! 67 if (service == null) {
           68 System.out.println("no default printer");
      ! 69 System.exit(0);
           70 }
      =====
      According to regtest tag specification the main command "Passes only if the main method returns normally
      and does not cause an exception", so leaving the main method by System.exit() causes the test to fail
      if no printer available.


      Test source location:
      =====================
      /java/re/jdk/1.5.0/promoted/latest/ws/j2se/test/javax/print/CloseStreamTest.java

      jtr file location:
      ==================
      /net/jtgb4u4c.sfbay/export/sail15/results/tiger/b03/regtest/linux/redhat_advserver21_gnome-client_linux-24/workDir/test/javax/print/CloseStreamTest.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
      JT_HOME="/net/linux-15/export/home/java/jct"
      JAVA_HOME="/net/linux-15/export/home/java/jdk1.5.0/linux"
      TEST_BASE_PATH="/net/linux-15/export/home/java/regtest/test"

      TESTWITH=$JAVA_HOME
      TESTJAVA=$JAVA_HOME

      JTOPTS="-client"
      TESTVMOPTS="-client"

      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=$JT_HOME/jemmy/jemmy.jar,TZ=,LC_ALL=en_US,LC_CTYPE=en_US,LANG=en_US,LPDEST= -DDISPLAY=:0 -DlocalHost="linux-24" -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/javax/print/CloseStreamTest.java"

      --- script end ---

      Test output (jtr part):
      =======================
      ----------System.out:(1/19)----------
      no default printer
      ----------System.err:(0/0)----------
      result: Failed. Unexpected exit from test [exit code: 0]


      test result: Failed. Unexpected exit from test [exit code: 0]


      Specific machine info:
      ======================
      Hostname: linux-24
      OS: RedHat Advanced Server 2.1 (Gnome)

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

      Attachments

        Issue Links

          Activity

            People

              jgodinez Jennifer Godinez (Inactive)
              sundrsunw Sundr Sundr (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: