Wed, 22 Jan 2014 12:37:28 -0800
Added tag jdk8u5-b05 for changeset b90de55aca30
iignatyev@5029 | 1 | #!/bin/sh |
iignatyev@5029 | 2 | # |
iignatyev@5029 | 3 | # Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
iignatyev@5029 | 4 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
iignatyev@5029 | 5 | # |
iignatyev@5029 | 6 | # This code is free software; you can redistribute it and/or modify it |
iignatyev@5029 | 7 | # under the terms of the GNU General Public License version 2 only, as |
iignatyev@5029 | 8 | # published by the Free Software Foundation. |
iignatyev@5029 | 9 | # |
iignatyev@5029 | 10 | # This code is distributed in the hope that it will be useful, but WITHOUT |
iignatyev@5029 | 11 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
iignatyev@5029 | 12 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
iignatyev@5029 | 13 | # version 2 for more details (a copy is included in the LICENSE file that |
iignatyev@5029 | 14 | # accompanied this code). |
iignatyev@5029 | 15 | # |
iignatyev@5029 | 16 | # You should have received a copy of the GNU General Public License version |
iignatyev@5029 | 17 | # 2 along with this work; if not, write to the Free Software Foundation, |
iignatyev@5029 | 18 | # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
iignatyev@5029 | 19 | # |
iignatyev@5029 | 20 | # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
iignatyev@5029 | 21 | # or visit www.oracle.com if you need additional information or have any |
iignatyev@5029 | 22 | # questions. |
iignatyev@5029 | 23 | # |
iignatyev@5029 | 24 | # |
iignatyev@5029 | 25 | |
iignatyev@5029 | 26 | ## |
iignatyev@5029 | 27 | ## @test |
iignatyev@5029 | 28 | ## @bug 8011675 |
iignatyev@5029 | 29 | ## @summary testing of ciReplay with using generated by SA replay.txt |
iignatyev@5029 | 30 | ## @author igor.ignatyev@oracle.com |
iignatyev@5029 | 31 | ## @run shell TestSA.sh |
iignatyev@5029 | 32 | ## |
iignatyev@5029 | 33 | |
iignatyev@5029 | 34 | if [ "${TESTSRC}" = "" ] |
iignatyev@5029 | 35 | then |
iignatyev@5029 | 36 | TESTSRC=${PWD} |
iignatyev@5029 | 37 | echo "TESTSRC not set. Using "${TESTSRC}" as default" |
iignatyev@5029 | 38 | fi |
iignatyev@5029 | 39 | echo "TESTSRC=${TESTSRC}" |
iignatyev@5029 | 40 | |
iignatyev@5029 | 41 | ## Adding common setup Variables for running shell tests. |
iignatyev@5029 | 42 | . ${TESTSRC}/../../test_env.sh |
iignatyev@5029 | 43 | |
iignatyev@5029 | 44 | . ${TESTSRC}/common.sh |
iignatyev@5029 | 45 | |
iignatyev@5029 | 46 | generate_replay |
iignatyev@5029 | 47 | |
iignatyev@5029 | 48 | ${MV} ${replay_data} replay_vm.txt |
iignatyev@5029 | 49 | |
iignatyev@5029 | 50 | if [ -z "${core_file}" -o ! -r "${core_file}" ] |
iignatyev@5029 | 51 | then |
iignatyev@5029 | 52 | # skip test if MacOS host isn't configured for core dumping |
iignatyev@5029 | 53 | if [ "$OS" = "Darwin" ] |
iignatyev@5029 | 54 | then |
iignatyev@5029 | 55 | if [ ! -d "/cores" ] |
iignatyev@5029 | 56 | then |
iignatyev@5029 | 57 | echo TEST SKIPPED: \'/cores\' dir doens\'t exist |
iignatyev@5029 | 58 | exit 0 |
iignatyev@5029 | 59 | fi |
iignatyev@5029 | 60 | if [ ! -w "/cores" ] |
iignatyev@5029 | 61 | then |
iignatyev@5029 | 62 | echo TEST SKIPPED: \'/cores\' dir exists but is not writable |
iignatyev@5029 | 63 | exit 0 |
iignatyev@5029 | 64 | fi |
iignatyev@5029 | 65 | fi |
iignatyev@5029 | 66 | test_fail 2 "CHECK :: CORE GENERATION" "core wasn't generated on $OS" |
iignatyev@5029 | 67 | fi |
iignatyev@5029 | 68 | |
iignatyev@5029 | 69 | echo "dumpreplaydata -a > ${replay_data}" | \ |
iignatyev@5029 | 70 | ${JAVA} ${TESTVMOPTS} \ |
iignatyev@5029 | 71 | -cp ${TESTJAVA}${FS}lib${FS}sa-jdi.jar \ |
iignatyev@5029 | 72 | sun.jvm.hotspot.CLHSDB ${JAVA} ${core_file} |
iignatyev@5029 | 73 | |
iignatyev@5029 | 74 | if [ ! -s ${replay_data} ] |
iignatyev@5029 | 75 | then |
iignatyev@5029 | 76 | test_fail 1 "CHECK :: REPLAY DATA GENERATION" \ |
iignatyev@5029 | 77 | "replay data wasn't generated by SA" |
iignatyev@5029 | 78 | fi |
iignatyev@5029 | 79 | |
iignatyev@5114 | 80 | diff ${replay_data} replay_vm.txt > replay.diff 2>&1 |
iignatyev@5114 | 81 | if [ -s replay.diff ] |
iignatyev@5029 | 82 | then |
iignatyev@5114 | 83 | echo WARNING: replay.txt from SA != replay.txt from VM: |
iignatyev@5114 | 84 | cat replay.diff |
iignatyev@5029 | 85 | fi |
iignatyev@5029 | 86 | |
iignatyev@5029 | 87 | common_tests 10 |
iignatyev@5029 | 88 | ${VM_TYPE}_tests 20 |
iignatyev@5029 | 89 | |
iignatyev@5029 | 90 | cleanup |
iignatyev@5029 | 91 | |
iignatyev@5029 | 92 | echo TEST PASSED |
iignatyev@5029 | 93 |