--- old/test/compiler/6894807/Test6894807.sh Thu Mar 29 15:22:36 2012 +++ new/test/compiler/6894807/Test6894807.sh Thu Mar 29 15:22:36 2012 @@ -18,8 +18,6 @@ exit 1 fi -BIT_FLAG="" - # set platform-dependent variables OS=`uname -s` case "$OS" in @@ -27,12 +25,6 @@ NULL=/dev/null PS=":" FS="/" - ## for solaris, linux it's HOME - FILE_LOCATION=$HOME - if [ -f ${FILE_LOCATION}${FS}JDK64BIT -a ${OS} = "SunOS" ] - then - BIT_FLAG=`cat ${FILE_LOCATION}${FS}JDK64BIT | grep -v '^#'` - fi ;; Windows_* ) NULL=NUL @@ -50,9 +42,9 @@ THIS_DIR=`pwd` -${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} -version +${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -version -${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} -server IsInstanceTest > test.out 2>&1 +${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -server IsInstanceTest > test.out 2>&1 cat test.out --- old/test/gc/6941923/test6941923.sh Thu Mar 29 15:22:37 2012 +++ new/test/gc/6941923/test6941923.sh Thu Mar 29 15:22:37 2012 @@ -30,7 +30,7 @@ exit 0 fi -$JAVA_HOME/bin/java -version > $NULL 2>&1 +$JAVA_HOME/bin/java ${TESTVMOPTS} -version > $NULL 2>&1 if [ $? != 0 ]; then echo "Wrong JAVA_HOME? JAVA_HOME: $JAVA_HOME" @@ -119,7 +119,7 @@ options="-Xloggc:$logfile -XX:+UseConcMarkSweepGC -XX:+PrintGC -XX:+PrintGCDetails -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=1 -XX:GCLogFileSize=$gclogsize" echo "Test gc log rotation in same file, wait for $tts minutes ...." -$JAVA_HOME/bin/java $options $testname $tts +$JAVA_HOME/bin/java ${TESTVMOPTS} $options $testname $tts if [ $? != 0 ]; then echo "$msgfail" exit -1 @@ -148,7 +148,7 @@ numoffiles=3 options="-Xloggc:$logfile -XX:+UseConcMarkSweepGC -XX:+PrintGC -XX:+PrintGCDetails -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=$numoffiles -XX:GCLogFileSize=$gclogsize" echo "Test gc log rotation in $numoffiles files, wait for $tts minutes ...." -$JAVA_HOME/bin/java $options $testname $tts +$JAVA_HOME/bin/java ${TESTVMOPTS} $options $testname $tts if [ $? != 0 ]; then echo "$msgfail" exit -1 --- old/test/runtime/6626217/Test6626217.sh Thu Mar 29 15:22:37 2012 +++ new/test/runtime/6626217/Test6626217.sh Thu Mar 29 15:22:37 2012 @@ -1,5 +1,5 @@ # -# Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -46,8 +46,6 @@ exit 1 fi -BIT_FLAG="" - # set platform-dependent variables OS=`uname -s` case "$OS" in @@ -58,12 +56,6 @@ RM=/bin/rm CP=/bin/cp MV=/bin/mv - ## for solaris, linux it's HOME - FILE_LOCATION=$HOME - if [ -f ${FILE_LOCATION}${FS}JDK64BIT -a ${OS} = "SunOS" ] - then - BIT_FLAG=`cat ${FILE_LOCATION}${FS}JDK64BIT` - fi ;; Windows_* ) NULL=NUL @@ -87,7 +79,7 @@ JAVA=${TESTJAVA}${FS}bin${FS}java JAVAC=${TESTJAVA}${FS}bin${FS}javac -${JAVA} ${BIT_FLAG} -version +${JAVA} ${TESTVMOPTS} -version # Current directory is scratch directory, copy all the test source there # (for the subsequent moves to work). @@ -113,7 +105,7 @@ ${MV} many_loader.impl1 many_loader.class ${RM} many_loader.java -${JAVA} ${BIT_FLAG} -Xverify -Xint -cp . bug_21227 >test.out 2>&1 +${JAVA} ${TESTVMOPTS} -Xverify -Xint -cp . bug_21227 >test.out 2>&1 grep "loader constraint" test.out exit $? --- old/test/runtime/6878713/Test6878713.sh Thu Mar 29 15:22:38 2012 +++ new/test/runtime/6878713/Test6878713.sh Thu Mar 29 15:22:38 2012 @@ -25,8 +25,6 @@ exit 1 fi -BIT_FLAG="" - # set platform-dependent variables OS=`uname -s` case "$OS" in @@ -34,12 +32,6 @@ NULL=/dev/null PS=":" FS="/" - ## for solaris, linux it's HOME - FILE_LOCATION=$HOME - if [ -f ${FILE_LOCATION}${FS}JDK64BIT -a ${OS} = "SunOS" ] - then - BIT_FLAG=`cat ${FILE_LOCATION}${FS}JDK64BIT | grep -v '^#'` - fi ;; Windows_* ) NULL=NUL @@ -57,11 +49,11 @@ THIS_DIR=`pwd` -${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} -version +${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -version ${TESTJAVA}${FS}bin${FS}jar xvf ${TESTSRC}${FS}testcase.jar -${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} OOMCrashClass1960_2 > test.out 2>&1 +${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} OOMCrashClass1960_2 > test.out 2>&1 if [ -s core -o -s "hs_*.log" ] then --- old/test/runtime/6929067/Test6929067.sh Thu Mar 29 15:22:38 2012 +++ new/test/runtime/6929067/Test6929067.sh Thu Mar 29 15:22:38 2012 @@ -19,8 +19,6 @@ echo "If this is incorrect, try setting the variable manually." fi -BIT_FLAG="" - # set platform-dependent variables OS=`uname -s` case "$OS" in @@ -37,12 +35,21 @@ exit 0; ;; * ) - echo "Unrecognized system!" + echo "Unrecognized system: $OS" exit 1; ;; esac -LD_LIBRARY_PATH=.:${TESTJAVA}/jre/lib/i386/client:/usr/openwin/lib:/usr/dt/lib:/usr/lib:$LD_LIBRARY_PATH +# Choose arch: i386 or amd64 (test is Linux-specific) +echo ${TESTVMOPTS} | grep d64 >/dev/null +if [ "$?" = "0" ] +then + ARCH=amd64 +else + ARCH=i386 +fi + +LD_LIBRARY_PATH=.:${TESTJAVA}/jre/lib/${ARCH}/client:/usr/openwin/lib:/usr/dt/lib:/usr/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH THIS_DIR=`pwd` @@ -51,10 +58,10 @@ cp ${TESTSRC}${FS}T.java ${THIS_DIR} -${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} -fullversion +${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -fullversion ${TESTJAVA}${FS}bin${FS}javac T.java -gcc -o invoke -I${TESTJAVA}/include -I${TESTJAVA}/include/linux invoke.c ${TESTJAVA}/jre/lib/i386/client/libjvm.so +gcc -o invoke -I${TESTJAVA}/include -I${TESTJAVA}/include/linux invoke.c ${TESTJAVA}/jre/lib/${ARCH}/client/libjvm.so ./invoke exit $? --- old/test/runtime/7020373/Test7020373.sh Thu Mar 29 15:22:39 2012 +++ new/test/runtime/7020373/Test7020373.sh Thu Mar 29 15:22:39 2012 @@ -27,8 +27,6 @@ exit 1 fi -BIT_FLAG="" - # set platform-dependent variables OS=`uname -s` case "$OS" in @@ -36,12 +34,6 @@ NULL=/dev/null PS=":" FS="/" - ## for solaris, linux it's HOME - FILE_LOCATION=$HOME - if [ -f ${FILE_LOCATION}${FS}JDK64BIT -a ${OS} = "SunOS" ] - then - BIT_FLAG=`cat ${FILE_LOCATION}${FS}JDK64BIT | grep -v '^#'` - fi ;; Windows_* ) NULL=NUL @@ -59,11 +51,11 @@ THIS_DIR=`pwd` -${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} -version +${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -version ${TESTJAVA}${FS}bin${FS}jar xvf ${TESTSRC}${FS}testcase.jar -${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} OOMCrashClass4000_1 > test.out 2>&1 +${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} OOMCrashClass4000_1 > test.out 2>&1 cat test.out --- old/test/runtime/7051189/Xchecksig.sh Thu Mar 29 15:22:39 2012 +++ new/test/runtime/7051189/Xchecksig.sh Thu Mar 29 15:22:39 2012 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -41,18 +41,10 @@ fi -BIT_FLAG="" - OS=`uname -s` case "$OS" in SunOS | Linux ) FS="/" - ## for solaris, linux it's HOME - FILE_LOCATION=$HOME - if [ -f ${FILE_LOCATION}${FS}JDK64BIT -a ${OS} = "SunOS" ] - then - BIT_FLAG=`cat ${FILE_LOCATION}${FS}JDK64BIT` - fi ;; Windows_* ) printf "Not testing libjsig.so on Windows. PASSED.\n " @@ -71,18 +63,16 @@ # 64-bit binary directly if we are testing 64-bit (bin/ARCH/java). # However JPRT runs: .../solaris_x64_5.10-debug/bin/java -# ..which is 32-bit, when it has built the 64-bit version to test. -# -# How does this script know we are meant to run the 64-bit version? -# Can check for the path of the binary containing "x64" on Solaris. +# ..which is 32-bit, when it has built the 64-bit version to test, +# but we have TESTVMOPTS including at least -d64 if [ ${OS} -eq "SunOS" ] then - printf "SunOS test JAVA=${JAVA}" - printf ${JAVA} | grep x64 > /dev/null + printf "SunOS test TESTVMOPTS = ${TESTVMOPTS}" + printf ${TESTVMOPTS} | grep d64 > /dev/null if [ $? -eq 0 ] then - printf "SunOS x64 test, forcing -d64\n" + printf "SunOS x64 test, using -d64\n" BIT_FLAG=-d64 fi fi @@ -127,13 +117,12 @@ printf "Skipping test: libjsig missing for given architecture: ${LIBJSIG}\n" exit 0 fi -# Use java -version to test, java version info appeas on stderr, +# Use java -version to test, java version info appears on stderr, # the libjsig message we are removing appears on stdout. # grep returns zero meaning found, non-zero means not found: -LD_PRELOAD=${LIBJSIG} ${JAVA} ${BIT_FLAG} -Xcheck:jni -version 2>&1 | grep "libjsig is activated" - +LD_PRELOAD=${LIBJSIG} ${JAVA} ${TESTVMOPTS} -Xcheck:jni -version 2>&1 | grep "libjsig is activated" if [ $? -eq 0 ]; then printf "Failed: -Xcheck:jni prints message when libjsig.so is loaded.\n" exit 1 @@ -140,7 +129,7 @@ fi -LD_PRELOAD=${LIBJSIG} ${JAVA} ${BIT_FLAG} -Xcheck:jni -verbose:jni -version 2>&1 | grep "libjsig is activated" +LD_PRELOAD=${LIBJSIG} ${JAVA} ${TESTVMOPTS} -Xcheck:jni -verbose:jni -version 2>&1 | grep "libjsig is activated" if [ $? != 0 ]; then printf "Failed: -Xcheck:jni does not print message when libjsig.so is loaded and -verbose:jni is set.\n" exit 1