From 858665687da80b903d41256236dd57219730e6e9 Mon Sep 17 00:00:00 2001 From: Sunil Ravi Date: Fri, 17 Feb 2023 23:37:22 +0000 Subject: [PATCH] wifi: set join to true in p2p connect tests After adding ag/21179155, auto join flag is not set for every p2p connect command. The tests are passing an unknown peer MAC address to connect(). To pass the tests, the connect should trigger a scan and try to find this unknown mac address. So set join flag to true to run the same scan logic. Bug: 298310537 Bug: 268236829 Bug: 218608010 Test: atest VtsHalWifiSupplicantP2pIfaceTargetTest Change-Id: Id5baa0f599d11a3563780aae15ff3cea0407060c Merged-In: Id5baa0f599d11a3563780aae15ff3cea0407060c --- .../supplicant_p2p_iface_aidl_test.cpp | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/wifi/supplicant/aidl/vts/functional/supplicant_p2p_iface_aidl_test.cpp b/wifi/supplicant/aidl/vts/functional/supplicant_p2p_iface_aidl_test.cpp index d95bd038ce..6f8fde6d59 100644 --- a/wifi/supplicant/aidl/vts/functional/supplicant_p2p_iface_aidl_test.cpp +++ b/wifi/supplicant/aidl/vts/functional/supplicant_p2p_iface_aidl_test.cpp @@ -524,16 +524,12 @@ TEST_P(SupplicantP2pIfaceAidlTest, Flush) { * Connect */ TEST_P(SupplicantP2pIfaceAidlTest, Connect) { - /* - * Auto-join is not enabled before R. After enabling auto-join, - * this should always succeed. - */ - std::string pin; - EXPECT_TRUE(p2p_iface_ - ->connect(kTestMacAddr, WpsProvisionMethod::PBC, - kTestConnectPin, false, false, - kTestConnectGoIntent, &pin) - .isOk()); + std::string pin; + EXPECT_TRUE(p2p_iface_ + ->connect(kTestMacAddr, WpsProvisionMethod::PBC, + kTestConnectPin, true, false, kTestConnectGoIntent, + &pin) + .isOk()); } /* @@ -543,7 +539,7 @@ TEST_P(SupplicantP2pIfaceAidlTest, CancelConnect) { std::string pin; EXPECT_TRUE(p2p_iface_ ->connect(kTestMacAddr, WpsProvisionMethod::PBC, - kTestConnectPin, false, false, + kTestConnectPin, true, false, kTestConnectGoIntent, &pin) .isOk()); EXPECT_TRUE(p2p_iface_->cancelConnect().isOk());