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

Commit 5c79dab7 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add remaining VTS tests for IWifiChip." into main

parents e0833bcb 5969e9f1
Loading
Loading
Loading
Loading
+48 −0
Original line number Original line Diff line number Diff line
@@ -1034,6 +1034,54 @@ TEST_P(WifiChipAidlTest, SetMloMode) {
    EXPECT_TRUE(status.isOk());
    EXPECT_TRUE(status.isOk());
}
}


/*
 * EnableDebugErrorAlerts
 */
TEST_P(WifiChipAidlTest, EnableDebugErrorAlerts) {
    // STA iface needs to be configured for this test
    auto iface = configureChipForStaAndGetIface();
    ASSERT_NE(iface, nullptr);

    auto status = wifi_chip_->enableDebugErrorAlerts(true);
    if (checkStatusCode(&status, WifiStatusCode::ERROR_NOT_SUPPORTED)) {
        GTEST_SKIP() << "EnableDebugErrorAlerts is not supported by vendor";
    }
    EXPECT_TRUE(status.isOk());
    EXPECT_TRUE(wifi_chip_->enableDebugErrorAlerts(false).isOk());
}

/*
 * TriggerSubsystemRestart
 */
TEST_P(WifiChipAidlTest, TriggerSubsystemRestart) {
    // STA iface needs to be configured for this test
    auto iface = configureChipForStaAndGetIface();
    ASSERT_NE(iface, nullptr);

    auto status = wifi_chip_->triggerSubsystemRestart();
    if (checkStatusCode(&status, WifiStatusCode::ERROR_NOT_SUPPORTED)) {
        GTEST_SKIP() << "TriggerSubsystemRestart is not supported by vendor";
    }
    EXPECT_TRUE(status.isOk());
}

/*
 * EnableStaChannelForPeerNetwork
 */
TEST_P(WifiChipAidlTest, EnableStaChannelForPeerNetwork) {
    // STA iface needs to be configured for this test
    auto iface = configureChipForStaAndGetIface();
    ASSERT_NE(iface, nullptr);

    int categoryMask = (int)IWifiChip::ChannelCategoryMask::INDOOR_CHANNEL |
                       (int)IWifiChip::ChannelCategoryMask::DFS_CHANNEL;
    auto status = wifi_chip_->enableStaChannelForPeerNetwork(categoryMask);
    if (checkStatusCode(&status, WifiStatusCode::ERROR_NOT_SUPPORTED)) {
        GTEST_SKIP() << "EnableStaChannelForPeerNetwork is not supported by vendor";
    }
    EXPECT_TRUE(status.isOk());
}

GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(WifiChipAidlTest);
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(WifiChipAidlTest);
INSTANTIATE_TEST_SUITE_P(WifiTest, WifiChipAidlTest,
INSTANTIATE_TEST_SUITE_P(WifiTest, WifiChipAidlTest,
                         testing::ValuesIn(android::getAidlHalInstanceNames(IWifi::descriptor)),
                         testing::ValuesIn(android::getAidlHalInstanceNames(IWifi::descriptor)),