8041727: [TESTBUG] runtime/jsig/Test8017498.sh fails with Test8017498.sh: 50: [: x/usr/bin/gcc: unexpected operator
Fixed shell script issues Reviewed-by: dcubed, gtriantafill
This commit is contained in:
parent
e7456dcf86
commit
3a78ac3c1b
@ -31,15 +31,14 @@
|
||||
## @bug 8022301
|
||||
## @bug 8025519
|
||||
## @summary sigaction(sig) results in process hang/timed-out if sig is much greater than SIGRTMAX
|
||||
## @ignore 8041727
|
||||
## @run shell/timeout=60 Test8017498.sh
|
||||
##
|
||||
|
||||
if [ "${TESTSRC}" = "" ]
|
||||
then
|
||||
TESTSRC=${PWD}
|
||||
if [ -z "${TESTSRC}" ]; then
|
||||
TESTSRC="${PWD}"
|
||||
echo "TESTSRC not set. Using "${TESTSRC}" as default"
|
||||
fi
|
||||
|
||||
echo "TESTSRC=${TESTSRC}"
|
||||
## Adding common setup Variables for running shell tests.
|
||||
. ${TESTSRC}/../../test_env.sh
|
||||
@ -52,13 +51,13 @@ case "$OS" in
|
||||
Linux)
|
||||
echo "Testing on Linux"
|
||||
gcc_cmd=`which gcc`
|
||||
if [ "x$gcc_cmd" == "x" ]; then
|
||||
if [ -z "$gcc_cmd" ]; then
|
||||
echo "WARNING: gcc not found. Cannot execute test." 2>&1
|
||||
exit 0;
|
||||
fi
|
||||
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
|
||||
if [ "$VM_BITS" = "32" ] && [ "$VM_CPU" != "arm" ] && [ "$VM_CPU" != "ppc" ]; then
|
||||
EXTRA_CFLAG=-m32
|
||||
fi
|
||||
echo MY_LD_PRELOAD = ${MY_LD_PRELOAD}
|
||||
;;
|
||||
@ -70,7 +69,7 @@ esac
|
||||
|
||||
THIS_DIR=.
|
||||
|
||||
cp ${TESTSRC}${FS}*.java ${THIS_DIR}
|
||||
cp "${TESTSRC}${FS}"*.java "${THIS_DIR}"
|
||||
${COMPILEJAVA}${FS}bin${FS}javac *.java
|
||||
|
||||
$gcc_cmd -DLINUX -fPIC -shared \
|
||||
@ -80,16 +79,19 @@ $gcc_cmd -DLINUX -fPIC -shared \
|
||||
-I${COMPILEJAVA}${FS}include${FS}linux \
|
||||
${TESTSRC}${FS}TestJNI.c
|
||||
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "Compile failed, Ignoring failed compilation and forcing the test to pass"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# run the java test in the background
|
||||
cmd="LD_PRELOAD=$MY_LD_PRELOAD \
|
||||
${TESTJAVA}${FS}bin${FS}java \
|
||||
-Djava.library.path=. -server TestJNI 100"
|
||||
echo "$cmd > test.out 2>&1"
|
||||
eval $cmd > test.out 2>&1
|
||||
echo "$cmd > test.out"
|
||||
eval $cmd > test.out
|
||||
|
||||
grep "old handler" test.out > ${NULL}
|
||||
if [ $? = 0 ]
|
||||
then
|
||||
if grep "old handler" test.out > ${NULL}; then
|
||||
echo "Test Passed"
|
||||
exit 0
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user