Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.
/ jdk23u Public archive

Commit 069283b

Browse files
Shivangi Guptacoffeys
Shivangi Gupta
authored andcommitted
8335172: Add manual steps to run security/auth/callback/TextCallbackHandler/Password.java test
Backport-of: a5c2d7b
1 parent 3e84510 commit 069283b

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

test/jdk/ProblemList.txt

-1
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,6 @@ sun/security/smartcardio/TestPresent.java 8039280 generic-
610610
sun/security/smartcardio/TestTransmit.java 8039280 generic-all
611611
com/sun/crypto/provider/Cipher/DES/PerformanceTest.java 8039280 generic-all
612612
com/sun/security/auth/callback/TextCallbackHandler/Default.java 8039280 generic-all
613-
com/sun/security/auth/callback/TextCallbackHandler/Password.java 8039280 generic-all
614613
com/sun/security/sasl/gsskerb/AuthOnly.java 8039280 generic-all
615614
com/sun/security/sasl/gsskerb/ConfSecurityLayer.java 8039280 generic-all
616615
com/sun/security/sasl/gsskerb/NoSecurityLayer.java 8039280 generic-all

test/jdk/TEST.groups

+1-1
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,6 @@ jdk_security_manual_no_input = \
625625
com/sun/crypto/provider/Cipher/AEAD/GCMIncrementByte4.java \
626626
com/sun/crypto/provider/Cipher/AEAD/GCMIncrementDirect4.java \
627627
com/sun/security/auth/callback/TextCallbackHandler/Default.java \
628-
com/sun/security/auth/callback/TextCallbackHandler/Password.java \
629628
com/sun/security/sasl/gsskerb/AuthOnly.java \
630629
com/sun/security/sasl/gsskerb/ConfSecurityLayer.java \
631630
com/sun/security/sasl/gsskerb/NoSecurityLayer.java \
@@ -654,6 +653,7 @@ jdk_core_manual_interactive = \
654653
jdk_security_manual_interactive = \
655654
sun/security/tools/keytool/i18n.java \
656655
java/security/Policy/Root/Root.java \
656+
com/sun/security/auth/callback/TextCallbackHandler/Password.java \
657657
sun/security/krb5/config/native/TestDynamicStore.java
658658

659659
# Test sets for running inside container environment

test/jdk/com/sun/security/auth/callback/TextCallbackHandler/Password.java

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009, 2014, 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
@@ -23,11 +23,23 @@
2323

2424
/*
2525
* @test
26-
* @bug 6825240
26+
* @bug 6825240 6829785
2727
* @summary Password.readPassword() echos the input when System.Console is null
2828
* @run main/manual Password
2929
*/
3030

31+
/*
32+
* This scenario cannot be automated because util/Password.java verifies the given input stream is
33+
* equal to the initialSystemIn. This prevents the test from providing a custom input stream.
34+
*
35+
* Steps to run the test:
36+
* 1) Compile the class using the JDK version being tested: '<JdkBin>/javac Password.java'
37+
* 2) Run the test using the JDK version being tested: '<JdkBin>/java -cp . Password'
38+
* 3) Type in the first password, it should not be visible in the console
39+
* 4) Type in the second password, it should be visible in the console
40+
* 5) The final output line displays the entered passwords, both should be visible
41+
*/
42+
3143
import com.sun.security.auth.callback.TextCallbackHandler;
3244
import javax.security.auth.callback.*;
3345

0 commit comments

Comments
 (0)