Fix vts test VtsHalWifiV1_2TargetTest
VTS test for WifiChipHidlTest#registerEventCallback_1_2 was failing
on the default implementation of the 1.4 HAL. This is because
registerEventCallback_1_2() is no longer supported due to the upgrade
to registerEventCallback_1_4().
This commit fixes this VTS test error by allowing ERROR_NOT_SUPPORTED
as a valid test output.
Bug: 146020950
Test: atest VtsHalWifiV1_2TargetTest
Change-Id: Ia58b0dad5ed753c22d620b0fad6904d634e01e72
diff --git a/wifi/1.2/vts/functional/wifi_chip_hidl_test.cpp b/wifi/1.2/vts/functional/wifi_chip_hidl_test.cpp
index 47faec8..93aa0f3 100644
--- a/wifi/1.2/vts/functional/wifi_chip_hidl_test.cpp
+++ b/wifi/1.2/vts/functional/wifi_chip_hidl_test.cpp
@@ -176,11 +176,15 @@
sp<WifiChipEventCallback> wifiChipEventCallback = new WifiChipEventCallback();
const auto& status =
HIDL_INVOKE(wifi_chip_, registerEventCallback_1_2, wifiChipEventCallback);
- EXPECT_EQ(WifiStatusCode::SUCCESS, status.code);
+
+ if (status.code != WifiStatusCode::SUCCESS) {
+ EXPECT_EQ(WifiStatusCode::ERROR_NOT_SUPPORTED, status.code);
+ return;
+ }
}
INSTANTIATE_TEST_SUITE_P(
PerInstance, WifiChipHidlTest,
testing::ValuesIn(android::hardware::getAllHalInstanceNames(
::android::hardware::wifi::V1_2::IWifi::descriptor)),
- android::hardware::PrintInstanceNameToString);
\ No newline at end of file
+ android::hardware::PrintInstanceNameToString);