Disable CPP backend for vibrator HAL. Dependencies should use the
stable NDK instead.
This is also the recommended choice:
https://source.android.com/docs/core/architecture/aidl/aidl-hals#choosing-runtime
The HAL will be allowed to use ndk-stable types like PersistableBundle
after disabling the legacy CPP backend.
Fix: 349595412
Test: VtsHalVibratorTargetTest & VtsHalVibratorManagerTargetTest
Flag: EXEMPT NDK
Change-Id: Id5736e092afd36e786ecf3978ff6ad81c7a4df56
Fix benchmark crash error:
`FORTIFY: pthread_mutex_lock called on a destroyed mutex`
Caused by the bench loop trying to wait on the callback promise future
after the callback instance was destroyed.
The fix grabs the promise future before performing the HAL operation, so
it can access the fulfilled value after the promise fulfilled and then
destroyed.
Change-Id: I4504129672a11ad1662ea36c79f522d754535765
Fix: 336977792
Test: atest VibratorHalIntegrationBenchmark
Flag: TEST_ONLY
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