wait for response before running next TC

All TCs store RadioResponseInfo in a shared variable and
read it to verify the result. So there is race condition
problem if we don't wait for responses.

Bug: 228593077
Test: run vts -m VtsHalRadioTargetTest
Change-Id: I45e60f324926588c55abd0a719fd55352767a3eb
Merged-In: I45e60f324926588c55abd0a719fd55352767a3eb
This commit is contained in:
Tim Lin
2022-04-08 22:54:48 +08:00
parent 1a55fff64b
commit 148303775a

View File

@@ -59,6 +59,7 @@ TEST_P(RadioConfigTest, getHalDeviceCapabilities) {
serial = GetRandomSerialNumber();
ndk::ScopedAStatus res = radio_config->getHalDeviceCapabilities(serial);
ASSERT_OK(res);
EXPECT_EQ(std::cv_status::no_timeout, wait());
ALOGI("getHalDeviceCapabilities, rspInfo.error = %s\n",
toString(radioRsp_config->rspInfo.error).c_str());
}
@@ -70,6 +71,7 @@ TEST_P(RadioConfigTest, getSimSlotsStatus) {
serial = GetRandomSerialNumber();
ndk::ScopedAStatus res = radio_config->getSimSlotsStatus(serial);
ASSERT_OK(res);
EXPECT_EQ(std::cv_status::no_timeout, wait());
ALOGI("getSimSlotsStatus, rspInfo.error = %s\n",
toString(radioRsp_config->rspInfo.error).c_str());
}