test/hotspot/jtreg/runtime/StackGuardPages/testme.sh
author michaelm
Fri, 16 Feb 2018 10:34:17 +0000
branchhttp-client-branch
changeset 56137 dd867826d55b
parent 47216 71c04702a3d5
permissions -rw-r--r--
http-client-branch: added system property to disable hostname verification for testing
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
39974
f76ca6458acb 8144278: [TESTBUG] hotspot/runtime/StackGuardPages/testme.sh should use native library build support
gthornbr
parents: 24661
diff changeset
     1
# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
f76ca6458acb 8144278: [TESTBUG] hotspot/runtime/StackGuardPages/testme.sh should use native library build support
gthornbr
parents: 24661
diff changeset
     2
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
f76ca6458acb 8144278: [TESTBUG] hotspot/runtime/StackGuardPages/testme.sh should use native library build support
gthornbr
parents: 24661
diff changeset
     3
#
f76ca6458acb 8144278: [TESTBUG] hotspot/runtime/StackGuardPages/testme.sh should use native library build support
gthornbr
parents: 24661
diff changeset
     4
# This code is free software; you can redistribute it and/or modify it
f76ca6458acb 8144278: [TESTBUG] hotspot/runtime/StackGuardPages/testme.sh should use native library build support
gthornbr
parents: 24661
diff changeset
     5
# under the terms of the GNU General Public License version 2 only, as
f76ca6458acb 8144278: [TESTBUG] hotspot/runtime/StackGuardPages/testme.sh should use native library build support
gthornbr
parents: 24661
diff changeset
     6
# published by the Free Software Foundation.
f76ca6458acb 8144278: [TESTBUG] hotspot/runtime/StackGuardPages/testme.sh should use native library build support
gthornbr
parents: 24661
diff changeset
     7
#
f76ca6458acb 8144278: [TESTBUG] hotspot/runtime/StackGuardPages/testme.sh should use native library build support
gthornbr
parents: 24661
diff changeset
     8
# This code is distributed in the hope that it will be useful, but WITHOUT
f76ca6458acb 8144278: [TESTBUG] hotspot/runtime/StackGuardPages/testme.sh should use native library build support
gthornbr
parents: 24661
diff changeset
     9
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
f76ca6458acb 8144278: [TESTBUG] hotspot/runtime/StackGuardPages/testme.sh should use native library build support
gthornbr
parents: 24661
diff changeset
    10
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
f76ca6458acb 8144278: [TESTBUG] hotspot/runtime/StackGuardPages/testme.sh should use native library build support
gthornbr
parents: 24661
diff changeset
    11
# version 2 for more details (a copy is included in the LICENSE file that
f76ca6458acb 8144278: [TESTBUG] hotspot/runtime/StackGuardPages/testme.sh should use native library build support
gthornbr
parents: 24661
diff changeset
    12
# accompanied this code).
f76ca6458acb 8144278: [TESTBUG] hotspot/runtime/StackGuardPages/testme.sh should use native library build support
gthornbr
parents: 24661
diff changeset
    13
#
f76ca6458acb 8144278: [TESTBUG] hotspot/runtime/StackGuardPages/testme.sh should use native library build support
gthornbr
parents: 24661
diff changeset
    14
# You should have received a copy of the GNU General Public License version
f76ca6458acb 8144278: [TESTBUG] hotspot/runtime/StackGuardPages/testme.sh should use native library build support
gthornbr
parents: 24661
diff changeset
    15
# 2 along with this work; if not, write to the Free Software Foundation,
f76ca6458acb 8144278: [TESTBUG] hotspot/runtime/StackGuardPages/testme.sh should use native library build support
gthornbr
parents: 24661
diff changeset
    16
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
f76ca6458acb 8144278: [TESTBUG] hotspot/runtime/StackGuardPages/testme.sh should use native library build support
gthornbr
parents: 24661
diff changeset
    17
#
f76ca6458acb 8144278: [TESTBUG] hotspot/runtime/StackGuardPages/testme.sh should use native library build support
gthornbr
parents: 24661
diff changeset
    18
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f76ca6458acb 8144278: [TESTBUG] hotspot/runtime/StackGuardPages/testme.sh should use native library build support
gthornbr
parents: 24661
diff changeset
    19
# or visit www.oracle.com if you need additional information or have any
f76ca6458acb 8144278: [TESTBUG] hotspot/runtime/StackGuardPages/testme.sh should use native library build support
gthornbr
parents: 24661
diff changeset
    20
# questions.
24661
27e82ef5a006 8042155: [TESTBUG] Tests for stack guard pages have to be cleaned up
dsamersoff
parents:
diff changeset
    21
#!/bin/sh
27e82ef5a006 8042155: [TESTBUG] Tests for stack guard pages have to be cleaned up
dsamersoff
parents:
diff changeset
    22
27e82ef5a006 8042155: [TESTBUG] Tests for stack guard pages have to be cleaned up
dsamersoff
parents:
diff changeset
    23
#
27e82ef5a006 8042155: [TESTBUG] Tests for stack guard pages have to be cleaned up
dsamersoff
parents:
diff changeset
    24
# @test testme.sh
27e82ef5a006 8042155: [TESTBUG] Tests for stack guard pages have to be cleaned up
dsamersoff
parents:
diff changeset
    25
# @summary Stack guard pages should be installed correctly and removed when thread is detached
39974
f76ca6458acb 8144278: [TESTBUG] hotspot/runtime/StackGuardPages/testme.sh should use native library build support
gthornbr
parents: 24661
diff changeset
    26
# @compile DoOverflow.java
24661
27e82ef5a006 8042155: [TESTBUG] Tests for stack guard pages have to be cleaned up
dsamersoff
parents:
diff changeset
    27
# @run shell testme.sh
27e82ef5a006 8042155: [TESTBUG] Tests for stack guard pages have to be cleaned up
dsamersoff
parents:
diff changeset
    28
#
27e82ef5a006 8042155: [TESTBUG] Tests for stack guard pages have to be cleaned up
dsamersoff
parents:
diff changeset
    29
27e82ef5a006 8042155: [TESTBUG] Tests for stack guard pages have to be cleaned up
dsamersoff
parents:
diff changeset
    30
if [ "${TESTSRC}" = "" ]
27e82ef5a006 8042155: [TESTBUG] Tests for stack guard pages have to be cleaned up
dsamersoff
parents:
diff changeset
    31
then
27e82ef5a006 8042155: [TESTBUG] Tests for stack guard pages have to be cleaned up
dsamersoff
parents:
diff changeset
    32
  TESTSRC=${PWD}
27e82ef5a006 8042155: [TESTBUG] Tests for stack guard pages have to be cleaned up
dsamersoff
parents:
diff changeset
    33
  echo "TESTSRC not set.  Using "${TESTSRC}" as default"
27e82ef5a006 8042155: [TESTBUG] Tests for stack guard pages have to be cleaned up
dsamersoff
parents:
diff changeset
    34
fi
27e82ef5a006 8042155: [TESTBUG] Tests for stack guard pages have to be cleaned up
dsamersoff
parents:
diff changeset
    35
echo "TESTSRC=${TESTSRC}"
27e82ef5a006 8042155: [TESTBUG] Tests for stack guard pages have to be cleaned up
dsamersoff
parents:
diff changeset
    36
## Adding common setup Variables for running shell tests.
27e82ef5a006 8042155: [TESTBUG] Tests for stack guard pages have to be cleaned up
dsamersoff
parents:
diff changeset
    37
. ${TESTSRC}/../../test_env.sh
27e82ef5a006 8042155: [TESTBUG] Tests for stack guard pages have to be cleaned up
dsamersoff
parents:
diff changeset
    38
27e82ef5a006 8042155: [TESTBUG] Tests for stack guard pages have to be cleaned up
dsamersoff
parents:
diff changeset
    39
if [ "${VM_OS}" != "linux" ]
27e82ef5a006 8042155: [TESTBUG] Tests for stack guard pages have to be cleaned up
dsamersoff
parents:
diff changeset
    40
then
27e82ef5a006 8042155: [TESTBUG] Tests for stack guard pages have to be cleaned up
dsamersoff
parents:
diff changeset
    41
  echo "Test only valid for Linux"
27e82ef5a006 8042155: [TESTBUG] Tests for stack guard pages have to be cleaned up
dsamersoff
parents:
diff changeset
    42
  exit 0
27e82ef5a006 8042155: [TESTBUG] Tests for stack guard pages have to be cleaned up
dsamersoff
parents:
diff changeset
    43
fi
27e82ef5a006 8042155: [TESTBUG] Tests for stack guard pages have to be cleaned up
dsamersoff
parents:
diff changeset
    44
42633
0c23e9d8fccf 8066474: Remove the lib/ directory from Linux and Solaris images
erikj
parents: 39974
diff changeset
    45
LD_LIBRARY_PATH=.:${TESTJAVA}/lib/${VM_TYPE}:/usr/lib:$LD_LIBRARY_PATH
24661
27e82ef5a006 8042155: [TESTBUG] Tests for stack guard pages have to be cleaned up
dsamersoff
parents:
diff changeset
    46
export LD_LIBRARY_PATH
27e82ef5a006 8042155: [TESTBUG] Tests for stack guard pages have to be cleaned up
dsamersoff
parents:
diff changeset
    47
39974
f76ca6458acb 8144278: [TESTBUG] hotspot/runtime/StackGuardPages/testme.sh should use native library build support
gthornbr
parents: 24661
diff changeset
    48
# Run the test for a java and native overflow
f76ca6458acb 8144278: [TESTBUG] hotspot/runtime/StackGuardPages/testme.sh should use native library build support
gthornbr
parents: 24661
diff changeset
    49
${TESTNATIVEPATH}/invoke test_java_overflow
f76ca6458acb 8144278: [TESTBUG] hotspot/runtime/StackGuardPages/testme.sh should use native library build support
gthornbr
parents: 24661
diff changeset
    50
${TESTNATIVEPATH}/invoke test_native_overflow
24661
27e82ef5a006 8042155: [TESTBUG] Tests for stack guard pages have to be cleaned up
dsamersoff
parents:
diff changeset
    51
exit $?