test: unset MOUSE_DPI for the apple magic mouse
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 30 Mar 2017 02:50:13 +0000 (12:50 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 30 Mar 2017 02:56:49 +0000 (12:56 +1000)
commit4030959f35a3178aa395339637e357af527da0ad
treef98bb4572b2ea103de0087fab48dfe7f24a081ae
parent402be40ba99f3b5e018f027a51e8956a2e0b33a7
test: unset MOUSE_DPI for the apple magic mouse

As of systemd commit f013e99e160f385a0c02793c612ef4c8a8ffc4d7, ID_BUS is now
set for all bluetooth devices, not just those with subsystem bluetooth. This
affects the Apple Magic Mouse and sets the systemd hwdb's MOUSE_DPI value.

That value is different to the test results we currently have, causing some
tests to fail because different deltas are generated (e.g.
pointer_scroll_button).

Our udev rules are prefixed 99 and thus apply after the various system rules.
So we can't easily set ID_BUS in our rule because it'll apply after
70-mouse.rules checks for the bustype. So we'd have to detect systemd version
or so, but the easy way is to simply force MOUSE_DPI to the empty value. For
our test cases it doesn't matter if the DPI is set correctly anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test/litest-device-apple-magicmouse.c