summaryrefslogtreecommitdiffstats
path: root/usb
diff options
context:
space:
mode:
authorBadhri Jagan Sridharan2017-11-16 17:13:12 -0600
committerBadhri Jagan Sridharan2017-11-17 14:58:34 -0600
commit9272727df8c5e42f3afd1315b1018f2af8ccca90 (patch)
tree564845c22ac95c15d7a1cf5ec858575c6cca6ca9 /usb
parentae6b2a5f1ec56c4d68aac10062ccb74e4df730ac (diff)
downloadplatform-hardware-interfaces-9272727df8c5e42f3afd1315b1018f2af8ccca90.tar.gz
platform-hardware-interfaces-9272727df8c5e42f3afd1315b1018f2af8ccca90.tar.xz
platform-hardware-interfaces-9272727df8c5e42f3afd1315b1018f2af8ccca90.zip
Initialize usb_count in the setup funtion.
Spurious wakeups can cause the test thread to return even if the callback was not actually called as the usb_count isnt initialized. Bug: 65469351 Test: mma and pushed locally to the device & tested. --skip-preconditions --module VtsHalUsbV1_0Target Change-Id: Ib0e838cf4a44807142eab6aa5e9df0cc462bb973
Diffstat (limited to 'usb')
-rw-r--r--usb/1.0/vts/functional/VtsHalUsbV1_0TargetTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/usb/1.0/vts/functional/VtsHalUsbV1_0TargetTest.cpp b/usb/1.0/vts/functional/VtsHalUsbV1_0TargetTest.cpp
index b77398fc..e01b974a 100644
--- a/usb/1.0/vts/functional/VtsHalUsbV1_0TargetTest.cpp
+++ b/usb/1.0/vts/functional/VtsHalUsbV1_0TargetTest.cpp
@@ -160,7 +160,7 @@ class UsbHidlTest : public ::testing::VtsHalHidlTargetTestBase {
160 // and the callback thread. 160 // and the callback thread.
161 std::mutex usb_mtx; 161 std::mutex usb_mtx;
162 std::condition_variable usb_cv; 162 std::condition_variable usb_cv;
163 int usb_count; 163 int usb_count = 0;
164}; 164};
165 165
166/* 166/*