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

Commit 98112251 authored by Ahmed ElArabawy's avatar Ahmed ElArabawy Committed by Android (Google) Code Review
Browse files

Merge "Wifi: Fix VTS tests broken due to uprev to Vendor HAL 1.6" into tm-dev

parents 51f3a442 7f40eee6
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -66,7 +66,9 @@ class WifiRttControllerHidlTest : public ::testing::TestWithParam<std::string> {
        stopWifi(GetInstanceName());

        wifi_rtt_controller_ = getWifiRttController();
        ASSERT_NE(nullptr, wifi_rtt_controller_.get());
        if (wifi_rtt_controller_.get() == nullptr) {
            GTEST_SKIP() << "Skipping this test since API is deprecated.";
        }

        // Check RTT support before we run the test.
        std::pair<WifiStatus, RttCapabilities> status_and_caps;
@@ -79,7 +81,7 @@ class WifiRttControllerHidlTest : public ::testing::TestWithParam<std::string> {

    virtual void TearDown() override { stopWifi(GetInstanceName()); }

    // A simple test implementation of WifiChipEventCallback.
    // A simple test implementation of WifiRttControllerEventCallback.
    class WifiRttControllerEventCallback
        : public ::testing::VtsHalHidlTargetCallbackBase<
              WifiRttControllerHidlTest>,
@@ -122,6 +124,11 @@ class WifiRttControllerHidlTest : public ::testing::TestWithParam<std::string> {

        const auto& status_and_controller =
            HIDL_INVOKE(wifi_chip, createRttController_1_4, wifi_sta_iface);

        if (status_and_controller.first.code == WifiStatusCode::ERROR_NOT_SUPPORTED) {
            return nullptr;
        }

        EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_controller.first.code);
        EXPECT_NE(nullptr, status_and_controller.second.get());

+5 −0
Original line number Diff line number Diff line
@@ -94,6 +94,11 @@ TEST_P(WifiStaIfaceHidlTest, GetLinkLayerStats_1_5) {
    // Retrieve link layer stats.
    const auto& status_and_stats =
        HIDL_INVOKE(wifi_sta_iface_, getLinkLayerStats_1_5);

    if (status_and_stats.first.code == WifiStatusCode::ERROR_NOT_SUPPORTED) {
        GTEST_SKIP() << "Skipping this test since API is deprecated.";
    }

    EXPECT_EQ(WifiStatusCode::SUCCESS, status_and_stats.first.code);
    EXPECT_GT(status_and_stats.second.timeStampInMs, 0u);
    // Try to create 2nd iface. If yes, it should fill in the duty cycle field.