Fix error on waiting for long vibration callback that might have been
already cleared by the HAL when vibration finished. Test run crash log:
FORTIFY: pthread_mutex_lock called on a destroyed mutex (0xf5a83bbc)
Keep all test cleanup logic in teardown methods.
Bug: 329899022
Change-Id: If7c13296b870e792063a9ad7b307d57fb5c333aa
Test: atest VibratorHalIntegrationBenchmark
Setup binder process thread pool for vibrator HAL benchmark tests to fix
binder transaction errors of the type:
E Vibrator: Failed completion callback: -129
This change also adds checks for HAL results, which will cause them to
fail earlier with a useful error message when the device reaches a bad
state. This should avoid timeout failures for the whole test suite.
Other fixes:
- Fix vibrator.on(ms) tests to use a valid max duration value
(previously failing with illegal argument);
- Use a smaller fixed # of iterations on tests that iterate on vibrate
calls, and add wait for vibration to be complete to measure the HAL
in a more stable state;
- Skip getSupportedAlwaysOnEffects on devices without capability;
Fix: 329239120
Bug: 329899022
Bug: 329203383
Test: atest VibratorHalIntegrationBenchmark
Change-Id: Id541a62745320a601934fd3f176f8ba42b5a7b2d
Fixes an issue with the benchmarks, where they would skip unsupported
situations by early returning without reaching the measure loop and
without notifying the framework.
The framework would then retry the exact same scenario indefinitely.
To fix, makes sure every early return also calls SkipWithMessage.
Fixes: 302845046
Test: adb shell /tmp/foobar/VibratorHalIntegrationBenchmark --v=2
Change-Id: Ib52b8c4d94755a0961bcfb40d508482e5c49cb52
The benchmarks are relying only with the HAL interfaces, so they can be
moved outside the pixel folder and integrated with continuous native
metric tests.
Bug: b/159981541
Test: N/A, just moving tests
Change-Id: I54e7155d12eb844df7f77e8c5d232949426546d2