jdk/test/sun/security/pkcs11/Config/ReadConfInUTF16Env.sh
author igerasim
Thu, 31 Aug 2017 22:21:20 -0700
changeset 47112 fe70db821411
permissions -rw-r--r--
8187023: Cannot read pkcs11 config file in UTF-16 environment Reviewed-by: ascarpino
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
47112
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
     1
#
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
     2
# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
     4
#
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
     7
# published by the Free Software Foundation.
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
     8
#
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
     9
# This code is distributed in the hope that it will be useful, but WITHOUT
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
    10
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
    11
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
    12
# version 2 for more details (a copy is included in the LICENSE file that
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
    13
# accompanied this code).
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
    14
#
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
    15
# You should have received a copy of the GNU General Public License version
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
    16
# 2 along with this work; if not, write to the Free Software Foundation,
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
    17
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
    18
#
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
    19
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
    20
# or visit www.oracle.com if you need additional information or have any
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
    21
# questions.
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
    22
#
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
    23
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
    24
# @test
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
    25
# @bug 8187023
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
    26
# @summary Pkcs11 config file should be assumed in ISO-8859-1
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
    27
# @build ReadConfInUTF16Env
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
    28
# @run shell ReadConfInUTF16Env.sh
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
    29
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
    30
# jtreg does not like -Dfile.encoding=UTF-16 inside a @run main line,
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
    31
# testlibrary.ProcessTools.createJavaProcessBuilder() also had troubles
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
    32
# executing a subprocess with -Dfile.encoding=UTF-16 option added,
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
    33
# therefore a shell test is written.
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
    34
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
    35
$TESTJAVA/bin/java $TESTVMOPTS -cp $TESTCLASSES \
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
    36
  -Dfile.encoding=UTF-16 \
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
    37
  ReadConfInUTF16Env
fe70db821411 8187023: Cannot read pkcs11 config file in UTF-16 environment
igerasim
parents:
diff changeset
    38