inputflinger: Add touchpad stack fuzzer
Heavily inspired by MultiTouchInputFuzzer, this one works similarly but
has additional code to fuzz touchpad setting values and device-specific
configuration. The evdev axis info is also fuzzed, since unspecified
resolution values have caused bugs in the Gestures library before.
(Other fuzzers only fuzz the status_t return value from
getAbsoluteAxisInfo, not the axis info struct itself.)
Bug: 264582512
Test: build with SANITIZE_TARGET=hwaddress, run for a while on a device
Change-Id: Ic22ac0f29d433fdf3c17331df620a39937ebd7eb
diff --git a/services/inputflinger/tests/fuzzers/FuzzContainer.h b/services/inputflinger/tests/fuzzers/FuzzContainer.h
index fd14e02..0869b9f 100644
--- a/services/inputflinger/tests/fuzzers/FuzzContainer.h
+++ b/services/inputflinger/tests/fuzzers/FuzzContainer.h
@@ -73,6 +73,10 @@
InputReaderConfiguration& getPolicyConfig() { return mPolicyConfig; }
+ void setAbsoluteAxisInfo(int axis, const RawAbsoluteAxisInfo& axisInfo) {
+ mFuzzEventHub->setAbsoluteAxisInfo(mFuzzDevice->getId(), axis, axisInfo);
+ }
+
template <class T, typename... Args>
T& getMapper(Args... args) {
int32_t eventhubId = mFdp->ConsumeIntegral<int32_t>();