annotate test/runtime/7162488/Test7162488.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
6017
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
1 #
17524
89152779163c Merge with jdk8-b132
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 14909
diff changeset
2 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
6017
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
4 #
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
5 # This code is free software; you can redistribute it and/or modify it
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
6 # under the terms of the GNU General Public License version 2 only, as
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
7 # published by the Free Software Foundation.
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
8 #
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
9 # This code is distributed in the hope that it will be useful, but WITHOUT
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
12 # version 2 for more details (a copy is included in the LICENSE file that
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
13 # accompanied this code).
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
14 #
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
15 # You should have received a copy of the GNU General Public License version
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
16 # 2 along with this work; if not, write to the Free Software Foundation,
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
18 #
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
20 # or visit www.oracle.com if you need additional information or have any
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
21 # questions.
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
22 #
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
23
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
24
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
25 # @test Test7162488.sh
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
26 # @bug 7162488
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
27 # @summary VM not printing unknown -XX options
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
28 # @run shell Test7162488.sh
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
29 #
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
30
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
31 if [ "${TESTSRC}" = "" ]
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
32 then
8831
04d6d4322c6a 8009152: A number of jtreg tests need review/improvement
collins
parents: 6017
diff changeset
33 TESTSRC=${PWD}
04d6d4322c6a 8009152: A number of jtreg tests need review/improvement
collins
parents: 6017
diff changeset
34 echo "TESTSRC not set. Using "${TESTSRC}" as default"
6017
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
35 fi
8831
04d6d4322c6a 8009152: A number of jtreg tests need review/improvement
collins
parents: 6017
diff changeset
36 echo "TESTSRC=${TESTSRC}"
04d6d4322c6a 8009152: A number of jtreg tests need review/improvement
collins
parents: 6017
diff changeset
37 ## Adding common setup Variables for running shell tests.
04d6d4322c6a 8009152: A number of jtreg tests need review/improvement
collins
parents: 6017
diff changeset
38 . ${TESTSRC}/../../test_env.sh
6017
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
39
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
40 JAVA=${TESTJAVA}${FS}bin${FS}java
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
41
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
42 #
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
43 # Just run with an option we are confident will not be recognized,
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
44 # and check for the message:
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
45 #
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
46 OPTION=this_is_not_an_option
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
47
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
48 ${JAVA} ${TESTVMOPTS} -showversion -XX:${OPTION} 2>&1 | grep "Unrecognized VM option"
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
49 if [ "$?" != "0" ]
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
50 then
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
51 printf "FAILED: option not flagged as unrecognized.\n"
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
52 exit 1
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
53 fi
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
54
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
55 ${JAVA} ${TESTVMOPTS} -showversion -XX:${OPTION} 2>&1 | grep ${OPTION}
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
56 if [ "$?" != "0" ]
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
57 then
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
58 printf "FAILED: bad option not named as being bad.\n"
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
59 exit 1
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
60 fi
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
61
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
62 printf "Passed.\n"
f3a4ee95783b 7162488: VM not printing unknown -XX options
kevinw
parents:
diff changeset
63