annotate test/compiler/5091921/Test7005594.sh @ 17524:89152779163c

Merge with jdk8-b132
author Gilles Duboscq <duboscq@ssw.jku.at>
date Wed, 15 Oct 2014 11:59:32 +0200
parents 4ca6dc0799b6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3386
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
1 #!/bin/sh
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
2 #
17524
89152779163c Merge with jdk8-b132
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14909
diff changeset
3 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3386
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
5 #
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
6 # This code is free software; you can redistribute it and/or modify it
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
7 # under the terms of the GNU General Public License version 2 only, as
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
8 # published by the Free Software Foundation.
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
9 #
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
10 # This code is distributed in the hope that it will be useful, but WITHOUT
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
13 # version 2 for more details (a copy is included in the LICENSE file that
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
14 # accompanied this code).
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
15 #
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
16 # You should have received a copy of the GNU General Public License version
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
17 # 2 along with this work; if not, write to the Free Software Foundation,
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
18 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
19 #
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
20 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
21 # or visit www.oracle.com if you need additional information or have any
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
22 # questions.
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
23 #
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
24 #
8831
04d6d4322c6a 8009152: A number of jtreg tests need review/improvement
collins
parents: 3872
diff changeset
25 ## some tests require path to find test source dir
3386
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
26 if [ "${TESTSRC}" = "" ]
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
27 then
8831
04d6d4322c6a 8009152: A number of jtreg tests need review/improvement
collins
parents: 3872
diff changeset
28 TESTSRC=${PWD}
04d6d4322c6a 8009152: A number of jtreg tests need review/improvement
collins
parents: 3872
diff changeset
29 echo "TESTSRC not set. Using "${TESTSRC}" as default"
3386
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
30 fi
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
31 echo "TESTSRC=${TESTSRC}"
8831
04d6d4322c6a 8009152: A number of jtreg tests need review/improvement
collins
parents: 3872
diff changeset
32 ## Adding common setup Variables for running shell tests.
04d6d4322c6a 8009152: A number of jtreg tests need review/improvement
collins
parents: 3872
diff changeset
33 . ${TESTSRC}/../../test_env.sh
3386
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
34
3872
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
35 # Amount of physical memory in megabytes
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
36 MEM=0
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
37 if [ -f "/proc/meminfo" ]; then
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
38 # Linux, Windows/Cygwin
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
39 MEM=`cat /proc/meminfo |grep ^MemTotal: | awk '{print $2}'`
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
40 MEM="$(($MEM / 1024))"
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
41 elif [ -x "/usr/sbin/prtconf" ]; then
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
42 # Solaris
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
43 MEM=`/usr/sbin/prtconf | grep "^Memory size" | awk '{print $3}'`
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
44 elif [ -x "/usr/sbin/system_profiler" ]; then
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
45 # MacOS
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
46 MEMo=`/usr/sbin/system_profiler SPHardwareDataType | grep Memory:`
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
47 MEM=`echo "$MEMo" | awk '{print $2}'`
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
48 MEMu=`echo "$MEMo" | awk '{print $3}'`
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
49 case $MEMu in
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
50 GB)
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
51 MEM="$(($MEM * 1024))"
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
52 ;;
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
53 MB)
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
54 ;;
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
55 *)
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
56 echo "Unknown memory unit in system_profile output: $MEMu"
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
57 ;;
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
58 esac
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
59 elif [ -n "$ROOTDIR" -a -x "$ROOTDIR/mksnt/sysinf" ]; then
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
60 # Windows/MKS
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
61 MEM=`"$ROOTDIR/mksnt/sysinf" memory -v | grep "Total Physical Memory: " | sed 's/Total Physical Memory: *//g'`
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
62 MEM="$(($machine_memory / 1024))"
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
63 else
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
64 echo "Unable to determine amount of physical memory on the machine"
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
65 fi
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
66
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
67 if [ $MEM -lt 2000 ]; then
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
68 echo "Test skipped due to low (or unknown) memory on the system: $MEM Mb"
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
69 exit 0
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
70 fi
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
71
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
72 echo "MEMORY=$MEM Mb"
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
73
3386
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
74 set -x
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
75
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
76 cp ${TESTSRC}/Test7005594.java .
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
77 cp ${TESTSRC}/Test7005594.sh .
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
78
8831
04d6d4322c6a 8009152: A number of jtreg tests need review/improvement
collins
parents: 3872
diff changeset
79 ${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} -d . Test7005594.java
3386
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
80
3872
ff9ab6327924 7076831: TEST_BUG: compiler/5091921/Test7005594.java fails on LOW MEM SYSTEMS
kvn
parents: 3386
diff changeset
81 ${TESTJAVA}/bin/java ${TESTVMOPTS} -Xms1600m -XX:+IgnoreUnrecognizedVMOptions -XX:-ZapUnusedHeapArea -Xcomp -XX:CompileOnly=Test7005594.test Test7005594 > test.out 2>&1
3386
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
82
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
83 result=$?
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
84
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
85 cat test.out
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
86
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
87 if [ $result -eq 95 ]
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
88 then
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
89 echo "Passed"
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
90 exit 0
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
91 fi
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
92
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
93 if [ $result -eq 97 ]
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
94 then
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
95 echo "Failed"
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
96 exit 1
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
97 fi
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
98
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
99 # The test should pass when no enough space for object heap
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
100 grep "Could not reserve enough space for object heap" test.out
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
101 if [ $? = 0 ]
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
102 then
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
103 echo "Passed"
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
104 exit 0
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
105 else
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
106 echo "Failed"
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
107 exit 1
231c2b41ea4d 7045570: compiler/5091921/Test7005594.java failed because not enough space for object heap
kvn
parents:
diff changeset
108 fi