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

Commit b688ea7e authored by lesl's avatar lesl Committed by Les Lee
Browse files

vts: Use global hostapd_ since teardown will call terminate function

aosp/1427815 add invoke terminate function in teardown function.
It will cause Create Test case fail since Create killed global hostapd_
service to re-generate the local one.
Use global hostapd_ to replace local variable to make teardown function
work normally.

Bug: 169248773
Test: atest -c VtsHalWifiHostapdV1_2TargetTest
Test: atest -c VtsHalWifiHostapdV1_1TargetTest
Test: atest -c VtsHalWifiHostapdV1_0TargetTest
Change-Id: I6300a626db76e68873bbc34c489a9a8ee2d55e7a
parent 51dc008b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -145,8 +145,8 @@ TEST_P(HostapdHidlTest, Create) {
    stopHostapd(wifi_instance_name_);
    startHostapdAndWaitForHidlService(wifi_instance_name_,
                                      hostapd_instance_name_);
    sp<IHostapd> hostapd = IHostapd::getService(hostapd_instance_name_);
    EXPECT_NE(nullptr, hostapd.get());
    hostapd_ = IHostapd::getService(hostapd_instance_name_);
    EXPECT_NE(nullptr, hostapd_.get());
}

/**