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

Skip to content
Commit 1196e406 authored by Mikhail Naganov's avatar Mikhail Naganov
Browse files

Fix thread safety in libaudioclient tests

The code of the tests was prone to two classical issues:

 - lacking of synchronization when accessing shared data;
 - use of improper locking patterns leading to deadlocks.

The latter was the cause for the flakiness of audiorouting_tests.
Holding a lock in `AudioPlayback::stop` was deadlocking audio
thread stopping due to a call to `AudioPlayback::onBufferEnd`

Bug: 329261852
Bug: 329528237
Bug: 330520703
Bug: 343592164
Test: atest --iterations=100 audiorouting_tests
Test: atest --iterations=10 audiorecord_tests
Change-Id: I38224c49cb5583af5f1ba469f3bb956b3b600d57
parent 48adf671
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment