aboutsummaryrefslogtreecommitdiff
path: root/tests/iketests
diff options
context:
space:
mode:
authorCody Kesting <ckesting@google.com>2019-10-02 14:52:06 -0700
committerCody Kesting <ckesting@google.com>2019-10-08 09:41:00 -0700
commitd8ac99f95d6df5a1d6e42232a6e0d4a49d6f675f (patch)
treec2c14019e4078743fc6247c13d0e052e44fcad2f /tests/iketests
parent87d886cbf34ad4a0b89bd841f1788c4ae6a287be (diff)
downloadike-d8ac99f95d6df5a1d6e42232a6e0d4a49d6f675f.tar.gz
Improve EAP logging for easier debugging.
The EAP library currently has some logging. It is standardized and improved so that more error cases are logged. Bug: 141989627 Test: atest FrameworksIkeTests Change-Id: I742a6183c277a80690df4cc96b6faae9cb3560ae
Diffstat (limited to 'tests/iketests')
-rw-r--r--tests/iketests/src/java/com/android/ike/eap/statemachine/EapSimAkaMethodStateMachineTest.java19
1 files changed, 12 insertions, 7 deletions
diff --git a/tests/iketests/src/java/com/android/ike/eap/statemachine/EapSimAkaMethodStateMachineTest.java b/tests/iketests/src/java/com/android/ike/eap/statemachine/EapSimAkaMethodStateMachineTest.java
index 136e68da..71c5307f 100644
--- a/tests/iketests/src/java/com/android/ike/eap/statemachine/EapSimAkaMethodStateMachineTest.java
+++ b/tests/iketests/src/java/com/android/ike/eap/statemachine/EapSimAkaMethodStateMachineTest.java
@@ -362,7 +362,8 @@ public class EapSimAkaMethodStateMachineTest {
Arrays.asList(new AtNotification(GENERAL_FAILURE_PRE_CHALLENGE)));
EapResponse eapResponse =
- (EapResponse) mStateMachine.handleEapSimAkaNotification(true, ID_INT, typeData);
+ (EapResponse)
+ mStateMachine.handleEapSimAkaNotification(TAG, true, ID_INT, typeData);
assertArrayEquals(EAP_SIM_NOTIFICATION_RESPONSE, eapResponse.packet);
assertTrue(mStateMachine.mHasReceivedSimAkaNotification);
verify(mStateMachine, never()).transitionTo(any(EapMethodState.class));
@@ -376,7 +377,8 @@ public class EapSimAkaMethodStateMachineTest {
Arrays.asList(new AtNotification(GENERAL_FAILURE_POST_CHALLENGE)));
EapResponse eapResponse =
- (EapResponse) mStateMachine.handleEapSimAkaNotification(true, ID_INT, typeData);
+ (EapResponse)
+ mStateMachine.handleEapSimAkaNotification(TAG, true, ID_INT, typeData);
assertArrayEquals(EAP_SIM_CLIENT_ERROR_UNABLE_TO_PROCESS, eapResponse.packet);
verify(mStateMachine, never())
.transitionTo(any(EapMethodStateMachine.EapMethodState.class));
@@ -389,10 +391,10 @@ public class EapSimAkaMethodStateMachineTest {
EAP_SIM_NOTIFICATION,
Arrays.asList(new AtNotification(GENERAL_FAILURE_PRE_CHALLENGE)));
- mStateMachine.handleEapSimAkaNotification(true, ID_INT, typeData);
+ mStateMachine.handleEapSimAkaNotification(TAG, true, ID_INT, typeData);
EapError eapError =
- (EapError) mStateMachine.handleEapSimAkaNotification(true, ID_INT, typeData);
+ (EapError) mStateMachine.handleEapSimAkaNotification(TAG, true, ID_INT, typeData);
assertTrue(eapError.cause instanceof EapInvalidRequestException);
assertTrue(mStateMachine.mHasReceivedSimAkaNotification);
verify(mStateMachine, never())
@@ -408,7 +410,8 @@ public class EapSimAkaMethodStateMachineTest {
new AtNotification(GENERAL_FAILURE_PRE_CHALLENGE), new AtMac()));
EapResponse eapResponse =
- (EapResponse) mStateMachine.handleEapSimAkaNotification(true, ID_INT, typeData);
+ (EapResponse)
+ mStateMachine.handleEapSimAkaNotification(TAG, true, ID_INT, typeData);
assertArrayEquals(EAP_SIM_CLIENT_ERROR_UNABLE_TO_PROCESS, eapResponse.packet);
verify(mStateMachine, never())
.transitionTo(any(EapMethodStateMachine.EapMethodState.class));
@@ -431,7 +434,8 @@ public class EapSimAkaMethodStateMachineTest {
mStateMachine.mMacAlgorithm = mockMac;
EapResponse eapResponse =
- (EapResponse) mStateMachine.handleEapSimAkaNotification(false, ID_INT, typeData);
+ (EapResponse)
+ mStateMachine.handleEapSimAkaNotification(TAG, false, ID_INT, typeData);
assertArrayEquals(EAP_SIM_NOTIFICATION_RESPONSE_WITH_MAC, eapResponse.packet);
assertTrue(mStateMachine.mHasReceivedSimAkaNotification);
verify(mStateMachine, never()).transitionTo(any(EapMethodState.class));
@@ -449,7 +453,8 @@ public class EapSimAkaMethodStateMachineTest {
Arrays.asList(new AtNotification(GENERAL_FAILURE_POST_CHALLENGE)));
EapResponse eapResponse =
- (EapResponse) mStateMachine.handleEapSimAkaNotification(false, ID_INT, typeData);
+ (EapResponse)
+ mStateMachine.handleEapSimAkaNotification(TAG, false, ID_INT, typeData);
assertArrayEquals(EAP_SIM_CLIENT_ERROR_UNABLE_TO_PROCESS, eapResponse.packet);
verify(mStateMachine, never()).transitionTo(any(EapMethodState.class));
}