Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5cfd323e authored by Sunil Ravi's avatar Sunil Ravi
Browse files

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
parent 92ffa638
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -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(