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

Regression test tools/launcher/MultipleJRE.sh problems

XMLWordPrintable

    • b02
    • x86
    • linux_redhat_4.0

        The test:

           test tools/launcher/MultipleJRE.sh

        was modified recently for the 1.4.2_17 test run.

        jqa 5.10 # sccs diffs -r1.4 /net/jdk.sfbay/export/jpse04/Regression/1.4.2/test/tools/launcher/MultipleJRE.sh

        ------- MultipleJRE.sh -------
        1,2c1,2
        < # @test @(#)MultipleJRE.sh 1.4
        < # @bug 4811102 4953711 4955505 4956301 4991229 4998210 5018605 5036211
        ---
        > # @test @(#)MultipleJRE.sh 1.5 07/09/11
        > # @bug 4811102 4953711 4955505 4956301 4991229 4998210 5018605 5036211 6431847
        225a226,239
        > TestHomePath() {
        > i=0
        > TESTHOME=/
        > while [ $i -lt 40 ] ; do
        > HOME=$TESTHOME $JAVA -version:1.4+ -version > /dev/null 2>&1
        > if [ $? -ne 0 ]; then
        > echo "Error: when HOME=%s len=%s\n" $HOME `echo $HOME | wc -c`
        > exit 1
        > fi
        > TESTHOME=${TESTHOME}Z
        > i=`expr $i + 1`
        > done
        > }
        >
        319a334
        > # Test to make sure long HOME variables dont cause buffer overruns
        320a336,338
        > TestHomePath
        >
        > #
        jqa 5.10 #


        The line:
         HOME=$TESTHOME $JAVA -version:1.4+ -version > /dev/null 2>&1
        should probably be two lines:
         HOME=$TESTHOME
         $JAVA -version:1.4+ -version > /dev/null 2>&1

        The error message:

          echo "Error: when HOME=%s len=%s\n" $HOME `echo $HOME | wc -c`

        provides no clear information.
        HOME=%s should be HOME=$HOME
        len=%s should be len=$i

        Also, this new change will result in more unrelated test failures on Linix.
        On RHEL 4 for example:

        balboa # uname -a
        Linux balboa 2.6.9-55.EL #1 Fri Apr 20 16:35:59 EDT 2007 i686 athlon i386 GNU/Linux
        balboa # cat /etc/redhat-release
        Red Hat Enterprise Linux AS release 4 (Nahant Update 5)
        balboa #
        balboa # /export/home/JDK/fcs/142u15b02-update_installed_2007_09_21_00-41-19/j2sdk1.4.2_15/bin/java -version:1.4+ -version
        Unable to locate JRE meeting specification "1.4+"
        balboa #
        balboa # echo $?
        1
        balboa #

        So the test falls over as there is no other Sun java currently installed on this
        server and not because of a problem with length of $HOME
        There is no guarantee that there is a well known java available to satisfy $JAVA -version:1.4+ -version
        on any given test Linux server.

        Note: Windows exits before the new function is run so is not a problem.

              asaha Abhijit Saha
              wrockett Walter Rockett (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: