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

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

Reviewed-by: kvn
上级 88e2a0d5
......@@ -18,8 +18,6 @@ then
exit 1
fi
BIT_FLAG=""
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
......@@ -27,12 +25,6 @@ case "$OS" in
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 @@ CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH
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
......
......@@ -30,7 +30,7 @@ then
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 @@ fi
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 @@ fi
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
......
#
# 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 @@ then
exit 1
fi
BIT_FLAG=""
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
......@@ -58,12 +56,6 @@ case "$OS" in
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 @@ THIS_DIR=`pwd`
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.class many_loader.impl2
${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 $?
......@@ -25,8 +25,6 @@ then
exit 1
fi
BIT_FLAG=""
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
......@@ -34,12 +32,6 @@ case "$OS" in
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 @@ CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH
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
......
......@@ -19,8 +19,6 @@ then
echo "If this is incorrect, try setting the variable manually."
fi
BIT_FLAG=""
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
......@@ -42,7 +40,19 @@ case "$OS" in
;;
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
THIS_DIR=`pwd`
......@@ -51,10 +61,10 @@ cp ${TESTSRC}${FS}invoke.c ${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
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 $?
......@@ -27,8 +27,6 @@ then
exit 1
fi
BIT_FLAG=""
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
......@@ -36,12 +34,6 @@ case "$OS" in
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 @@ CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH
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
......
#
# 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 @@ then
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 "
......@@ -69,20 +61,16 @@ JAVA=${TESTJAVA}${FS}bin${FS}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).
# 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.
# Check if TESTVMOPS contains -d64, but cannot use
# java ${TESTVMOPS} to run "java -d64" with LD_PRELOAD.
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 64-bit test\n"
BIT_FLAG=-d64
fi
fi
......@@ -127,20 +115,19 @@ then
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
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
......
......@@ -18,8 +18,6 @@ then
exit 1
fi
BIT_FLAG=""
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
......@@ -27,12 +25,6 @@ case "$OS" in
NULL=/dev/null
PS=":"
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 )
NULL=NUL
......@@ -56,11 +48,11 @@ esac
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}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=$!
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册