test/java/nio/Buffer/LimitDirectMemory.sh
Print this page
@@ -32,11 +32,11 @@
TMP1=tmp_$$
runTest() {
echo "Testing: $*"
- ${TESTJAVA}/bin/java ${TESTVMOPTS} $*
+ ${TESTJAVA}/bin/java ${TESTVMOPTS} ${TESTJAVAOPTS} $*
if [ $? -eq 0 ]
then echo "--- passed as expected"
else
echo "--- failed"
exit 1
@@ -45,11 +45,11 @@
launchFail() {
echo "Testing: -XX:MaxDirectMemorySize=$* -cp ${TESTCLASSES} \
LimitDirectMemory true DEFAULT DEFAULT+1M"
- ${TESTJAVA}/bin/java ${TESTVMOPTS} -XX:MaxDirectMemorySize=$* -cp ${TESTCLASSES} \
+ ${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"