8025519: [TESTBUG] runtime/7107135/Test7107135.sh need to use COMPILEJAVA for javac task

Modified some tests to use COMPILEJAVA instead of TESTJAVA for javac and include path

Reviewed-by: dholmes, mseledtsov
This commit is contained in:
Calvin Cheung 2014-02-24 21:54:22 -08:00
parent 2b75897176
commit bfbc3a0d51
4 changed files with 16 additions and 19 deletions

View File

@ -67,10 +67,8 @@ needs_jdk = \
gc/metaspace/TestPerfCountersAndMemoryPools.java \
runtime/6819213/TestBootNativeLibraryPath.java \
runtime/6925573/SortMethodsTest.java \
runtime/7107135/Test7107135.sh \
runtime/7158988/FieldMonitor.java \
runtime/7194254/Test7194254.java \
runtime/jsig/Test8017498.sh \
runtime/Metaspace/FragmentMetaspace.java \
runtime/NMT/BaselineWithParameter.java \
runtime/NMT/JcmdScale.java \
@ -175,7 +173,6 @@ needs_full_vm_compact1 = \
gc/startup_warnings/TestParallelScavengeSerialOld.java \
gc/startup_warnings/TestParNewCMS.java \
gc/startup_warnings/TestParNewSerialOld.java \
runtime/6929067/Test6929067.sh \
runtime/SharedArchiveFile/SharedArchiveFile.java
# Minimal VM on Compact 2 adds in some compact2 tests

View File

@ -4,6 +4,7 @@
## @test Test6929067.sh
## @bug 6929067
## @bug 8021296
## @bug 8025519
## @summary Stack guard pages should be removed when thread is detached
## @run shell Test6929067.sh
##
@ -113,7 +114,7 @@ LD_LIBRARY_PATH=.:${COMPILEJAVA}/jre/lib/${ARCH}/${VMTYPE}:/usr/lib:$LD_LIBRARY_
export LD_LIBRARY_PATH
cp ${TESTSRC}${FS}*.java ${THIS_DIR}
${TESTJAVA}${FS}bin${FS}javac *.java
${COMPILEJAVA}${FS}bin${FS}javac *.java
echo "Architecture: ${ARCH}"
echo "Compilation flag: ${COMP_FLAG}"
@ -123,8 +124,8 @@ echo "VM type: ${VMTYPE}"
# for /usr/lib/`uname -m`-linux-gnu version ensure to add that path to below compilation.
$gcc_cmd -DLINUX ${COMP_FLAG} -o invoke \
-I${TESTJAVA}/include -I${TESTJAVA}/include/linux \
-L${TESTJAVA}/jre/lib/${ARCH}/${VMTYPE} \
-I${COMPILEJAVA}/include -I${COMPILEJAVA}/include/linux \
-L${COMPILEJAVA}/jre/lib/${ARCH}/${VMTYPE} \
${TESTSRC}${FS}invoke.c -ljvm -lpthread
./invoke

View File

@ -1,7 +1,7 @@
#!/bin/sh
#
# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011 SAP AG. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
@ -29,6 +29,7 @@
## @test Test7107135.sh
## @bug 7107135
## @bug 8021296
## @bug 8025519
## @summary Stack guard pages lost after loading library with executable stack.
## @run shell Test7107135.sh
##
@ -64,10 +65,10 @@ ARCH=`uname -m`
THIS_DIR=.
cp ${TESTSRC}${FS}*.java ${THIS_DIR}
${TESTJAVA}${FS}bin${FS}javac *.java
${COMPILEJAVA}${FS}bin${FS}javac *.java
$gcc_cmd -fPIC -shared -c -o test.o \
-I${TESTJAVA}${FS}include -I${TESTJAVA}${FS}include${FS}linux \
-I${COMPILEJAVA}${FS}include -I${COMPILEJAVA}${FS}include${FS}linux \
${TESTSRC}${FS}test.c
ld -shared -z execstack -o libtest-rwx.so test.o

View File

@ -30,8 +30,9 @@
## @bug 8020791
## @bug 8021296
## @bug 8022301
## @bug 8025519
## @summary sigaction(sig) results in process hang/timed-out if sig is much greater than SIGRTMAX
## @run shell/timeout=30 Test8017498.sh
## @run shell/timeout=60 Test8017498.sh
##
if [ "${TESTSRC}" = "" ]
@ -55,12 +56,9 @@ case "$OS" in
echo "WARNING: gcc not found. Cannot execute test." 2>&1
exit 0;
fi
if [ "$VM_BITS" = "64" ]
then
MY_LD_PRELOAD=${TESTJAVA}${FS}jre${FS}lib${FS}amd64${FS}libjsig.so
else
MY_LD_PRELOAD=${TESTJAVA}${FS}jre${FS}lib${FS}i386${FS}libjsig.so
EXTRA_CFLAG=-m32
MY_LD_PRELOAD=${TESTJAVA}${FS}jre${FS}lib${FS}${VM_CPU}${FS}libjsig.so
if [ "$VM_BITS" == "32" ] && [ "$VM_CPU" != "arm" ] && [ "$VM_CPU" != "ppc" ]; then
EXTRA_CFLAG=-m32
fi
echo MY_LD_PRELOAD = ${MY_LD_PRELOAD}
;;
@ -73,13 +71,13 @@ esac
THIS_DIR=.
cp ${TESTSRC}${FS}*.java ${THIS_DIR}
${TESTJAVA}${FS}bin${FS}javac *.java
${COMPILEJAVA}${FS}bin${FS}javac *.java
$gcc_cmd -DLINUX -fPIC -shared \
${EXTRA_CFLAG} -z noexecstack \
-o ${TESTSRC}${FS}libTestJNI.so \
-I${TESTJAVA}${FS}include \
-I${TESTJAVA}${FS}include${FS}linux \
-I${COMPILEJAVA}${FS}include \
-I${COMPILEJAVA}${FS}include${FS}linux \
${TESTSRC}${FS}TestJNI.c
# run the java test in the background