524N/A#!/bin/sh
3261N/A
524N/A#
524N/A# Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
524N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
524N/A#
2362N/A# This code is free software; you can redistribute it and/or modify it
524N/A# under the terms of the GNU General Public License version 2 only, as
2362N/A# published by the Free Software Foundation.
524N/A#
524N/A# This code is distributed in the hope that it will be useful, but WITHOUT
524N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
524N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
524N/A# version 2 for more details (a copy is included in the LICENSE file that
524N/A# accompanied this code).
524N/A#
524N/A# You should have received a copy of the GNU General Public License version
524N/A# 2 along with this work; if not, write to the Free Software Foundation,
524N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
524N/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.
524N/A#
0N/A
0N/A
0N/A# @test
0N/A# @bug 6260070
0N/A# @summary Unit test for jstack utility
0N/A#
0N/A# @library ../common
0N/A# @build SimpleApplication ShutdownSimpleApplication
0N/A# @run shell Basic.sh
0N/A
0N/A. ${TESTSRC}/../common/CommonSetup.sh
0N/A. ${TESTSRC}/../common/ApplicationSetup.sh
0N/A
0N/A# Start application and use PORTFILE for coordination
0N/APORTFILE="${TESTCLASSES}"/shutdown.port
0N/AstartApplication SimpleApplication "${PORTFILE}"
0N/A
0N/A# all return statuses are checked in this test
0N/Aset +e
0N/A
514N/Afailed=0
514N/A
893N/A# normal
893N/A$JSTACK -J-XX:+UsePerfData $appJavaPid 2>&1
893N/Aif [ $? != 0 ]; then failed=1; fi
893N/A
893N/A# long
893N/A$JSTACK -J-XX:+UsePerfData -l $appJavaPid 2>&1
893N/Aif [ $? != 0 ]; then failed=1; fi
893N/A
893N/Aset -e
893N/A
893N/AstopApplication "${PORTFILE}"
0N/AwaitForApplication
0N/A
0N/Aexit $failed
0N/A