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/Android.bp b/services/inputflinger/tests/fuzzers/Android.bp
index 47b0824..d7980f5 100644
--- a/services/inputflinger/tests/fuzzers/Android.bp
+++ b/services/inputflinger/tests/fuzzers/Android.bp
@@ -100,6 +100,22 @@
}
cc_fuzz {
+ name: "inputflinger_touchpad_input_fuzzer",
+ defaults: [
+ "inputflinger_fuzz_defaults",
+ ],
+ srcs: [
+ "TouchpadInputFuzzer.cpp",
+ ],
+ static_libs: [
+ "libchrome-gestures",
+ ],
+ header_libs: [
+ "libchrome-gestures_headers",
+ ],
+}
+
+cc_fuzz {
name: "inputflinger_input_reader_fuzzer",
defaults: [
"inputflinger_fuzz_defaults",