test: add a note to one of the device tests
authorPeter Hutterer <peter.hutterer@who-t.net>
Tue, 19 May 2015 00:57:27 +0000 (10:57 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Tue, 19 May 2015 00:58:57 +0000 (10:58 +1000)
If we get two different sysnames for the device, this test doesn't test
anything much, so it's better to fail here. But add a comment so that when it
fails it's quite obvious why.

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

index b580e004654bfa2c695a7534cd7e17cc25bb0bb9..22569d26096ad7bbfd315123365adcda8eccc120 100644 (file)
@@ -313,6 +313,9 @@ START_TEST(device_reenable_syspath_changed)
 
        litest_device = litest_add_device(li, LITEST_MOUSE);
        device2 = litest_device->libinput_device;
+       /* Note: if the sysname isn't the same, some other device got added
+        * or removed while this test was running.  This is unlikely and
+        * would result in a false positive, so let's fail the test here */
        ck_assert_str_eq(libinput_device_get_sysname(device1),
                         libinput_device_get_sysname(device2));