test/java/nio/Buffer/LimitDirectMemory.sh

Print this page

        

*** 32,42 **** TMP1=tmp_$$ runTest() { echo "Testing: $*" ! ${TESTJAVA}/bin/java ${TESTVMOPTS} $* if [ $? -eq 0 ] then echo "--- passed as expected" else echo "--- failed" exit 1 --- 32,42 ---- TMP1=tmp_$$ runTest() { echo "Testing: $*" ! ${TESTJAVA}/bin/java ${TESTVMOPTS} ${TESTJAVAOPTS} $* if [ $? -eq 0 ] then echo "--- passed as expected" else echo "--- failed" exit 1
*** 45,55 **** launchFail() { echo "Testing: -XX:MaxDirectMemorySize=$* -cp ${TESTCLASSES} \ LimitDirectMemory true DEFAULT DEFAULT+1M" ! ${TESTJAVA}/bin/java ${TESTVMOPTS} -XX:MaxDirectMemorySize=$* -cp ${TESTCLASSES} \ LimitDirectMemory true DEFAULT DEFAULT+1M > ${TMP1} 2>&1 cat ${TMP1} cat ${TMP1} | grep -s "Unrecognized VM option: \'MaxDirectMemorySize=" if [ $? -ne 0 ] then echo "--- failed as expected" --- 45,55 ---- launchFail() { echo "Testing: -XX:MaxDirectMemorySize=$* -cp ${TESTCLASSES} \ LimitDirectMemory true DEFAULT DEFAULT+1M" ! ${TESTJAVA}/bin/java ${TESTVMOPTS} ${TESTJAVAOPTS} -XX:MaxDirectMemorySize=$* -cp ${TESTCLASSES} \ LimitDirectMemory true DEFAULT DEFAULT+1M > ${TMP1} 2>&1 cat ${TMP1} cat ${TMP1} | grep -s "Unrecognized VM option: \'MaxDirectMemorySize=" if [ $? -ne 0 ] then echo "--- failed as expected"