Skip to content
  • Peter Hutterer's avatar
    test: allow partial overriding the test devices · a9a24c33
    Peter Hutterer authored
    
    
    For specific tests we need something that e.g. looks like a touchpad, but has
    a different name, a different number of slots, etc. In this case, the
    following code will do exactly that:
    
    struct input_absinfo overrides[] = {
     { .value = ABS_MT_SLOT, .minimum = 0, .maximum = 100 },
     { .value = -1 },
    };
    
    litest_create_device_with_overrides(LITEST_SYNAPTICS_CLICKPAD,
    				    NULL, NULL, &overrides, NULL);
    
    For general event codes, overrides can only add to the set of events, they
    can't remove.
    
    Signed-off-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
    a9a24c33