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
This commit is contained in:
Badhri Jagan Sridharan
2017-11-16 15:13:12 -08:00
parent ae6b2a5f1e
commit 9272727df8

View File

@@ -160,7 +160,7 @@ class UsbHidlTest : public ::testing::VtsHalHidlTargetTestBase {
// and the callback thread.
std::mutex usb_mtx;
std::condition_variable usb_cv;
int usb_count;
int usb_count = 0;
};
/*