提交 12571d14 编写于 作者: K kevinw

7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.

Reviewed-by: kvn
上级 88e2a0d5
...@@ -18,8 +18,6 @@ then ...@@ -18,8 +18,6 @@ then
exit 1 exit 1
fi fi
BIT_FLAG=""
# set platform-dependent variables # set platform-dependent variables
OS=`uname -s` OS=`uname -s`
case "$OS" in case "$OS" in
...@@ -27,12 +25,6 @@ case "$OS" in ...@@ -27,12 +25,6 @@ case "$OS" in
NULL=/dev/null NULL=/dev/null
PS=":" PS=":"
FS="/" 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_* ) Windows_* )
NULL=NUL NULL=NUL
...@@ -50,9 +42,9 @@ CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH ...@@ -50,9 +42,9 @@ CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH
THIS_DIR=`pwd` 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} IsInstanceTest > test.out 2>&1
cat test.out cat test.out
......
...@@ -30,7 +30,7 @@ then ...@@ -30,7 +30,7 @@ then
exit 0 exit 0
fi fi
$JAVA_HOME/bin/java -version > $NULL 2>&1 $JAVA_HOME/bin/java ${TESTVMOPTS} -version > $NULL 2>&1
if [ $? != 0 ]; then if [ $? != 0 ]; then
echo "Wrong JAVA_HOME? JAVA_HOME: $JAVA_HOME" echo "Wrong JAVA_HOME? JAVA_HOME: $JAVA_HOME"
...@@ -119,7 +119,7 @@ fi ...@@ -119,7 +119,7 @@ fi
options="-Xloggc:$logfile -XX:+UseConcMarkSweepGC -XX:+PrintGC -XX:+PrintGCDetails -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=1 -XX:GCLogFileSize=$gclogsize" 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 ...." 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 if [ $? != 0 ]; then
echo "$msgfail" echo "$msgfail"
exit -1 exit -1
...@@ -148,7 +148,7 @@ fi ...@@ -148,7 +148,7 @@ fi
numoffiles=3 numoffiles=3
options="-Xloggc:$logfile -XX:+UseConcMarkSweepGC -XX:+PrintGC -XX:+PrintGCDetails -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=$numoffiles -XX:GCLogFileSize=$gclogsize" 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 ...." 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 if [ $? != 0 ]; then
echo "$msgfail" echo "$msgfail"
exit -1 exit -1
......
# #
# 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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
...@@ -46,8 +46,6 @@ then ...@@ -46,8 +46,6 @@ then
exit 1 exit 1
fi fi
BIT_FLAG=""
# set platform-dependent variables # set platform-dependent variables
OS=`uname -s` OS=`uname -s`
case "$OS" in case "$OS" in
...@@ -58,12 +56,6 @@ case "$OS" in ...@@ -58,12 +56,6 @@ case "$OS" in
RM=/bin/rm RM=/bin/rm
CP=/bin/cp CP=/bin/cp
MV=/bin/mv 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_* ) Windows_* )
NULL=NUL NULL=NUL
...@@ -87,7 +79,7 @@ THIS_DIR=`pwd` ...@@ -87,7 +79,7 @@ THIS_DIR=`pwd`
JAVA=${TESTJAVA}${FS}bin${FS}java JAVA=${TESTJAVA}${FS}bin${FS}java
JAVAC=${TESTJAVA}${FS}bin${FS}javac JAVAC=${TESTJAVA}${FS}bin${FS}javac
${JAVA} ${BIT_FLAG} -version ${JAVA} ${TESTVMOPTS} -version
# Current directory is scratch directory, copy all the test source there # Current directory is scratch directory, copy all the test source there
# (for the subsequent moves to work). # (for the subsequent moves to work).
...@@ -113,7 +105,7 @@ ${MV} many_loader.class many_loader.impl2 ...@@ -113,7 +105,7 @@ ${MV} many_loader.class many_loader.impl2
${MV} many_loader.impl1 many_loader.class ${MV} many_loader.impl1 many_loader.class
${RM} many_loader.java ${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 grep "loader constraint" test.out
exit $? exit $?
...@@ -25,8 +25,6 @@ then ...@@ -25,8 +25,6 @@ then
exit 1 exit 1
fi fi
BIT_FLAG=""
# set platform-dependent variables # set platform-dependent variables
OS=`uname -s` OS=`uname -s`
case "$OS" in case "$OS" in
...@@ -34,12 +32,6 @@ case "$OS" in ...@@ -34,12 +32,6 @@ case "$OS" in
NULL=/dev/null NULL=/dev/null
PS=":" PS=":"
FS="/" 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_* ) Windows_* )
NULL=NUL NULL=NUL
...@@ -57,11 +49,11 @@ CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH ...@@ -57,11 +49,11 @@ CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH
THIS_DIR=`pwd` 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}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" ] if [ -s core -o -s "hs_*.log" ]
then then
......
...@@ -19,8 +19,6 @@ then ...@@ -19,8 +19,6 @@ then
echo "If this is incorrect, try setting the variable manually." echo "If this is incorrect, try setting the variable manually."
fi fi
BIT_FLAG=""
# set platform-dependent variables # set platform-dependent variables
OS=`uname -s` OS=`uname -s`
case "$OS" in case "$OS" in
...@@ -42,7 +40,19 @@ case "$OS" in ...@@ -42,7 +40,19 @@ case "$OS" in
;; ;;
esac 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)
# Cannot simply look at TESTVMOPTS as -d64 is not
# passed if there is only a 64-bit JVM available.
${TESTJAVA}/bin/java ${TESTVMOPTS} -version 2>1 | grep "64-Bit" >/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 export LD_LIBRARY_PATH
THIS_DIR=`pwd` THIS_DIR=`pwd`
...@@ -51,10 +61,10 @@ cp ${TESTSRC}${FS}invoke.c ${THIS_DIR} ...@@ -51,10 +61,10 @@ cp ${TESTSRC}${FS}invoke.c ${THIS_DIR}
cp ${TESTSRC}${FS}T.java ${THIS_DIR} 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 ${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 ./invoke
exit $? exit $?
...@@ -27,8 +27,6 @@ then ...@@ -27,8 +27,6 @@ then
exit 1 exit 1
fi fi
BIT_FLAG=""
# set platform-dependent variables # set platform-dependent variables
OS=`uname -s` OS=`uname -s`
case "$OS" in case "$OS" in
...@@ -36,12 +34,6 @@ case "$OS" in ...@@ -36,12 +34,6 @@ case "$OS" in
NULL=/dev/null NULL=/dev/null
PS=":" PS=":"
FS="/" 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_* ) Windows_* )
NULL=NUL NULL=NUL
...@@ -59,11 +51,11 @@ CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH ...@@ -59,11 +51,11 @@ CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH
THIS_DIR=`pwd` 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}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 cat test.out
......
# #
# 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. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
...@@ -41,18 +41,10 @@ then ...@@ -41,18 +41,10 @@ then
fi fi
BIT_FLAG=""
OS=`uname -s` OS=`uname -s`
case "$OS" in case "$OS" in
SunOS | Linux ) SunOS | Linux )
FS="/" 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_* ) Windows_* )
printf "Not testing libjsig.so on Windows. PASSED.\n " printf "Not testing libjsig.so on Windows. PASSED.\n "
...@@ -69,20 +61,16 @@ JAVA=${TESTJAVA}${FS}bin${FS}java ...@@ -69,20 +61,16 @@ JAVA=${TESTJAVA}${FS}bin${FS}java
# LD_PRELOAD arch needs to match the binary we run, so run the java # LD_PRELOAD arch needs to match the binary we run, so run the java
# 64-bit binary directly if we are testing 64-bit (bin/ARCH/java). # 64-bit binary directly if we are testing 64-bit (bin/ARCH/java).
# Check if TESTVMOPS contains -d64, but cannot use
# However JPRT runs: .../solaris_x64_5.10-debug/bin/java # java ${TESTVMOPS} to run "java -d64" with LD_PRELOAD.
# ..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.
if [ ${OS} -eq "SunOS" ] if [ ${OS} -eq "SunOS" ]
then then
printf "SunOS test JAVA=${JAVA}" printf "SunOS test TESTVMOPTS = ${TESTVMOPTS}"
printf ${JAVA} | grep x64 > /dev/null printf ${TESTVMOPTS} | grep d64 > /dev/null
if [ $? -eq 0 ] if [ $? -eq 0 ]
then then
printf "SunOS x64 test, forcing -d64\n" printf "SunOS 64-bit test\n"
BIT_FLAG=-d64 BIT_FLAG=-d64
fi fi
fi fi
...@@ -127,20 +115,19 @@ then ...@@ -127,20 +115,19 @@ then
printf "Skipping test: libjsig missing for given architecture: ${LIBJSIG}\n" printf "Skipping test: libjsig missing for given architecture: ${LIBJSIG}\n"
exit 0 exit 0
fi 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. # the libjsig message we are removing appears on stdout.
# grep returns zero meaning found, non-zero means not found: # 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 if [ $? -eq 0 ]; then
printf "Failed: -Xcheck:jni prints message when libjsig.so is loaded.\n" printf "Failed: -Xcheck:jni prints message when libjsig.so is loaded.\n"
exit 1 exit 1
fi 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 if [ $? != 0 ]; then
printf "Failed: -Xcheck:jni does not print message when libjsig.so is loaded and -verbose:jni is set.\n" printf "Failed: -Xcheck:jni does not print message when libjsig.so is loaded and -verbose:jni is set.\n"
exit 1 exit 1
......
...@@ -18,8 +18,6 @@ then ...@@ -18,8 +18,6 @@ then
exit 1 exit 1
fi fi
BIT_FLAG=""
# set platform-dependent variables # set platform-dependent variables
OS=`uname -s` OS=`uname -s`
case "$OS" in case "$OS" in
...@@ -27,12 +25,6 @@ case "$OS" in ...@@ -27,12 +25,6 @@ case "$OS" in
NULL=/dev/null NULL=/dev/null
PS=":" PS=":"
FS="/" FS="/"
## for solaris, linux it's HOME
FILE_LOCATION=$HOME
if [ -f ${FILE_LOCATION}${FS}JDK64BIT -a ${OS} = "SunOS" -a `uname -p`='sparc' ]
then
BIT_FLAG="-d64"
fi
;; ;;
Windows_95 | Windows_98 | Windows_ME ) Windows_95 | Windows_98 | Windows_ME )
NULL=NUL NULL=NUL
...@@ -56,11 +48,11 @@ esac ...@@ -56,11 +48,11 @@ esac
cp ${TESTSRC}${FS}*.java . cp ${TESTSRC}${FS}*.java .
${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} -fullversion ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -fullversion
${TESTJAVA}${FS}bin${FS}javac -classpath .${PS}$TESTJAVA${FS}lib${FS}tools.jar *.java ${TESTJAVA}${FS}bin${FS}javac -classpath .${PS}$TESTJAVA${FS}lib${FS}tools.jar *.java
${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} -classpath .${PS}$TESTJAVA${FS}lib${FS}tools.jar FieldMonitor > test.out 2>&1 & ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -classpath .${PS}$TESTJAVA${FS}lib${FS}tools.jar FieldMonitor > test.out 2>&1 &
P_PID=$! P_PID=$!
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册