summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTreeHugger Robot2018-06-07 16:49:07 -0500
committerAndroid (Google) Code Review2018-06-07 16:49:07 -0500
commit8303aca7292099cd9385694cfc4133e06ad6613f (patch)
tree1296c392f0dd7944433ba63ed01037fc3947999b
parente0c4c497b3f21098f57c082b6cbf8b4f5fd72d36 (diff)
parent147ec3007642dc2403c845022708789a7972687d (diff)
downloadplatform-hardware-interfaces-8303aca7292099cd9385694cfc4133e06ad6613f.tar.gz
platform-hardware-interfaces-8303aca7292099cd9385694cfc4133e06ad6613f.tar.xz
platform-hardware-interfaces-8303aca7292099cd9385694cfc4133e06ad6613f.zip
Merge "secure_element: vts: Fix openBasicChannel and transmit test case" into pi-dev
-rw-r--r--secure_element/1.0/vts/functional/VtsHalSecureElementV1_0TargetTest.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/secure_element/1.0/vts/functional/VtsHalSecureElementV1_0TargetTest.cpp b/secure_element/1.0/vts/functional/VtsHalSecureElementV1_0TargetTest.cpp
index dab81e2a..3ea3e8dc 100644
--- a/secure_element/1.0/vts/functional/VtsHalSecureElementV1_0TargetTest.cpp
+++ b/secure_element/1.0/vts/functional/VtsHalSecureElementV1_0TargetTest.cpp
@@ -134,6 +134,7 @@ TEST_F(SecureElementHidlTest, transmit) {
134 EXPECT_LE((unsigned int)2, response.selectResponse.size()); 134 EXPECT_LE((unsigned int)2, response.selectResponse.size());
135 EXPECT_LE(1, response.channelNumber); 135 EXPECT_LE(1, response.channelNumber);
136 std::vector<uint8_t> command = DATA_APDU; 136 std::vector<uint8_t> command = DATA_APDU;
137 command[0] |= response.channelNumber;
137 std::vector<uint8_t> transmitResponse; 138 std::vector<uint8_t> transmitResponse;
138 se_->transmit(command, [&transmitResponse](std::vector<uint8_t> res) { 139 se_->transmit(command, [&transmitResponse](std::vector<uint8_t> res) {
139 transmitResponse.resize(res.size()); 140 transmitResponse.resize(res.size());
@@ -168,7 +169,8 @@ TEST_F(SecureElementHidlTest, openBasicChannel) {
168 } 169 }
169 }); 170 });
170 if (statusReturned == SecureElementStatus::SUCCESS) { 171 if (statusReturned == SecureElementStatus::SUCCESS) {
171 EXPECT_LE((unsigned int)3, response.size()); 172 EXPECT_LE((unsigned int)2, response.size());
173 se_->closeChannel(0);
172 return; 174 return;
173 } 175 }
174 EXPECT_EQ(SecureElementStatus::UNSUPPORTED_OPERATION, statusReturned); 176 EXPECT_EQ(SecureElementStatus::UNSUPPORTED_OPERATION, statusReturned);