Mercurial > hg > truffle
annotate test/runtime/7110720/Test7110720.sh @ 14422:2b8e28fdf503
Merge
author | kvn |
---|---|
date | Tue, 05 Nov 2013 17:38:04 -0800 |
parents | 04d6d4322c6a |
children | de6a9e811145 |
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}" = "" ] |
8831
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6635
diff
changeset
|
15 then |
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6635
diff
changeset
|
16 TESTSRC=${PWD} |
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6635
diff
changeset
|
17 echo "TESTSRC not set. Using "${TESTSRC}" as default" |
6150
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
18 fi |
8831
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6635
diff
changeset
|
19 echo "TESTSRC=${TESTSRC}" |
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6635
diff
changeset
|
20 ## Adding common setup Variables for running shell tests. |
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6635
diff
changeset
|
21 . ${TESTSRC}/../../test_env.sh |
6150
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
22 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
23 # 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
|
24 # 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
|
25 # 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
|
26 # we can recognise that. |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
27 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
28 # set platform-dependent variables |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
29 OS=`uname -s` |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
30 case "$OS" in |
6598
6acee021f5ac
7129723: MAC: Some regression tests need to recognize Mac OS X platform
coleenp
parents:
6150
diff
changeset
|
31 SunOS | Linux | Darwin ) |
6150
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
32 FS="/" |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
33 RM=/bin/rm |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
34 CP=/bin/cp |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
35 MV=/bin/mv |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
36 ## for solaris, linux it's HOME |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
37 FILE_LOCATION=$HOME |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
38 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
|
39 then |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
40 TESTVMOPTS=`cat ${FILE_LOCATION}${FS}JDK64BIT` |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
41 fi |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
42 ;; |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
43 Windows_* ) |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
44 FS="\\" |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
45 RM=rm |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
46 CP=cp |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
47 MV=mv |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
48 ;; |
6635
83b6305a5638
7191926: Remove MKS dependency in Hotspot regression tests
coleenp
parents:
6598
diff
changeset
|
49 CYGWIN_* ) |
83b6305a5638
7191926: Remove MKS dependency in Hotspot regression tests
coleenp
parents:
6598
diff
changeset
|
50 FS="/" |
83b6305a5638
7191926: Remove MKS dependency in Hotspot regression tests
coleenp
parents:
6598
diff
changeset
|
51 RM=rm |
83b6305a5638
7191926: Remove MKS dependency in Hotspot regression tests
coleenp
parents:
6598
diff
changeset
|
52 CP=cp |
83b6305a5638
7191926: Remove MKS dependency in Hotspot regression tests
coleenp
parents:
6598
diff
changeset
|
53 MV=mv |
83b6305a5638
7191926: Remove MKS dependency in Hotspot regression tests
coleenp
parents:
6598
diff
changeset
|
54 ;; |
6150
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
55 * ) |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
56 echo "Unrecognized system!" |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
57 exit 1; |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
58 ;; |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
59 esac |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
60 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
61 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
62 JAVA=${TESTJAVA}${FS}bin${FS}java |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
63 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
64 # 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
|
65 ${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
|
66 if [ "$?" = "0" ]; then |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
67 echo Skipping test for debug build. |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
68 exit 0 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
69 fi |
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 ok=yes |
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 $RM -f .hotspot_compiler .hotspotrc |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
74 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
75 ${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
|
76 if [ "$?" = "0" ]; then |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
77 echo "FAILED: base case failure" |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
78 exit 1 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
79 fi |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
80 |
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 echo "garbage in, garbage out" > .hotspot_compiler |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
83 ${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
|
84 if [ "$?" = "0" ]; then |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
85 echo "FAILED: .hotspot_compiler was read" |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
86 ok=no |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
87 fi |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
88 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
89 $MV .hotspot_compiler hs_comp.txt |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
90 ${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
|
91 if [ "$?" = "1" ]; then |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
92 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
|
93 ok=no |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
94 fi |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
95 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
96 $RM -f .hotspot_compiler hs_comp.txt |
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 echo "garbage" > .hotspotrc |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
99 ${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
|
100 if [ "$?" = "0" ]; then |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
101 echo "FAILED: .hotspotrc was 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 $MV .hotspotrc hs_flags.txt |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
106 ${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
|
107 if [ "$?" = "1" ]; then |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
108 echo "FAILED: explicit flags file not read" |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
109 ok=no |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
110 fi |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
111 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
112 if [ "${ok}" = "no" ]; then |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
113 echo "Some tests failed." |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
114 exit 1 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
115 else |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
116 echo "Passed" |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
117 exit 0 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
118 fi |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
119 |