Mercurial > hg > truffle
changeset 12016:57ac7245594c
8019583: [TESTBUG] runtime/7107135 always passes
Summary: If java test return none zero, the value will be override by 'if' statement, the exit value will always '0' and pass. Fix by recording the result in a variable.
Reviewed-by: coleenp, dholmes, iklam
Contributed-by: yumin.qi@oracle.com
author | minqi |
---|---|
date | Thu, 08 Aug 2013 15:19:12 -0700 |
parents | 31f3b1e1c5e5 |
children | 6222a021d582 |
files | test/runtime/7107135/Test7107135.sh |
diffstat | 1 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/test/runtime/7107135/Test7107135.sh Thu Aug 08 09:21:30 2013 -0700 +++ b/test/runtime/7107135/Test7107135.sh Thu Aug 08 15:19:12 2013 -0700 @@ -53,9 +53,6 @@ fi ;; *) - NULL=NUL - PS=";" - FS="\\" echo "Test passed; only valid for Linux" exit 0; ;; @@ -87,14 +84,16 @@ echo echo Test changing of stack protection: -echo ${TESTJAVA}${FS}bin${FS}java -cp ${THIS_DIR} Test test-rw +echo ${TESTJAVA}${FS}bin${FS}java -cp ${THIS_DIR} Test test-rwx ${TESTJAVA}${FS}bin${FS}java -cp ${THIS_DIR} Test test-rwx +JAVA_RETVAL=$? -if [ "$?" == "0" ] +if [ "$JAVA_RETVAL" == "0" ] then echo echo ${TESTJAVA}${FS}bin${FS}java -cp ${THIS_DIR} TestMT test-rwx ${TESTJAVA}${FS}bin${FS}java -cp ${THIS_DIR} TestMT test-rwx + JAVA_RETVAL=$? fi -exit $? +exit $JAVA_RETVAL