< prev index next >

test/java/nio/Buffer/LimitDirectMemory.sh

Print this page




  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any
  23 # questions.
  24 #
  25 
  26 # @test
  27 # @bug 4627316 6743526
  28 # @summary Test option to limit direct memory allocation
  29 #
  30 # @build LimitDirectMemory

  31 # @run shell LimitDirectMemory.sh
  32 
  33 TMP1=tmp_$$
  34 
  35 runTest() {
  36   echo "Testing: $*"
  37   ${TESTJAVA}/bin/java ${TESTVMOPTS} $*
  38   if [ $? -eq 0 ]
  39   then echo "--- passed as expected"
  40   else
  41     echo "--- failed"
  42     exit 1
  43   fi
  44 }
  45 
  46 
  47 launchFail() {
  48   echo "Testing: -XX:MaxDirectMemorySize=$* -cp ${TESTCLASSES} \
  49      LimitDirectMemory true DEFAULT DEFAULT+1M"
  50   ${TESTJAVA}/bin/java ${TESTVMOPTS} -XX:MaxDirectMemorySize=$* -cp ${TESTCLASSES} \




  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any
  23 # questions.
  24 #
  25 
  26 # @test
  27 # @bug 4627316 6743526
  28 # @summary Test option to limit direct memory allocation
  29 #
  30 # @build LimitDirectMemory
  31 # @ignore JDK-8129343
  32 # @run shell LimitDirectMemory.sh
  33 
  34 TMP1=tmp_$$
  35 
  36 runTest() {
  37   echo "Testing: $*"
  38   ${TESTJAVA}/bin/java ${TESTVMOPTS} $*
  39   if [ $? -eq 0 ]
  40   then echo "--- passed as expected"
  41   else
  42     echo "--- failed"
  43     exit 1
  44   fi
  45 }
  46 
  47 
  48 launchFail() {
  49   echo "Testing: -XX:MaxDirectMemorySize=$* -cp ${TESTCLASSES} \
  50      LimitDirectMemory true DEFAULT DEFAULT+1M"
  51   ${TESTJAVA}/bin/java ${TESTVMOPTS} -XX:MaxDirectMemorySize=$* -cp ${TESTCLASSES} \


< prev index next >