diff options
author | Jimmy Chen <jimmycmchen@google.com> | 2019-06-19 18:51:59 +0800 |
---|---|---|
committer | Jimmy Chen <jimmycmchen@google.com> | 2019-06-26 14:40:10 +0800 |
commit | 7af5384d2d17a735df0df0615966eaf76d6ff17e (patch) | |
tree | 8e9db0f0f11f108e0e7ecfef8cb12836995e287f | |
parent | 16b2c77456144b7bf6ba261ee7e8c4e4290d404e (diff) | |
download | platform_hardware_interfaces-7af5384d2d17a735df0df0615966eaf76d6ff17e.tar.gz platform_hardware_interfaces-7af5384d2d17a735df0df0615966eaf76d6ff17e.tar.bz2 platform_hardware_interfaces-7af5384d2d17a735df0df0615966eaf76d6ff17e.zip |
p2p: skip MAC randomization vts test if not supported
Bug: 135247522
Test: atest VtsHalWifiSupplicantP2pV1_2TargetTest
Change-Id: I1aafcdbe88f93dbf73069d24ae90cad0d395df6e
-rw-r--r-- | wifi/supplicant/1.2/vts/functional/supplicant_p2p_iface_hidl_test.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/wifi/supplicant/1.2/vts/functional/supplicant_p2p_iface_hidl_test.cpp b/wifi/supplicant/1.2/vts/functional/supplicant_p2p_iface_hidl_test.cpp index 36bde161c1..1b78ac3e01 100644 --- a/wifi/supplicant/1.2/vts/functional/supplicant_p2p_iface_hidl_test.cpp +++ b/wifi/supplicant/1.2/vts/functional/supplicant_p2p_iface_hidl_test.cpp @@ -127,25 +127,33 @@ TEST_F(SupplicantP2pIfaceHidlTest, AddGroup_1_2_FailureInvalidFrequency) { }); } +bool isMacRandomizationSupported(const SupplicantStatus& status) { + return status.code != SupplicantStatusCode::FAILURE_ARGS_INVALID; +} + /* * Verify that setMacRandomization successes. */ TEST_F(SupplicantP2pIfaceHidlTest, EnableMacRandomization) { p2p_iface_->setMacRandomization(true, [](const SupplicantStatus& status) { + if (!isMacRandomizationSupported(status)) return; EXPECT_EQ(SupplicantStatusCode::SUCCESS, status.code); }); // enable twice p2p_iface_->setMacRandomization(true, [](const SupplicantStatus& status) { + if (!isMacRandomizationSupported(status)) return; EXPECT_EQ(SupplicantStatusCode::SUCCESS, status.code); }); p2p_iface_->setMacRandomization(false, [](const SupplicantStatus& status) { + if (!isMacRandomizationSupported(status)) return; EXPECT_EQ(SupplicantStatusCode::SUCCESS, status.code); }); // disable twice p2p_iface_->setMacRandomization(false, [](const SupplicantStatus& status) { + if (!isMacRandomizationSupported(status)) return; EXPECT_EQ(SupplicantStatusCode::SUCCESS, status.code); }); } |