summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2018-05-28 10:38:12 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2018-05-30 09:42:06 +1000
commitd5c705a53967b75a7211b3914a64838aac655c3f (patch)
tree7a7036a91523d61edd90920fa185f1808c79dfed
parent50d8bc722c26a9f2c36f07837ae3196e31851df1 (diff)
tablet: increase the proximity timeout during test runs
This is causing too many false positives and they're not easy to filter out. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/evdev-tablet.c9
-rw-r--r--test/litest.c2
2 files changed, 8 insertions, 3 deletions
diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c
index f3895fdd..aa652e9c 100644
--- a/src/evdev-tablet.c
+++ b/src/evdev-tablet.c
@@ -33,8 +33,9 @@
#endif
/* The tablet sends events every ~2ms , 50ms should be plenty enough to
- detect out-of-range */
-#define FORCED_PROXOUT_TIMEOUT ms2us(50)
+ detect out-of-range.
+ This value is higher during test suite runs */
+static int FORCED_PROXOUT_TIMEOUT = 50 * 1000; /* µs */
#define tablet_set_status(tablet_,s_) (tablet_)->status |= (s_)
#define tablet_unset_status(tablet_,s_) (tablet_)->status &= ~(s_)
@@ -2106,6 +2107,10 @@ evdev_tablet_create(struct evdev_device *device)
{
struct tablet_dispatch *tablet;
+ /* Stop false positives caused by the forced proximity code */
+ if (getenv("LIBINPUT_RUNNING_TEST_SUITE"))
+ FORCED_PROXOUT_TIMEOUT = 150 * 1000; /* µs */
+
tablet = zalloc(sizeof *tablet);
if (tablet_init(tablet, device) != 0) {
diff --git a/test/litest.c b/test/litest.c
index fc5dbd18..b72ec444 100644
--- a/test/litest.c
+++ b/test/litest.c
@@ -3402,7 +3402,7 @@ litest_timeout_trackpoint(void)
void
litest_timeout_tablet_proxout(void)
{
- msleep(70);
+ msleep(170);
}
void