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

Commit a58ff2d6 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes from topic "presubmit-am-1e0b1f8dd5e04022b2615deb5ed5f46e" into tm-mainline-prod

* changes:
  [automerge] wifi: fix NULL pointer in unit tests 2p: 1cfe0814
  wifi: fix NULL pointer in unit tests
parents d0586f68 40d82c17
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -56,6 +56,10 @@ class MockWifiLegacyHal : public WifiLegacyHal {
                 wifi_error(const std::string& ifname, wifi_interface_type iftype));
    MOCK_METHOD1(deleteVirtualInterface, wifi_error(const std::string& ifname));
    MOCK_METHOD0(waitForDriverReady, wifi_error());
    MOCK_METHOD2(getSupportedIfaceName, wifi_error(uint32_t, std::string&));
    MOCK_METHOD1(registerSubsystemRestartCallbackHandler,
                 wifi_error(const on_subsystem_restart_callback&));
    MOCK_METHOD1(getSupportedFeatureSet, std::pair<wifi_error, uint64_t>(const std::string&));
};
}  // namespace legacy_hal
}  // namespace implementation
+3 −0
Original line number Diff line number Diff line
@@ -278,6 +278,9 @@ class WifiChipTest : public Test {
                .WillRepeatedly(testing::Return(true));
        EXPECT_CALL(*legacy_hal_, start())
                .WillRepeatedly(testing::Return(legacy_hal::WIFI_SUCCESS));
        // Vendor HAL does not override the name by default.
        EXPECT_CALL(*legacy_hal_, getSupportedIfaceName(testing::_, testing::_))
                .WillRepeatedly(testing::Return(legacy_hal::WIFI_ERROR_UNKNOWN));
    }

    void TearDown() override {
+3 −3
Original line number Diff line number Diff line
@@ -496,7 +496,7 @@ class WifiLegacyHal {
            const std::string& iface_name);
    std::pair<wifi_error, std::vector<uint8_t>> requestFirmwareMemoryDump(
            const std::string& iface_name);
    std::pair<wifi_error, uint64_t> getSupportedFeatureSet(const std::string& iface_name);
    virtual std::pair<wifi_error, uint64_t> getSupportedFeatureSet(const std::string& iface_name);
    // APF functions.
    std::pair<wifi_error, PacketFilterCapabilities> getPacketFilterCapabilities(
            const std::string& iface_name);
@@ -564,7 +564,7 @@ class WifiLegacyHal {
    wifi_error registerRingBufferCallbackHandler(
            const std::string& iface_name, const on_ring_buffer_data_callback& on_data_callback);
    wifi_error deregisterRingBufferCallbackHandler(const std::string& iface_name);
    wifi_error registerSubsystemRestartCallbackHandler(
    virtual wifi_error registerSubsystemRestartCallbackHandler(
            const on_subsystem_restart_callback& on_restart_callback);
    std::pair<wifi_error, std::vector<wifi_ring_buffer_status>> getRingBuffersStatus(
            const std::string& iface_name);
@@ -637,7 +637,7 @@ class WifiLegacyHal {
    virtual wifi_error createVirtualInterface(const std::string& ifname,
                                              wifi_interface_type iftype);
    virtual wifi_error deleteVirtualInterface(const std::string& ifname);
    wifi_error getSupportedIfaceName(uint32_t iface_type, std::string& ifname);
    virtual wifi_error getSupportedIfaceName(uint32_t iface_type, std::string& ifname);

    // STA + STA functions
    virtual wifi_error multiStaSetPrimaryConnection(const std::string& ifname);