142N/A#
2362N/A# Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
142N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
142N/A#
142N/A# This code is free software; you can redistribute it and/or modify it
142N/A# under the terms of the GNU General Public License version 2 only, as
142N/A# published by the Free Software Foundation.
142N/A#
142N/A# This code is distributed in the hope that it will be useful, but WITHOUT
142N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
142N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
142N/A# version 2 for more details (a copy is included in the LICENSE file that
142N/A# accompanied this code).
142N/A#
142N/A# You should have received a copy of the GNU General Public License version
142N/A# 2 along with this work; if not, write to the Free Software Foundation,
142N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
142N/A#
2362N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A# or visit www.oracle.com if you need additional information or have any
2362N/A# questions.
142N/A#
142N/A
142N/A# @test
142N/A# @bug 6572160
142N/A# @summary stress getObjectSize() API
142N/A# @author Daniel D. Daugherty as modified from the code of fischman@google.com
142N/A#
142N/A# @run build StressGetObjectSizeApp
142N/A# @run shell MakeJAR.sh basicAgent
142N/A# @run shell StressGetObjectSizeTest.sh
142N/A#
142N/A
142N/Aif [ "${TESTJAVA}" = "" ]
142N/Athen
142N/A echo "TESTJAVA not set. Test cannot execute. Failed."
142N/A exit 1
142N/Afi
142N/A
142N/Aif [ "${TESTSRC}" = "" ]
142N/Athen
142N/A echo "TESTSRC not set. Test cannot execute. Failed."
142N/A exit 1
142N/Afi
142N/A
142N/Aif [ "${TESTCLASSES}" = "" ]
142N/Athen
142N/A echo "TESTCLASSES not set. Test cannot execute. Failed."
142N/A exit 1
142N/Afi
142N/A
142N/AJAVA="${TESTJAVA}"/bin/java
142N/A
142N/A"${JAVA}" ${TESTVMOPTS} -javaagent:basicAgent.jar \
142N/A -classpath "${TESTCLASSES}" StressGetObjectSizeApp StressGetObjectSizeApp \
142N/A > output.log 2>&1
142N/Acat output.log
142N/A
142N/AMESG="ASSERTION FAILED"
142N/Agrep "$MESG" output.log
142N/Aresult=$?
142N/Aif [ "$result" = 0 ]; then
142N/A echo "FAIL: found '$MESG' in the test output"
142N/A result=1
142N/Aelse
142N/A echo "PASS: did NOT find '$MESG' in the test output"
142N/A result=0
142N/Afi
142N/A
142N/Aexit $result