Skip to content

Commit 1af737e

Browse files
author
SendaoYan
committed
8339892: Several security shell tests don't set TESTJAVAOPTS
Backport-of: 8a2a75e56de4497da48f43b3be3eb71bf3ef75ab
1 parent d0abff2 commit 1af737e

File tree

10 files changed

+22
-22
lines changed

10 files changed

+22
-22
lines changed

test/jdk/java/security/Security/ClassLoaderDeadlock/ClassLoaderDeadlock.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -91,7 +91,7 @@ ${COMPILEJAVA}${FILESEP}bin${FILESEP}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} \
9191
${TESTSRC}${FILESEP}provider${FILESEP}HashProvider.java
9292

9393
# run the test
94-
${TESTJAVA}${FILESEP}bin${FILESEP}java ${TESTVMOPTS} \
94+
${TESTJAVA}${FILESEP}bin${FILESEP}java ${TESTVMOPTS} ${TESTJAVAOPTS} \
9595
-classpath "${TESTCLASSES}${PATHSEP}${TESTSRC}${FILESEP}Deadlock.jar" \
9696
-Djava.awt.headless=true \
9797
ClassLoaderDeadlock

test/jdk/java/security/Security/ClassLoaderDeadlock/Deadlock.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
#
4-
# Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
4+
# Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
55
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
66
#
77
# This code is free software; you can redistribute it and/or modify it
@@ -62,5 +62,5 @@ esac
6262

6363
JAVA="${TESTJAVA}${FILESEP}bin${FILESEP}java"
6464

65-
${JAVA} ${TESTVMOPTS} -cp "${TESTCLASSES}${PATHSEP}${TESTSRC}${FILESEP}Deadlock.jar" Deadlock
65+
${JAVA} ${TESTVMOPTS} ${TESTJAVAOPTS} -cp "${TESTCLASSES}${PATHSEP}${TESTSRC}${FILESEP}Deadlock.jar" Deadlock
6666

test/jdk/java/security/cert/CertificateFactory/slowstream.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2010, 2024, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -50,5 +50,5 @@ esac
5050

5151
${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . \
5252
${TESTSRC}${FS}SlowStream.java
53-
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Dtest.src=${TESTSRC} SlowStreamWriter | \
54-
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} SlowStreamReader
53+
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} ${TESTJAVAOPTS} -Dtest.src=${TESTSRC} SlowStreamWriter | \
54+
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} ${TESTJAVAOPTS} SlowStreamReader

test/jdk/sun/security/krb5/runNameEquals.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2009, 2024, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -94,7 +94,7 @@ EXIT_STATUS=0
9494

9595
if [ "${NATIVE}" = "true" ] ; then
9696
echo "Testing native provider"
97-
${TESTJAVA}${FILESEP}bin${FILESEP}java ${TESTVMOPTS} \
97+
${TESTJAVA}${FILESEP}bin${FILESEP}java ${TESTVMOPTS} ${TESTJAVAOPTS} \
9898
-classpath ${TESTCLASSES} \
9999
-Dsun.security.jgss.native=true \
100100
${TEST}
@@ -114,7 +114,7 @@ if [ "${NATIVE}" = "true" ] ; then
114114
fi
115115

116116
echo "Testing java provider"
117-
${TESTJAVA}${FILESEP}bin${FILESEP}java ${TESTVMOPTS} \
117+
${TESTJAVA}${FILESEP}bin${FILESEP}java ${TESTVMOPTS} ${TESTJAVAOPTS} \
118118
-classpath ${TESTCLASSES} \
119119
-Djava.security.krb5.realm=R \
120120
-Djava.security.krb5.kdc=127.0.0.1 \

test/jdk/sun/security/pkcs11/Provider/MultipleLogins.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ ${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} \
122122
${TESTSRC}${FS}MultipleLogins.java \
123123
${TESTSRC}${FS}..${FS}PKCS11Test.java
124124

125-
TEST_ARGS="${TESTVMOPTS} -classpath ${TESTCLASSPATH} \
125+
TEST_ARGS="${TESTVMOPTS} ${TESTJAVAOPTS} -classpath ${TESTCLASSPATH} \
126126
--add-modules jdk.crypto.cryptoki \
127127
--add-exports jdk.crypto.cryptoki/sun.security.pkcs11=ALL-UNNAMED \
128128
-DCUSTOM_DB_DIR=${TESTCLASSES} \

test/jdk/sun/security/provider/PolicyFile/getinstance/getinstance.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#! /bin/sh
22

33
#
4-
# Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved.
4+
# Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved.
55
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
66
#
77
# This code is free software; you can redistribute it and/or modify it
@@ -96,7 +96,7 @@ ${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d ${TESTCLA
9696
${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d ${TESTCLASSES}${FS}app \
9797
${TESTSRC}${FS}GetInstance.java
9898

99-
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} \
99+
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} ${TESTJAVAOPTS} \
100100
-Xbootclasspath/a:"${TESTCLASSES}${FS}boot" \
101101
-classpath "${TESTCLASSES}${FS}app" -Djava.security.manager \
102102
-Djava.security.policy=GetInstance.policy \
@@ -110,7 +110,7 @@ if [ $status1 -ne 0 ]; then
110110
echo "Failed on first test"
111111
fi
112112

113-
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} \
113+
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} ${TESTJAVAOPTS} \
114114
-classpath "${TESTCLASSES}${FS}boot${PS}${TESTCLASSES}${FS}app" \
115115
-Djava.security.manager \
116116
-Djava.security.policy=GetInstance.policy \

test/jdk/sun/security/ssl/SSLSocketImpl/NotifyHandshakeTest.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2002, 2024, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -86,7 +86,7 @@ rm -rf com edu
8686
# This is the only thing we really care about as far as
8787
# test status goes.
8888
#
89-
${TESTJAVA}${FILESEP}bin${FILESEP}java ${TESTVMOPTS} \
89+
${TESTJAVA}${FILESEP}bin${FILESEP}java ${TESTVMOPTS} ${TESTJAVAOPTS} \
9090
-Dtest.src=${TESTSRC} \
9191
-classpath "com.jar${PATHSEP}edu.jar" \
9292
-Djava.security.manager \

test/jdk/sun/security/util/Pem/encoding.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,6 @@
3030
# jtreg does not like -Dfile.encoding=UTF-16 inside a @run main line,
3131
# therefore a shell test is written.
3232

33-
$TESTJAVA/bin/java $TESTVMOPTS -cp $TESTCLASSES \
33+
$TESTJAVA/bin/java $TESTVMOPTS $TESTJAVAOPTS -cp $TESTCLASSES \
3434
-Dfile.encoding=UTF-16 \
3535
PemEncoding $TESTSRC/../HostnameChecker/cert5.crt

test/jdk/sun/security/validator/certreplace.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2010, 2024, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -85,4 +85,4 @@ $KT -delete -alias user
8585

8686
EXTRAOPTS="--add-exports java.base/sun.security.validator=ALL-UNNAMED"
8787
$JAVAC ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} ${EXTRAOPTS} -d . ${TESTSRC}${FS}CertReplace.java
88-
$JAVA ${TESTVMOPTS} ${EXTRAOPTS} CertReplace certreplace.jks certreplace.certs
88+
$JAVA ${TESTVMOPTS} ${TESTJAVAOPTS} ${EXTRAOPTS} CertReplace certreplace.jks certreplace.certs

test/jdk/sun/security/validator/samedn.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,5 @@ $KT -delete -alias user
8181

8282
EXTRAOPTS="--add-exports java.base/sun.security.validator=ALL-UNNAMED"
8383
$JAVAC ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} ${EXTRAOPTS} -d . ${TESTSRC}${FS}CertReplace.java
84-
$JAVA ${TESTVMOPTS} ${EXTRAOPTS} CertReplace samedn.jks samedn1.certs || exit 1
85-
$JAVA ${TESTVMOPTS} ${EXTRAOPTS} CertReplace samedn.jks samedn2.certs || exit 2
84+
$JAVA ${TESTVMOPTS} ${TESTJAVAOPTS} ${EXTRAOPTS} CertReplace samedn.jks samedn1.certs || exit 1
85+
$JAVA ${TESTVMOPTS} ${TESTJAVAOPTS} ${EXTRAOPTS} CertReplace samedn.jks samedn2.certs || exit 2

0 commit comments

Comments
 (0)