JDK-8019583 : [TESTBUG] runtime/7107135 always passes
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: hs23
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-07-02
  • Updated: 2014-06-26
  • Resolved: 2013-08-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 Other
8Fixed hs25Fixed
Related Reports
Relates :  
Description
test/runtime/7107135/Test7107135.sh:
       87 echo Test changing of stack protection:
       88 echo ${TESTJAVA}${FS}bin${FS}java -cp ${THIS_DIR} Test test-rw
       89 ${TESTJAVA}${FS}bin${FS}java -cp ${THIS_DIR} Test test-rwx
       90 
       91 if [ "$?" == "0" ]
       92 then
       93   echo
       94   echo ${TESTJAVA}${FS}bin${FS}java -cp ${THIS_DIR} TestMT test-rwx
       95   ${TESTJAVA}${FS}bin${FS}java -cp ${THIS_DIR} TestMT test-rwx
       96 fi
       97 
       98 exit $?

Even if java execution fails, exit code becomes zero after 'if' statement evaluation.
Comments
This is shell script problem, the correct way should record the returned value in a variable to keep it. JAVA_RETVAL=$? if [ "$JAVA_RETVAL" == "0' ]; then #java TestMT JAVA_RETVAL=$? fi exit $JAVA_RETVAL
08-08-2013

Execution of Test.java returns nonzero result, so TestMT.java will not be executed. But value of $? becomes zero after 'if'
07-08-2013

TestMT.java should return a value like Test.java.
06-08-2013