Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openjdk-multiarch-jdk8u
Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/test/javax/crypto/SecretKeyFactory/FailOverTest.sh
38838 views
1
#
2
# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
#
5
# This code is free software; you can redistribute it and/or modify it
6
# under the terms of the GNU General Public License version 2 only, as
7
# published by the Free Software Foundation.
8
#
9
# This code is distributed in the hope that it will be useful, but WITHOUT
10
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12
# version 2 for more details (a copy is included in the LICENSE file that
13
# accompanied this code).
14
#
15
# You should have received a copy of the GNU General Public License version
16
# 2 along with this work; if not, write to the Free Software Foundation,
17
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18
#
19
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20
# or visit www.oracle.com if you need additional information or have any
21
# questions.
22
#
23
24
#
25
# @test
26
# @bug 6370923
27
# @summary SecretKeyFactory failover does not work
28
# @author Brad R. Wetmore
29
#
30
31
if [ "${TESTJAVA}" = "" ]
32
then
33
echo "TESTJAVA not set. Test cannot execute. Failed."
34
exit 1
35
fi
36
echo "TESTJAVA=${TESTJAVA}"
37
38
if [ "${COMPILEJAVA}" = "" ]; then
39
COMPILEJAVA="${TESTJAVA}"
40
fi
41
echo "COMPILEJAVA=${COMPILEJAVA}"
42
43
if [ "${TESTSRC}" = "" ]
44
then
45
TESTSRC="."
46
fi
47
echo "TESTSRC=${TESTSRC}"
48
49
50
if [ "${TESTCLASSES}" = "" ]
51
then
52
TESTCLASSES="."
53
fi
54
echo "TESTCLASSES=${TESTCLASSES}"
55
56
# set platform-dependent variables
57
OS=`uname -s`
58
case "$OS" in
59
SunOS | Linux | Darwin | AIX )
60
NULL=/dev/null
61
PS=":"
62
FS="/"
63
;;
64
CYGWIN* )
65
NULL=/dev/null
66
PS=";"
67
FS="/"
68
;;
69
Windows* )
70
NULL=NUL
71
PS=";"
72
FS="\\"
73
;;
74
* )
75
echo "Unrecognized system!"
76
exit 1;
77
;;
78
esac
79
80
${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} \
81
-d . \
82
-classpath "${TESTSRC}${FS}P1.jar${PS}${TESTSRC}${FS}P2.jar" \
83
${TESTSRC}${FS}FailOverTest.java
84
85
if [ $? -ne 0 ]; then
86
exit 1
87
fi
88
89
${TESTJAVA}${FS}bin${FS}java \
90
${TESTVMOPTS} \
91
-Djava.security.properties=${TESTSRC}${FS}security.properties \
92
-classpath "${TESTSRC}${FS}P1.jar${PS}${TESTSRC}${FS}P2.jar${PS}." \
93
FailOverTest
94
result=$?
95
96
if [ $result -eq 0 ]
97
then
98
echo "Passed"
99
else
100
echo "Failed"
101
fi
102
exit $result
103
104