diff options
author | Sunil Ravi <sunilravi@google.com> | 2022-03-01 10:18:10 -0800 |
---|---|---|
committer | Sunil Ravi <sunilravi@google.com> | 2022-03-01 20:42:23 +0000 |
commit | 5cfd323e135c76f7aa1eb6906127ba8acb414b57 (patch) | |
tree | c3ae1f2d5e09bb6806c9e6cc578bfc5c57f05ca1 /wifi | |
parent | 92ffa6384e20feec6db817f3a040a8c2bf7d05e3 (diff) |
wifi: VTS test for getSupportedRadioCombinationsMatrix
This change added,
1. VTS test for getSupportedRadioCombinationsMatrix()
2. Skip test for getUsableChannels_1_6 if vendor doesn't
support
Bug: 220201314
Bug: 221389141
Bug: 220225758
Test: atest WifiChipHidlTest
Change-Id: I5ddbd4be68d74f1fa26584c94d5b10211261cc1a
Diffstat (limited to 'wifi')
-rw-r--r-- | wifi/1.6/vts/functional/wifi_chip_hidl_test.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/wifi/1.6/vts/functional/wifi_chip_hidl_test.cpp b/wifi/1.6/vts/functional/wifi_chip_hidl_test.cpp index d1d4336222..7c5b7e623b 100644 --- a/wifi/1.6/vts/functional/wifi_chip_hidl_test.cpp +++ b/wifi/1.6/vts/functional/wifi_chip_hidl_test.cpp @@ -91,6 +91,9 @@ TEST_P(WifiChipHidlTest, getUsableChannels_1_6) { WifiBand band = WifiBand::BAND_24GHZ_5GHZ_6GHZ; const auto& statusNonEmpty = HIDL_INVOKE(wifi_chip_, getUsableChannels_1_6, band, ifaceModeMask, filterMask); + if (statusNonEmpty.first.code == WifiStatusCode::ERROR_NOT_SUPPORTED) { + GTEST_SKIP() << "Skipping this test since getUsableChannels() is not supported by vendor."; + } EXPECT_EQ(WifiStatusCode::SUCCESS, statusNonEmpty.first.code); } @@ -104,6 +107,22 @@ TEST_P(WifiChipHidlTest, getAvailableModes_1_6) { EXPECT_LT(0u, status_and_modes.second.size()); } +/* + * getSupportedRadioCombinationsMatrix: + * Ensure that a call to getSupportedRadioCombinationsMatrix will return + * with a success status code. + */ +TEST_P(WifiChipHidlTest, getSupportedRadioCombinationsMatrix) { + configureChipForIfaceType(IfaceType::STA, true); + const auto& statusNonEmpty = HIDL_INVOKE(wifi_chip_, getSupportedRadioCombinationsMatrix); + if (statusNonEmpty.first.code == WifiStatusCode::ERROR_NOT_SUPPORTED) { + GTEST_SKIP() << "Skipping this test since getSupportedRadioCombinationsMatrix() is not " + "supported by vendor."; + } + + EXPECT_EQ(WifiStatusCode::SUCCESS, statusNonEmpty.first.code); +} + GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(WifiChipHidlTest); INSTANTIATE_TEST_SUITE_P(PerInstance, WifiChipHidlTest, testing::ValuesIn(android::hardware::getAllHalInstanceNames( |