Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9272727d authored by Badhri Jagan Sridharan's avatar Badhri Jagan Sridharan
Browse files

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
parent ae6b2a5f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
};

/*