Mercurial > hg > truffle
annotate test/runtime/7110720/Test7110720.sh @ 8421:24608582da70
method substitutions are now stored with a MethodSubstitution.class key value in the compiler storage of the original (i.e., substituted) method
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 21 Mar 2013 12:23:37 +0100 |
parents | 83b6305a5638 |
children | 04d6d4322c6a |
rev | line source |
---|---|
6150
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
1 # |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
2 # Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
4 # |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
5 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
6 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
7 # |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
8 # @test Test7110720.sh |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
9 # @bug 7110720 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
10 # @summary improve VM configuration file loading |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
11 # @run shell Test7110720.sh |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
12 # |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
13 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
14 if [ "${TESTSRC}" = "" ] |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
15 then TESTSRC=. |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
16 fi |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
17 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
18 if [ "${TESTJAVA}" = "" ] |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
19 then |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
20 PARENT=`dirname \`which java\`` |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
21 TESTJAVA=`dirname ${PARENT}` |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
22 echo "TESTJAVA not set, selecting " ${TESTJAVA} |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
23 echo "If this is incorrect, try setting the variable manually." |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
24 fi |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
25 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
26 if [ "${TESTCLASSES}" = "" ] |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
27 then |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
28 echo "TESTCLASSES not set. Test cannot execute. Failed." |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
29 exit 1 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
30 fi |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
31 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
32 # Jtreg sets TESTVMOPTS which may include -d64 which is |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
33 # required to test a 64-bit JVM on some platforms. |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
34 # If another test harness still creates HOME/JDK64BIT, |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
35 # we can recognise that. |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
36 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
37 # set platform-dependent variables |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
38 OS=`uname -s` |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
39 case "$OS" in |
6598
6acee021f5ac
7129723: MAC: Some regression tests need to recognize Mac OS X platform
coleenp
parents:
6150
diff
changeset
|
40 SunOS | Linux | Darwin ) |
6150
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
41 FS="/" |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
42 RM=/bin/rm |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
43 CP=/bin/cp |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
44 MV=/bin/mv |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
45 ## for solaris, linux it's HOME |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
46 FILE_LOCATION=$HOME |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
47 if [ -f ${FILE_LOCATION}${FS}JDK64BIT -a ${OS} = "SunOS" ] |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
48 then |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
49 TESTVMOPTS=`cat ${FILE_LOCATION}${FS}JDK64BIT` |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
50 fi |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
51 ;; |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
52 Windows_* ) |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
53 FS="\\" |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
54 RM=rm |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
55 CP=cp |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
56 MV=mv |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
57 ;; |
6635
83b6305a5638
7191926: Remove MKS dependency in Hotspot regression tests
coleenp
parents:
6598
diff
changeset
|
58 CYGWIN_* ) |
83b6305a5638
7191926: Remove MKS dependency in Hotspot regression tests
coleenp
parents:
6598
diff
changeset
|
59 FS="/" |
83b6305a5638
7191926: Remove MKS dependency in Hotspot regression tests
coleenp
parents:
6598
diff
changeset
|
60 RM=rm |
83b6305a5638
7191926: Remove MKS dependency in Hotspot regression tests
coleenp
parents:
6598
diff
changeset
|
61 CP=cp |
83b6305a5638
7191926: Remove MKS dependency in Hotspot regression tests
coleenp
parents:
6598
diff
changeset
|
62 MV=mv |
83b6305a5638
7191926: Remove MKS dependency in Hotspot regression tests
coleenp
parents:
6598
diff
changeset
|
63 ;; |
6150
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
64 * ) |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
65 echo "Unrecognized system!" |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
66 exit 1; |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
67 ;; |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
68 esac |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
69 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
70 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
71 JAVA=${TESTJAVA}${FS}bin${FS}java |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
72 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
73 # Don't test debug builds, they do read the config files: |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
74 ${JAVA} ${TESTVMOPTS} -version 2>&1 | grep "debug" >/dev/null |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
75 if [ "$?" = "0" ]; then |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
76 echo Skipping test for debug build. |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
77 exit 0 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
78 fi |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
79 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
80 ok=yes |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
81 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
82 $RM -f .hotspot_compiler .hotspotrc |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
83 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
84 ${JAVA} ${TESTVMOPTS} -version 2>&1 | grep "garbage in" >/dev/null |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
85 if [ "$?" = "0" ]; then |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
86 echo "FAILED: base case failure" |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
87 exit 1 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
88 fi |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
89 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
90 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
91 echo "garbage in, garbage out" > .hotspot_compiler |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
92 ${JAVA} ${TESTVMOPTS} -version 2>&1 | grep "garbage in" >/dev/null |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
93 if [ "$?" = "0" ]; then |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
94 echo "FAILED: .hotspot_compiler was read" |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
95 ok=no |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
96 fi |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
97 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
98 $MV .hotspot_compiler hs_comp.txt |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
99 ${JAVA} ${TESTVMOPTS} -XX:CompileCommandFile=hs_comp.txt -version 2>&1 | grep "garbage in" >/dev/null |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
100 if [ "$?" = "1" ]; then |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
101 echo "FAILED: explicit compiler command file not read" |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
102 ok=no |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
103 fi |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
104 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
105 $RM -f .hotspot_compiler hs_comp.txt |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
106 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
107 echo "garbage" > .hotspotrc |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
108 ${JAVA} ${TESTVMOPTS} -version 2>&1 | grep "garbage" >/dev/null |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
109 if [ "$?" = "0" ]; then |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
110 echo "FAILED: .hotspotrc was read" |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
111 ok=no |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
112 fi |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
113 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
114 $MV .hotspotrc hs_flags.txt |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
115 ${JAVA} ${TESTVMOPTS} -XX:Flags=hs_flags.txt -version 2>&1 | grep "garbage" >/dev/null |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
116 if [ "$?" = "1" ]; then |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
117 echo "FAILED: explicit flags file not read" |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
118 ok=no |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
119 fi |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
120 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
121 if [ "${ok}" = "no" ]; then |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
122 echo "Some tests failed." |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
123 exit 1 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
124 else |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
125 echo "Passed" |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
126 exit 0 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
127 fi |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
128 |