tests: Add test for siblings overwiting good type guesses

This commit is contained in:
stuarthayhurst 2023-04-15 20:07:15 +01:00 committed by Bastien Nocera
parent 8052220fb3
commit 8356dd01d6
2 changed files with 199 additions and 0 deletions

View file

@ -2500,6 +2500,28 @@ class Tests(dbusmock.DBusTestCase):
self.stop_daemon()
def test_sibling_priority_no_overwrite(self):
'Test siblings using the fallback device do not overwrite previous guesses'
self.start_daemon()
self.testbed.add_from_file(os.path.join(edir, 'tests/wacom-pen-digitiser.device'))
self.assertDevs({
'battery_wacom_battery_0': {
'NativePath': 'wacom_battery_0',
'Model': 'Wacom HID 52D5',
'Type': UP_DEVICE_KIND_TABLET,
'PowerSupply': False,
'HasHistory': True,
'Percentage': 100.0,
'IsPresent': True,
'State': UP_DEVICE_STATE_FULLY_CHARGED,
'IsRechargeable': True,
}
})
self.stop_daemon()
#
# libupower-glib tests (through introspection)
#

View file

@ -0,0 +1,177 @@
P: /devices/LNXSYSTM:00/LNXSYBUS:00/AMDI0010:01/WACF2200:00
E: DEVPATH=/devices/LNXSYSTM:00/LNXSYBUS:00/AMDI0010:01/WACF2200:00
E: SUBSYSTEM=acpi
E: MODALIAS=acpi:WACF2200:PNP0C50:
E: USEC_INITIALIZED=7055138
E: ID_VENDOR_FROM_DATABASE=Wacom Tech
P: /devices/platform/AMDI0010:01/i2c-1/i2c-WACF2200:00
E: DEVPATH=/devices/platform/AMDI0010:01/i2c-1/i2c-WACF2200:00
E: SUBSYSTEM=i2c
E: DRIVER=i2c_hid_acpi
E: MODALIAS=acpi:WACF2200:PNP0C50:
E: USEC_INITIALIZED=7092824
E: ID_VENDOR_FROM_DATABASE=Wacom Tech
P: /devices/platform/AMDI0010:01/i2c-1/i2c-WACF2200:00/0018:056A:52D5.0001
E: DEVPATH=/devices/platform/AMDI0010:01/i2c-1/i2c-WACF2200:00/0018:056A:52D5.0001
E: SUBSYSTEM=hid
E: DRIVER=wacom
E: HID_ID=0018:0000056A:000052D5
E: HID_NAME=WACF2200:00 056A:52D5
E: HID_PHYS=i2c-WACF2200:00
E: HID_UNIQ=
E: MODALIAS=hid:b0018g0101v0000056Ap000052D5
P: /devices/platform/AMDI0010:01/i2c-1/i2c-WACF2200:00/0018:056A:52D5.0001/hidraw/hidraw0
E: DEVPATH=/devices/platform/AMDI0010:01/i2c-1/i2c-WACF2200:00/0018:056A:52D5.0001/hidraw/hidraw0
E: SUBSYSTEM=hidraw
E: DEVNAME=/dev/hidraw0
E: MAJOR=242
E: MINOR=0
P: /devices/platform/AMDI0010:01/i2c-1/i2c-WACF2200:00/0018:056A:52D5.0001/input/input23
E: DEVPATH=/devices/platform/AMDI0010:01/i2c-1/i2c-WACF2200:00/0018:056A:52D5.0001/input/input23
E: SUBSYSTEM=input
E: PRODUCT=18/56a/52d5/100
E: NAME="Wacom HID 52D5 Pen"
E: PHYS="i2c-WACF2200:00"
E: UNIQ=""
E: PROP=2
E: EV=1b
E: KEY=1c03 0 0 0 0 0
E: ABS=1000d000003
E: MSC=21
E: MODALIAS=input:b0018v056Ap52D5e0100-e0,1,3,4,k140,141,14A,14B,14C,ra0,1,18,1A,1B,28,m0,5,lsfw
E: USEC_INITIALIZED=7859843
E: ID_INPUT=1
E: ID_INPUT_TABLET=1
E: ID_SERIAL=noserial
E: ID_PATH=platform-AMDI0010:01
E: ID_PATH_TAG=platform-AMDI0010_01
E: ID_FOR_SEAT=input-platform-AMDI0010_01
E: TAGS=:seat:
E: CURRENT_TAGS=:seat:
P: /devices/platform/AMDI0010:01/i2c-1/i2c-WACF2200:00/0018:056A:52D5.0001/input/input23/event14
S: input/by-path/platform-AMDI0010:01-event-mouse
E: DEVPATH=/devices/platform/AMDI0010:01/i2c-1/i2c-WACF2200:00/0018:056A:52D5.0001/input/input23/event14
E: SUBSYSTEM=input
E: DEVNAME=/dev/input/event14
E: MAJOR=13
E: MINOR=78
E: USEC_INITIALIZED=7962246
E: ID_INPUT=1
E: ID_INPUT_TABLET=1
E: ID_INPUT_WIDTH_MM=301
E: ID_INPUT_HEIGHT_MM=188
E: ID_SERIAL=noserial
E: ID_PATH=platform-AMDI0010:01
E: ID_PATH_TAG=platform-AMDI0010_01
E: LIBINPUT_DEVICE_GROUP=18/56a/52d5:i2c-WACF2200:00
E: DEVLINKS=/dev/input/by-path/platform-AMDI0010:01-event-mouse
P: /devices/platform/AMDI0010:01/i2c-1/i2c-WACF2200:00/0018:056A:52D5.0001/input/input23/mouse0
S: input/by-path/platform-AMDI0010:01-mouse
E: DEVPATH=/devices/platform/AMDI0010:01/i2c-1/i2c-WACF2200:00/0018:056A:52D5.0001/input/input23/mouse0
E: SUBSYSTEM=input
E: DEVNAME=/dev/input/mouse0
E: MAJOR=13
E: MINOR=32
E: USEC_INITIALIZED=7860940
E: ID_INPUT=1
E: ID_INPUT_TABLET=1
E: ID_SERIAL=noserial
E: ID_PATH=platform-AMDI0010:01
E: ID_PATH_TAG=platform-AMDI0010_01
E: DEVLINKS=/dev/input/by-path/platform-AMDI0010:01-mouse
P: /devices/platform/AMDI0010:01/i2c-1/i2c-WACF2200:00/0018:056A:52D5.0001/input/input24
E: DEVPATH=/devices/platform/AMDI0010:01/i2c-1/i2c-WACF2200:00/0018:056A:52D5.0001/input/input24
E: SUBSYSTEM=input
E: PRODUCT=18/56a/52d5/100
E: NAME="Wacom HID 52D5 Finger"
E: PHYS="i2c-WACF2200:00"
E: UNIQ=""
E: PROP=2
E: EV=1b
E: KEY=400 0 0 0 0 0
E: ABS=260800000000003
E: MSC=20
E: MODALIAS=input:b0018v056Ap52D5e0100-e0,1,3,4,k14A,ra0,1,2F,35,36,39,m5,lsfw
E: USEC_INITIALIZED=7859406
E: ID_INPUT=1
E: ID_INPUT_TOUCHSCREEN=1
E: ID_PATH=platform-AMDI0010:01
E: ID_PATH_TAG=platform-AMDI0010_01
E: ID_FOR_SEAT=input-platform-AMDI0010_01
E: TAGS=:seat:
E: CURRENT_TAGS=:seat:
P: /devices/platform/AMDI0010:01/i2c-1/i2c-WACF2200:00/0018:056A:52D5.0001/input/input24/event15
S: input/by-path/platform-AMDI0010:01-event
E: DEVPATH=/devices/platform/AMDI0010:01/i2c-1/i2c-WACF2200:00/0018:056A:52D5.0001/input/input24/event15
E: SUBSYSTEM=input
E: DEVNAME=/dev/input/event15
E: MAJOR=13
E: MINOR=79
E: USEC_INITIALIZED=8111172
E: ID_INPUT=1
E: ID_INPUT_TOUCHSCREEN=1
E: ID_INPUT_WIDTH_MM=301
E: ID_INPUT_HEIGHT_MM=188
E: ID_PATH=platform-AMDI0010:01
E: ID_PATH_TAG=platform-AMDI0010_01
E: LIBINPUT_DEVICE_GROUP=18/56a/52d5:i2c-WACF2200:00
E: LIBINPUT_FUZZ_35=4
E: LIBINPUT_FUZZ_36=4
E: DEVLINKS=/dev/input/by-path/platform-AMDI0010:01-event
P: /devices/platform/AMDI0010:01/i2c-1/i2c-WACF2200:00/0018:056A:52D5.0001/input/input24/mouse1
E: DEVPATH=/devices/platform/AMDI0010:01/i2c-1/i2c-WACF2200:00/0018:056A:52D5.0001/input/input24/mouse1
E: SUBSYSTEM=input
E: DEVNAME=/dev/input/mouse1
E: MAJOR=13
E: MINOR=33
E: USEC_INITIALIZED=7860064
E: ID_INPUT=1
E: ID_INPUT_TOUCHSCREEN=1
E: ID_PATH=platform-AMDI0010:01
E: ID_PATH_TAG=platform-AMDI0010_01
P: /devices/platform/AMDI0010:01/i2c-1/i2c-WACF2200:00/0018:056A:52D5.0001/power_supply/wacom_battery_0
E: DEVPATH=/devices/platform/AMDI0010:01/i2c-1/i2c-WACF2200:00/0018:056A:52D5.0001/power_supply/wacom_battery_0
E: SUBSYSTEM=power_supply
E: POWER_SUPPLY_NAME=wacom_battery_0
E: POWER_SUPPLY_TYPE=Battery
E: POWER_SUPPLY_MODEL_NAME=Wacom HID 52D5
E: POWER_SUPPLY_PRESENT=1
E: POWER_SUPPLY_STATUS=Unknown
E: POWER_SUPPLY_SCOPE=Device
E: POWER_SUPPLY_CAPACITY=100
E: USEC_INITIALIZED=31207836
E: NVME_HOST_IFACE=none
A: type=Battery\n
A: model_name=Wacom HID 52D5\n
A: status=Unknown\n
A: scope=Device\n
A: capacity=100\n
A: present=1\n
P: /devices/platform/AMDI0010:01/i2c-1/i2c-WACF2200:00/0018:056A:52D5.0001/power_supply/wacom_battery_0/hwmon6
E: DEVPATH=/devices/platform/AMDI0010:01/i2c-1/i2c-WACF2200:00/0018:056A:52D5.0001/power_supply/wacom_battery_0/hwmon6
E: SUBSYSTEM=hwmon
P: /devices/platform/AMDI0010:01/i2c-1/i2c-WACF2200:00/0018:056A:52D5.0001/power_supply/wacom_battery_0/wakeup50
E: DEVPATH=/devices/platform/AMDI0010:01/i2c-1/i2c-WACF2200:00/0018:056A:52D5.0001/power_supply/wacom_battery_0/wakeup50
E: SUBSYSTEM=wakeup
P: /devices/pnp0/00:02
E: DEVPATH=/devices/pnp0/00:02
E: SUBSYSTEM=pnp
E: DRIVER=i8042 kbd
E: USEC_INITIALIZED=7100176
E: ID_MODEL=Serial Wacom Tablet FUJ7401 PNP0303
E: ID_INPUT=1
E: ID_INPUT_TABLET=1
E: NAME=Serial Wacom Tablet FUJ7401 PNP0303