summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorJimmy Chen <jimmycmchen@google.com>2019-06-26 23:11:18 -0700
committerandroid-build-merger <android-build-merger@google.com>2019-06-26 23:11:18 -0700
commitd49f3424c5a7bda30fb6624e8abf4029ff96cffd (patch)
tree339160e6015f6d06e48c544437c93253b175c3b1 /wifi
parent40a81306a40d16de4fd2f3139f1c7d32aabc22ca (diff)
parent33723f56b531312ea1476f138e6f1e7d3a8a6d6f (diff)
downloadplatform_hardware_interfaces-d49f3424c5a7bda30fb6624e8abf4029ff96cffd.tar.gz
platform_hardware_interfaces-d49f3424c5a7bda30fb6624e8abf4029ff96cffd.tar.bz2
platform_hardware_interfaces-d49f3424c5a7bda30fb6624e8abf4029ff96cffd.zip
Merge "p2p: skip MAC randomization vts test if not supported" into qt-dev
am: 33723f56b5 Change-Id: Ib6779515fb13d25b1f712f5bb32981a7980d79f4
Diffstat (limited to 'wifi')
-rw-r--r--wifi/supplicant/1.2/vts/functional/supplicant_p2p_iface_hidl_test.cpp8
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);
});
}