test: Prefix litest created device names with litest
authorHans de Goede <hdegoede@redhat.com>
Tue, 24 Jun 2014 14:23:12 +0000 (16:23 +0200)
committerPeter Hutterer <peter.hutterer@who-t.net>
Wed, 25 Jun 2014 01:11:45 +0000 (11:11 +1000)
And add an example xorg.conf.d .conf file for ignoring these devices under
xorg.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test/50-litest.conf [new file with mode: 0644]
test/litest.c

diff --git a/test/50-litest.conf b/test/50-litest.conf
new file mode 100644 (file)
index 0000000..76579d7
--- /dev/null
@@ -0,0 +1,6 @@
+# Ignore devices created by libinput's test suite (litest)
+Section "InputClass"
+        Identifier "libinput test suite blacklist"
+        MatchProduct "litest"
+        Option "Ignore" "on"
+EndSection
index 320a26d6b2b7858e5aa8ea8ad495f15a9331321c..02f3d77bdcae3de91ecb27c2c645d77d8dc368c5 100644 (file)
@@ -822,11 +822,13 @@ litest_create_uinput_device_from_description(const char *name,
                .flat = 0,
                .resolution = 100
        };
+       char buf[512];
 
        dev = libevdev_new();
        ck_assert(dev != NULL);
 
-       libevdev_set_name(dev, name);
+       snprintf(buf, sizeof(buf), "litest %s", name);
+       libevdev_set_name(dev, buf);
        if (id) {
                libevdev_set_id_bustype(dev, id->bustype);
                libevdev_set_id_vendor(dev, id->vendor);