summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2014-11-20 13:50:57 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2014-11-25 16:33:01 +1000
commit429d206bea8196b21bc4cf69f957c47e58265983 (patch)
treed5a01e8758df0a6ad1d552ce1089e1413bce472f /test
parent5f703f48b07dcdc1a5457f9153bd74836e880a2e (diff)
downloadlibinput-429d206bea8196b21bc4cf69f957c47e58265983.tar.gz
path: store the udev device instead of just the devnode
Long-term plan to use more of udev_device here is to better protect us against re-opening a different device that happens to have the same devnode. This now also prints an error message for invalid devices, the log tests are adjusted. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/log.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/log.c b/test/log.c
index 6ce5e7f4..a56af151 100644
--- a/test/log.c
+++ b/test/log.c
@@ -125,11 +125,13 @@ START_TEST(log_priority)
libinput_path_add_device(li, "/tmp");
- ck_assert_int_eq(log_handler_called, 0);
+ ck_assert_int_eq(log_handler_called, 1);
libinput_log_set_priority(li, LIBINPUT_LOG_PRIORITY_INFO);
- libinput_path_add_device(li, "/tmp");
- ck_assert_int_gt(log_handler_called, 0);
+ /* event0 is usually Lid Switch which prints an info that
+ we don't handle it */
+ libinput_path_add_device(li, "/dev/input/event0");
+ ck_assert_int_gt(log_handler_called, 1);
log_handler_called = 0;