Commit graph

19 commits

Author SHA1 Message Date
Peter Hutterer
9b18adc407 test: replace != NULL checks with ck_assert_notnull
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-02-15 08:42:15 +10:00
Peter Hutterer
caa8f3fe61 touchpad: release all button presses on device suspend
This leaves a bug open, on a Lenovo T440 generation touchpad with top software
buttons, the button will not be leased correctly. This is caused by
device->is_suspended=true by the time we try to clear the state and the
button events thus getting filtered.

This used to affect all touchpads, this patch just moves it so it only affects
the T440-like devices now.

Fixes #233

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-01-31 15:09:44 +10:00
Peter Hutterer
500d03d78e fallback: cancel touches, don't just release them when we suspend
When we disable the touch device, any existing touches should be cancelled,
not just released.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-09-27 10:27:19 +10:00
Peter Hutterer
7768d7d981 test: drop the sleep_ms argument
This forces events for every ~10ms now. If we want a slower movement, we need
more steps - just like a real touchpad does it.

Cocinelle spatch files were variants of:
	@@
	expression A, B, C, D, E, F, G, H, I, J, K;
	@@

	- litest_touch_move_two_touches(A, B, C, D, E, F, G, H, I)
	+ litest_touch_move_two_touches(A, B, C, D, E, F, G, H)

The only test that needed a real fix was touchpad_no_palm_detect_2fg_scroll,
it used 12ms before, now it's using 10ms so on the bcm5974 touchpad the second
finger was a speed-thumb. Increasing the events and thus slowing down the
pointer means it's a normal finger and the test succeeds again.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-08-28 11:26:12 +10:00
Peter Hutterer
12b07229d8 test: switch the udev tag tests to be quirk tests
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-08 14:37:22 +10:00
Peter Hutterer
41f880a217 test: fix udev prop test for apple touchpads
Clearly a copy/paste error.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-05-25 13:44:51 +10:00
Peter Hutterer
ce80e40006 test: move all the _setup() functions into a special section
This way we can loop through them instead of having to add them manually.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-23 10:17:52 +10:00
Peter Hutterer
f35bb9760e test: replace a litest button with a litest key call
Same thing under the hood but still...

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-11-20 11:31:56 +10:00
Peter Hutterer
8cf6893f6d test: replace litest_button_click with a debounced version
This is via a simple search & replace. Later auditing is needed to switch
clicks that should not be debounced (e.g. touchpads) back to a non-debounced
version.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-11-20 09:55:05 +10:00
Peter Hutterer
ca4285de66 touchpad: add touch-size-based palm detection
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-11 12:28:28 +10:00
Peter Hutterer
e0ac0153f7 test: drop two superfluous empty queue checks
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-01 09:52:31 +10:00
Peter Hutterer
f7f849e576 evdev: add quirk for Logitech Marble Mouse
Device needs BTN_MIDDLE disabled, this way middle button emulation is present
by default.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2017-02-20 12:25:05 +10:00
Peter Hutterer
47fbd8f98f test: add basic test for getting the physical seat name
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-02-09 11:54:03 +10:00
Peter Hutterer
07860e5db6 path: parse the WL_OUTPUT property for patch devices too
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-02-09 11:54:03 +10:00
James Ye
a817098fcb test: add tests for lid switch
Ship a custom udev rule for the test device until systemd v333 is commonplace.

Signed-off-by: James Ye <jye836@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-26 14:44:04 +10:00
Peter Hutterer
989113cdb9 test: add device size/no size checks
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-20 10:35:45 +10:00
Peter Hutterer
b887ddc756 test: add some device capability checks
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-20 10:35:44 +10:00
Peter Hutterer
a1a10242bd test: test for libinput_device_get/set_user_data
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-20 10:35:44 +10:00
Peter Hutterer
5d66edc9f4 test: prefix all test source files with "test-"
They weren't originally prefixed but the various tests were, but now that we
only have one test runner binary anyway, the prefix helps sorting the files
easily within e.g. gcov results.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-16 08:59:00 +10:00
Renamed from test/device.c (Browse further)