From 0d1bb97447eef57aa7a76def4dddbd4242a42af2 Mon Sep 17 00:00:00 2001 From: Roshan Pius Date: Tue, 8 Aug 2017 08:43:50 -0700 Subject: [PATCH] wifi(vts): Remove a tight loop of toggling wifi state The tight loop of HAL start/stop exposes a race condition within the HAL. Adding a fix for preventing this race would need a fix which would be pretty risky at this point of the release. The issue itself is unlikely to happen in real use cases because wifi toggles (user initiated or test scripts initiated) via framework goes through a series of processing before it invokes the HAL start/stop. Bug: 64195190 Test: `make vts -j30 BUILD_GOOGLE_VTS=true TARGET_PRODUCT=aosp_arm64 && vts-tradefed run commandAndExit vts --skip-all-system-status-check --primary-abi-only --skip-preconditions --module VtsHalWifiV1_0Target -l INFO` Change-Id: I4e4d65f8b6e2e423a3a5f26e5a97a78b7e99c3e8 --- wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp index 06e21ff424..3c23135927 100644 --- a/wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp +++ b/wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp @@ -182,6 +182,8 @@ TEST_F(WifiChipHidlTest, ConfigureChip) { EXPECT_EQ(WifiStatusCode::SUCCESS, HIDL_INVOKE(wifi_chip_, configureChip, mode.id).code); stopWifi(); + // Sleep for 5 milliseconds between each wifi state toggle. + usleep(5000); } }