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

Commit a79d5a14 authored by Sunil Ravi's avatar Sunil Ravi Committed by Automerger Merge Worker
Browse files

wifi: VTS test for getSupportedRadioCombinationsMatrix am: 5cfd323e

Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/17048391

Change-Id: I34043d84077f6413919cd577bb15d214fd5685fc
parents f5e1d976 5cfd323e
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(