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