From e32c4ea00d160ccf15d00216b9339000c45928af Mon Sep 17 00:00:00 2001 From: Sanket Padawe Date: Wed, 10 May 2017 11:29:33 -0700 Subject: [PATCH] Fix more radio VTS test. + Increase timeout to 65s to fix some tests failing because of timeouts. Bug: 35800570 Test: vts Change-Id: Idf0204908592eac5f2a954d4425123df75999b1c --- radio/1.0/vts/functional/radio_hidl_hal_misc.cpp | 14 ++++++++------ radio/1.0/vts/functional/radio_hidl_hal_utils.h | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/radio/1.0/vts/functional/radio_hidl_hal_misc.cpp b/radio/1.0/vts/functional/radio_hidl_hal_misc.cpp index 65b055ce91..eac35f796a 100644 --- a/radio/1.0/vts/functional/radio_hidl_hal_misc.cpp +++ b/radio/1.0/vts/functional/radio_hidl_hal_misc.cpp @@ -143,15 +143,17 @@ TEST_F(RadioHidlTest, getAvailableNetworks) { radio->getAvailableNetworks(++serial); EXPECT_EQ(std::cv_status::no_timeout, wait()); - EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type); EXPECT_EQ(serial, radioRsp->rspInfo.serial); + ASSERT_TRUE(radioRsp->rspInfo.type == RadioResponseType::SOLICITED || + radioRsp->rspInfo.type == RadioResponseType::SOLICITED_ACK_EXP); if (cardStatus.cardState == CardState::ABSENT) { - ASSERT_TRUE(CheckGeneralError() || - radioRsp->rspInfo.error == RadioError::NONE || - radioRsp->rspInfo.error == RadioError::DEVICE_IN_USE || - radioRsp->rspInfo.error == RadioError::CANCELLED || - radioRsp->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED); + ASSERT_TRUE( + CheckGeneralError() || radioRsp->rspInfo.error == RadioError::NONE || + radioRsp->rspInfo.error == RadioError::DEVICE_IN_USE || + radioRsp->rspInfo.error == RadioError::CANCELLED || + radioRsp->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED || + radioRsp->rspInfo.error == RadioError::MODEM_ERR); } } diff --git a/radio/1.0/vts/functional/radio_hidl_hal_utils.h b/radio/1.0/vts/functional/radio_hidl_hal_utils.h index 735e5759cc..923e1e3775 100644 --- a/radio/1.0/vts/functional/radio_hidl_hal_utils.h +++ b/radio/1.0/vts/functional/radio_hidl_hal_utils.h @@ -80,7 +80,7 @@ using ::android::hardware::Return; using ::android::hardware::Void; using ::android::sp; -#define TIMEOUT_PERIOD 40 +#define TIMEOUT_PERIOD 65 #define RADIO_SERVICE_NAME "slot1" class RadioHidlTest;