mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2026-06-11 02:28:05 +00:00
Merge tag 'v1.94.0' into tod
Tag 1.94.0 Git-EVTag-v0-SHA512: 7cf9d7defb02433140f575589099569a5848ab34e8ecb0a4a90bb3c9eb1c228a16438afe1b23c381b59c1506f189a845752fead3dbd3c1c11f686cf47302cb1b
This commit is contained in:
+13
-28
@@ -7,8 +7,9 @@ This document describes how to create a 'capture' test: a test that
|
||||
captures a picture of a fingerprint from the device (mocked by
|
||||
`umockdev`) and compares it with the standard one.
|
||||
|
||||
Other kinds of `umockdev` tests could be created in a similar manner.
|
||||
|
||||
Other kinds of `umockdev` tests can be created in a similar manner. For
|
||||
match-on-chip devices you would instead create a test specific `custom.py`
|
||||
script, capture it and store the capture to `custom.pcapng`.
|
||||
|
||||
'Capture' Test Creation
|
||||
-----------------------
|
||||
@@ -19,6 +20,10 @@ A new 'capture' test is created by means of `capture.py` script:
|
||||
|
||||
`mkdir DRIVER`
|
||||
|
||||
Note that the name must be the exact name of the libfprint driver,
|
||||
or the exact name of the driver followed by a `-` and a unique identifier
|
||||
of your choosing.
|
||||
|
||||
2. Prepare your execution environment.
|
||||
|
||||
In the next step a working and up to date libfprint is needed. This can be
|
||||
@@ -50,12 +55,14 @@ A new 'capture' test is created by means of `capture.py` script:
|
||||
|
||||
`umockdev-record /dev/bus/usb/001/005 > DRIVER/device`
|
||||
|
||||
5. Record interaction of `capture.py` (or other test) with the device:
|
||||
5. Record interaction of `capture.py` (or other test) with the device. To do
|
||||
so, start wireshark and record `usbmonX` (where X is the bus number). Then
|
||||
run the test script:
|
||||
|
||||
`umockdev-record -i /dev/bus/usb/001/005=DRIVER/capture.ioctl -- python3 ./capture.py DRIVER/capture.png`
|
||||
`python3 ./capture.py DRIVER/capture.png`
|
||||
|
||||
Files `capture.ioctl` and `capture.png` will be created as the
|
||||
result of this command.
|
||||
Save the wireshark recording as `capture.pcapng`. The command will create
|
||||
`capture.png`.
|
||||
|
||||
6. Add driver's name to `drivers_tests` in the `meson.build`.
|
||||
7. Check whether everything works as expected.
|
||||
@@ -66,28 +73,6 @@ arm, or anything else producing an image with the device can be used.
|
||||
|
||||
Possible Issues
|
||||
---------------
|
||||
`umockdev-record` aggressively groups URBs. In most cases, manual
|
||||
intervention is unfortunately required. Often, drivers do a chain of
|
||||
commands like: A then B each with a different reply. However,
|
||||
`umockdev-record` could create a file like this:
|
||||
|
||||
A
|
||||
reply 1
|
||||
reply 2
|
||||
B
|
||||
reply 1
|
||||
reply 2
|
||||
|
||||
In that case, records must be re-ordered:
|
||||
|
||||
A
|
||||
reply 1
|
||||
B
|
||||
reply 1
|
||||
A
|
||||
reply 2
|
||||
B
|
||||
reply 2
|
||||
|
||||
Other changes may be needed to get everything working. For example the
|
||||
`elan` driver relies on a timeout that is not reported correctly. In
|
||||
|
||||
Executable
BIN
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 100 KiB |
@@ -0,0 +1,228 @@
|
||||
P: /devices/pci0000:00/0000:00:14.0/usb1/1-9
|
||||
N: bus/usb/001/005=12011001000000087A1C700541100102030109022000010100A0320904000002FF0000000705830240000007050402400003
|
||||
E: DEVNAME=/dev/bus/usb/001/005
|
||||
E: DEVTYPE=usb_device
|
||||
E: DRIVER=usb
|
||||
E: PRODUCT=1c7a/570/1041
|
||||
E: TYPE=0/0/0
|
||||
E: BUSNUM=001
|
||||
E: DEVNUM=005
|
||||
E: MAJOR=189
|
||||
E: MINOR=4
|
||||
E: SUBSYSTEM=usb
|
||||
E: ID_VENDOR=EgisTec
|
||||
E: ID_VENDOR_ENC=EgisTec
|
||||
E: ID_VENDOR_ID=1c7a
|
||||
E: ID_MODEL=EgisTec_Touch_Fingerprint_Sensor
|
||||
E: ID_MODEL_ENC=EgisTec\x20Touch\x20Fingerprint\x20Sensor
|
||||
E: ID_MODEL_ID=0570
|
||||
E: ID_REVISION=1041
|
||||
E: ID_SERIAL=EgisTec_EgisTec_Touch_Fingerprint_Sensor_W700B41B
|
||||
E: ID_SERIAL_SHORT=W700B41B
|
||||
E: ID_BUS=usb
|
||||
E: ID_USB_INTERFACES=:ff0000:
|
||||
E: ID_VENDOR_FROM_DATABASE=LighTuning Technology Inc.
|
||||
E: ID_PATH=pci-0000:00:14.0-usb-0:9
|
||||
E: ID_PATH_TAG=pci-0000_00_14_0-usb-0_9
|
||||
E: LIBFPRINT_DRIVER=Hardcoded whitelist
|
||||
A: authorized=1
|
||||
A: avoid_reset_quirk=0
|
||||
A: bConfigurationValue=1
|
||||
A: bDeviceClass=00
|
||||
A: bDeviceProtocol=00
|
||||
A: bDeviceSubClass=00
|
||||
A: bMaxPacketSize0=8
|
||||
A: bMaxPower=100mA
|
||||
A: bNumConfigurations=1
|
||||
A: bNumInterfaces= 1
|
||||
A: bcdDevice=1041
|
||||
A: bmAttributes=a0
|
||||
A: busnum=1
|
||||
A: configuration=
|
||||
H: descriptors=12011001000000087A1C700541100102030109022000010100A0320904000002FF0000000705830240000007050402400003
|
||||
A: dev=189:4
|
||||
A: devnum=5
|
||||
A: devpath=9
|
||||
L: driver=../../../../../bus/usb/drivers/usb
|
||||
A: idProduct=0570
|
||||
A: idVendor=1c7a
|
||||
A: ltm_capable=no
|
||||
A: manufacturer=EgisTec
|
||||
A: maxchild=0
|
||||
L: port=../1-0:1.0/usb1-port9
|
||||
A: power/active_duration=362352
|
||||
A: power/async=enabled
|
||||
A: power/autosuspend=2
|
||||
A: power/autosuspend_delay_ms=2000
|
||||
A: power/connected_duration=5526124
|
||||
A: power/control=auto
|
||||
A: power/level=auto
|
||||
A: power/persist=1
|
||||
A: power/runtime_active_kids=0
|
||||
A: power/runtime_active_time=365097
|
||||
A: power/runtime_enabled=enabled
|
||||
A: power/runtime_status=active
|
||||
A: power/runtime_suspended_time=5160752
|
||||
A: power/runtime_usage=0
|
||||
A: power/wakeup=disabled
|
||||
A: power/wakeup_abort_count=
|
||||
A: power/wakeup_active=
|
||||
A: power/wakeup_active_count=
|
||||
A: power/wakeup_count=
|
||||
A: power/wakeup_expire_count=
|
||||
A: power/wakeup_last_time_ms=
|
||||
A: power/wakeup_max_time_ms=
|
||||
A: power/wakeup_total_time_ms=
|
||||
A: product=EgisTec Touch Fingerprint Sensor
|
||||
A: quirks=0x0
|
||||
A: removable=fixed
|
||||
A: rx_lanes=1
|
||||
A: serial=W700B41B
|
||||
A: speed=12
|
||||
A: tx_lanes=1
|
||||
A: urbnum=8040
|
||||
A: version= 1.10
|
||||
|
||||
P: /devices/pci0000:00/0000:00:14.0/usb1
|
||||
N: bus/usb/001/001=12010002090001406B1D020008050302010109021900010100E0000904000001090000000705810304000C
|
||||
E: DEVNAME=/dev/bus/usb/001/001
|
||||
E: DEVTYPE=usb_device
|
||||
E: DRIVER=usb
|
||||
E: PRODUCT=1d6b/2/508
|
||||
E: TYPE=9/0/1
|
||||
E: BUSNUM=001
|
||||
E: DEVNUM=001
|
||||
E: MAJOR=189
|
||||
E: MINOR=0
|
||||
E: SUBSYSTEM=usb
|
||||
E: ID_VENDOR=Linux_5.8.0-59-generic_xhci-hcd
|
||||
E: ID_VENDOR_ENC=Linux\x205.8.0-59-generic\x20xhci-hcd
|
||||
E: ID_VENDOR_ID=1d6b
|
||||
E: ID_MODEL=xHCI_Host_Controller
|
||||
E: ID_MODEL_ENC=xHCI\x20Host\x20Controller
|
||||
E: ID_MODEL_ID=0002
|
||||
E: ID_REVISION=0508
|
||||
E: ID_SERIAL=Linux_5.8.0-59-generic_xhci-hcd_xHCI_Host_Controller_0000:00:14.0
|
||||
E: ID_SERIAL_SHORT=0000:00:14.0
|
||||
E: ID_BUS=usb
|
||||
E: ID_USB_INTERFACES=:090000:
|
||||
E: ID_VENDOR_FROM_DATABASE=Linux Foundation
|
||||
E: ID_MODEL_FROM_DATABASE=2.0 root hub
|
||||
E: ID_PATH=pci-0000:00:14.0
|
||||
E: ID_PATH_TAG=pci-0000_00_14_0
|
||||
E: ID_FOR_SEAT=usb-pci-0000_00_14_0
|
||||
E: TAGS=:seat:
|
||||
A: authorized=1
|
||||
A: authorized_default=1
|
||||
A: avoid_reset_quirk=0
|
||||
A: bConfigurationValue=1
|
||||
A: bDeviceClass=09
|
||||
A: bDeviceProtocol=01
|
||||
A: bDeviceSubClass=00
|
||||
A: bMaxPacketSize0=64
|
||||
A: bMaxPower=0mA
|
||||
A: bNumConfigurations=1
|
||||
A: bNumInterfaces= 1
|
||||
A: bcdDevice=0508
|
||||
A: bmAttributes=e0
|
||||
A: busnum=1
|
||||
A: configuration=
|
||||
H: descriptors=12010002090001406B1D020008050302010109021900010100E0000904000001090000000705810304000C
|
||||
A: dev=189:0
|
||||
A: devnum=1
|
||||
A: devpath=0
|
||||
L: driver=../../../../bus/usb/drivers/usb
|
||||
A: idProduct=0002
|
||||
A: idVendor=1d6b
|
||||
A: interface_authorized_default=1
|
||||
A: ltm_capable=no
|
||||
A: manufacturer=Linux 5.8.0-59-generic xhci-hcd
|
||||
A: maxchild=12
|
||||
A: power/active_duration=378024
|
||||
A: power/async=enabled
|
||||
A: power/autosuspend=0
|
||||
A: power/autosuspend_delay_ms=0
|
||||
A: power/connected_duration=5527220
|
||||
A: power/control=auto
|
||||
A: power/level=auto
|
||||
A: power/runtime_active_kids=1
|
||||
A: power/runtime_active_time=377962
|
||||
A: power/runtime_enabled=enabled
|
||||
A: power/runtime_status=active
|
||||
A: power/runtime_suspended_time=5149253
|
||||
A: power/runtime_usage=0
|
||||
A: power/wakeup=disabled
|
||||
A: power/wakeup_abort_count=
|
||||
A: power/wakeup_active=
|
||||
A: power/wakeup_active_count=
|
||||
A: power/wakeup_count=
|
||||
A: power/wakeup_expire_count=
|
||||
A: power/wakeup_last_time_ms=
|
||||
A: power/wakeup_max_time_ms=
|
||||
A: power/wakeup_total_time_ms=
|
||||
A: product=xHCI Host Controller
|
||||
A: quirks=0x0
|
||||
A: removable=unknown
|
||||
A: rx_lanes=1
|
||||
A: serial=0000:00:14.0
|
||||
A: speed=480
|
||||
A: tx_lanes=1
|
||||
A: urbnum=956
|
||||
A: version= 2.00
|
||||
|
||||
P: /devices/pci0000:00/0000:00:14.0
|
||||
E: DRIVER=xhci_hcd
|
||||
E: PCI_CLASS=C0330
|
||||
E: PCI_ID=8086:9D2F
|
||||
E: PCI_SUBSYS_ID=1025:118E
|
||||
E: PCI_SLOT_NAME=0000:00:14.0
|
||||
E: MODALIAS=pci:v00008086d00009D2Fsv00001025sd0000118Ebc0Csc03i30
|
||||
E: SUBSYSTEM=pci
|
||||
E: ID_PCI_CLASS_FROM_DATABASE=Serial bus controller
|
||||
E: ID_PCI_SUBCLASS_FROM_DATABASE=USB controller
|
||||
E: ID_PCI_INTERFACE_FROM_DATABASE=XHCI
|
||||
E: ID_VENDOR_FROM_DATABASE=Intel Corporation
|
||||
E: ID_MODEL_FROM_DATABASE=Sunrise Point-LP USB 3.0 xHCI Controller
|
||||
A: ari_enabled=0
|
||||
A: broken_parity_status=0
|
||||
A: class=0x0c0330
|
||||
H: config=86802F9D060490022130030C00008000040021A400000000000000000000000000000000000000000000000025108E11000000007000000000000000FF010000
|
||||
A: consistent_dma_mask_bits=64
|
||||
A: d3cold_allowed=1
|
||||
A: dbc=disabled
|
||||
A: device=0x9d2f
|
||||
A: dma_mask_bits=64
|
||||
L: driver=../../../bus/pci/drivers/xhci_hcd
|
||||
A: driver_override=(null)
|
||||
A: enable=1
|
||||
A: irq=127
|
||||
A: local_cpulist=0-7
|
||||
A: local_cpus=ff
|
||||
A: modalias=pci:v00008086d00009D2Fsv00001025sd0000118Ebc0Csc03i30
|
||||
A: msi_bus=1
|
||||
A: msi_irqs/127=msi
|
||||
A: numa_node=-1
|
||||
A: pools=poolinfo - 0.1\nbuffer-2048 0 0 2048 0\nbuffer-512 0 0 512 0\nbuffer-128 0 0 128 0\nbuffer-32 0 0 32 0\nxHCI 1KB stream ctx arrays 0 0 1024 0\nxHCI 256 byte stream ctx arrays 0 0 256 0\nxHCI input/output contexts 9 10 2112 10\nxHCI ring segments 32 36 4096 36\nbuffer-2048 1 2 2048 1\nbuffer-512 0 0 512 0\nbuffer-128 0 0 128 0\nbuffer-32 0 0 32 0
|
||||
A: power/async=enabled
|
||||
A: power/control=on
|
||||
A: power/runtime_active_kids=1
|
||||
A: power/runtime_active_time=5524703
|
||||
A: power/runtime_enabled=forbidden
|
||||
A: power/runtime_status=active
|
||||
A: power/runtime_suspended_time=3373
|
||||
A: power/runtime_usage=1
|
||||
A: power/wakeup=enabled
|
||||
A: power/wakeup_abort_count=0
|
||||
A: power/wakeup_active=0
|
||||
A: power/wakeup_active_count=0
|
||||
A: power/wakeup_count=0
|
||||
A: power/wakeup_expire_count=0
|
||||
A: power/wakeup_last_time_ms=0
|
||||
A: power/wakeup_max_time_ms=0
|
||||
A: power/wakeup_total_time_ms=0
|
||||
A: resource=0x00000000a4210000 0x00000000a421ffff 0x0000000000140204\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000
|
||||
A: revision=0x21
|
||||
A: subsystem_device=0x118e
|
||||
A: subsystem_vendor=0x1025
|
||||
A: vendor=0x8086
|
||||
|
||||
Binary file not shown.
Executable
+83
@@ -0,0 +1,83 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import gi
|
||||
gi.require_version('FPrint', '2.0')
|
||||
from gi.repository import FPrint, GLib
|
||||
|
||||
ctx = GLib.main_context_default()
|
||||
|
||||
c = FPrint.Context()
|
||||
c.enumerate()
|
||||
devices = c.get_devices()
|
||||
|
||||
d = devices[0]
|
||||
del devices
|
||||
|
||||
assert d.get_driver() == "elanmoc"
|
||||
assert not d.has_feature(FPrint.DeviceFeature.CAPTURE)
|
||||
assert d.has_feature(FPrint.DeviceFeature.IDENTIFY)
|
||||
assert d.has_feature(FPrint.DeviceFeature.VERIFY)
|
||||
assert not d.has_feature(FPrint.DeviceFeature.DUPLICATES_CHECK)
|
||||
assert d.has_feature(FPrint.DeviceFeature.STORAGE)
|
||||
assert d.has_feature(FPrint.DeviceFeature.STORAGE_LIST)
|
||||
assert d.has_feature(FPrint.DeviceFeature.STORAGE_DELETE)
|
||||
assert not d.has_feature(FPrint.DeviceFeature.STORAGE_CLEAR)
|
||||
|
||||
d.open_sync()
|
||||
|
||||
template = FPrint.Print.new(d)
|
||||
|
||||
def enroll_progress(*args):
|
||||
#assert d.get_finger_status() == FPrint.FingerStatusFlags.NEEDED
|
||||
print("finger status: ", d.get_finger_status())
|
||||
print('enroll progress: ' + str(args))
|
||||
|
||||
def identify_done(dev, res):
|
||||
global identified
|
||||
identified = True
|
||||
identify_match, identify_print = dev.identify_finish(res)
|
||||
print('indentification_done: ', identify_match, identify_print)
|
||||
assert identify_match.equal(identify_print)
|
||||
|
||||
# List, enroll, list, verify, identify, delete
|
||||
print("enrolling")
|
||||
assert d.get_finger_status() == FPrint.FingerStatusFlags.NONE
|
||||
p = d.enroll_sync(template, None, enroll_progress, None)
|
||||
assert d.get_finger_status() == FPrint.FingerStatusFlags.NONE
|
||||
print("enroll done")
|
||||
|
||||
print("listing")
|
||||
stored = d.list_prints_sync()
|
||||
print("listing done")
|
||||
assert len(stored) == 1
|
||||
assert stored[0].equal(p)
|
||||
print("verifying")
|
||||
assert d.get_finger_status() == FPrint.FingerStatusFlags.NONE
|
||||
verify_res, verify_print = d.verify_sync(p)
|
||||
assert d.get_finger_status() == FPrint.FingerStatusFlags.NONE
|
||||
print("verify done")
|
||||
del p
|
||||
assert verify_res == True
|
||||
|
||||
identified = False
|
||||
deserialized_prints = []
|
||||
for p in stored:
|
||||
deserialized_prints.append(FPrint.Print.deserialize(p.serialize()))
|
||||
assert deserialized_prints[-1].equal(p)
|
||||
del stored
|
||||
|
||||
print('async identifying')
|
||||
d.identify(deserialized_prints, callback=identify_done)
|
||||
del deserialized_prints
|
||||
|
||||
while not identified:
|
||||
ctx.iteration(True)
|
||||
|
||||
print("deleting")
|
||||
d.delete_print_sync(p)
|
||||
print("delete done")
|
||||
|
||||
d.close_sync()
|
||||
|
||||
del d
|
||||
del c
|
||||
@@ -0,0 +1,225 @@
|
||||
P: /devices/pci0000:00/0000:00:14.0/usb1/1-1
|
||||
N: bus/usb/001/010=1201000200000040F3047E0C05030102000109025300010103A0320904000008FF0000000921100100012215000705810240000107050102400001070582024000010705020240000107058302400001070503024000010705840240000107050402400001
|
||||
E: DEVNAME=/dev/bus/usb/001/010
|
||||
E: DEVTYPE=usb_device
|
||||
E: DRIVER=usb
|
||||
E: PRODUCT=4f3/c7e/305
|
||||
E: TYPE=0/0/0
|
||||
E: BUSNUM=001
|
||||
E: DEVNUM=010
|
||||
E: MAJOR=189
|
||||
E: MINOR=9
|
||||
E: SUBSYSTEM=usb
|
||||
E: ID_VENDOR=ELAN
|
||||
E: ID_VENDOR_ENC=ELAN
|
||||
E: ID_VENDOR_ID=04f3
|
||||
E: ID_MODEL=ELAN:ARM-M4
|
||||
E: ID_MODEL_ENC=ELAN:ARM-M4
|
||||
E: ID_MODEL_ID=0c7e
|
||||
E: ID_REVISION=0305
|
||||
E: ID_SERIAL=ELAN_ELAN:ARM-M4
|
||||
E: ID_BUS=usb
|
||||
E: ID_USB_INTERFACES=:ff0000:
|
||||
E: ID_VENDOR_FROM_DATABASE=Elan Microelectronics Corp.
|
||||
E: ID_PATH=pci-0000:00:14.0-usb-0:1
|
||||
E: ID_PATH_TAG=pci-0000_00_14_0-usb-0_1
|
||||
A: authorized=1
|
||||
A: avoid_reset_quirk=0
|
||||
A: bConfigurationValue=1
|
||||
A: bDeviceClass=00
|
||||
A: bDeviceProtocol=00
|
||||
A: bDeviceSubClass=00
|
||||
A: bMaxPacketSize0=64
|
||||
A: bMaxPower=100mA
|
||||
A: bNumConfigurations=1
|
||||
A: bNumInterfaces= 1
|
||||
A: bcdDevice=0305
|
||||
A: bmAttributes=a0
|
||||
A: busnum=1
|
||||
A: configuration=add909c9-e67e-4126-a6f7-1e31179e27d9
|
||||
H: descriptors=1201000200000040F3047E0C05030102000109025300010103A0320904000008FF0000000921100100012215000705810240000107050102400001070582024000010705020240000107058302400001070503024000010705840240000107050402400001
|
||||
A: dev=189:9
|
||||
A: devnum=10
|
||||
A: devpath=1
|
||||
L: driver=../../../../../bus/usb/drivers/usb
|
||||
A: idProduct=0c7e
|
||||
A: idVendor=04f3
|
||||
A: ltm_capable=no
|
||||
A: manufacturer=ELAN
|
||||
A: maxchild=0
|
||||
L: port=../1-0:1.0/usb1-port1
|
||||
A: power/active_duration=94712
|
||||
A: power/async=enabled
|
||||
A: power/autosuspend=2
|
||||
A: power/autosuspend_delay_ms=2000
|
||||
A: power/connected_duration=94712
|
||||
A: power/control=on
|
||||
A: power/level=on
|
||||
A: power/persist=1
|
||||
A: power/runtime_active_kids=0
|
||||
A: power/runtime_active_time=94436
|
||||
A: power/runtime_enabled=forbidden
|
||||
A: power/runtime_status=active
|
||||
A: power/runtime_suspended_time=0
|
||||
A: power/runtime_usage=1
|
||||
A: power/wakeup=disabled
|
||||
A: power/wakeup_abort_count=
|
||||
A: power/wakeup_active=
|
||||
A: power/wakeup_active_count=
|
||||
A: power/wakeup_count=
|
||||
A: power/wakeup_expire_count=
|
||||
A: power/wakeup_last_time_ms=
|
||||
A: power/wakeup_max_time_ms=
|
||||
A: power/wakeup_total_time_ms=
|
||||
A: product=ELAN:ARM-M4
|
||||
A: quirks=0x0
|
||||
A: removable=removable
|
||||
A: rx_lanes=1
|
||||
A: speed=12
|
||||
A: tx_lanes=1
|
||||
A: urbnum=12
|
||||
A: version= 2.00
|
||||
|
||||
P: /devices/pci0000:00/0000:00:14.0/usb1
|
||||
N: bus/usb/001/001=12010002090001406B1D020004050302010109021900010100E0000904000001090000000705810304000C
|
||||
E: DEVNAME=/dev/bus/usb/001/001
|
||||
E: DEVTYPE=usb_device
|
||||
E: DRIVER=usb
|
||||
E: PRODUCT=1d6b/2/504
|
||||
E: TYPE=9/0/1
|
||||
E: BUSNUM=001
|
||||
E: DEVNUM=001
|
||||
E: MAJOR=189
|
||||
E: MINOR=0
|
||||
E: SUBSYSTEM=usb
|
||||
E: ID_VENDOR=Linux_5.4.0-42-generic_xhci-hcd
|
||||
E: ID_VENDOR_ENC=Linux\x205.4.0-42-generic\x20xhci-hcd
|
||||
E: ID_VENDOR_ID=1d6b
|
||||
E: ID_MODEL=xHCI_Host_Controller
|
||||
E: ID_MODEL_ENC=xHCI\x20Host\x20Controller
|
||||
E: ID_MODEL_ID=0002
|
||||
E: ID_REVISION=0504
|
||||
E: ID_SERIAL=Linux_5.4.0-42-generic_xhci-hcd_xHCI_Host_Controller_0000:00:14.0
|
||||
E: ID_SERIAL_SHORT=0000:00:14.0
|
||||
E: ID_BUS=usb
|
||||
E: ID_USB_INTERFACES=:090000:
|
||||
E: ID_VENDOR_FROM_DATABASE=Linux Foundation
|
||||
E: ID_MODEL_FROM_DATABASE=2.0 root hub
|
||||
E: ID_PATH=pci-0000:00:14.0
|
||||
E: ID_PATH_TAG=pci-0000_00_14_0
|
||||
E: ID_FOR_SEAT=usb-pci-0000_00_14_0
|
||||
E: TAGS=:seat:
|
||||
A: authorized=1
|
||||
A: authorized_default=1
|
||||
A: avoid_reset_quirk=0
|
||||
A: bConfigurationValue=1
|
||||
A: bDeviceClass=09
|
||||
A: bDeviceProtocol=01
|
||||
A: bDeviceSubClass=00
|
||||
A: bMaxPacketSize0=64
|
||||
A: bMaxPower=0mA
|
||||
A: bNumConfigurations=1
|
||||
A: bNumInterfaces= 1
|
||||
A: bcdDevice=0504
|
||||
A: bmAttributes=e0
|
||||
A: busnum=1
|
||||
A: configuration=
|
||||
H: descriptors=12010002090001406B1D020004050302010109021900010100E0000904000001090000000705810304000C
|
||||
A: dev=189:0
|
||||
A: devnum=1
|
||||
A: devpath=0
|
||||
L: driver=../../../../bus/usb/drivers/usb
|
||||
A: idProduct=0002
|
||||
A: idVendor=1d6b
|
||||
A: interface_authorized_default=1
|
||||
A: ltm_capable=no
|
||||
A: manufacturer=Linux 5.4.0-42-generic xhci-hcd
|
||||
A: maxchild=12
|
||||
A: power/active_duration=74604360
|
||||
A: power/async=enabled
|
||||
A: power/autosuspend=0
|
||||
A: power/autosuspend_delay_ms=0
|
||||
A: power/connected_duration=74606456
|
||||
A: power/control=auto
|
||||
A: power/level=auto
|
||||
A: power/runtime_active_kids=4
|
||||
A: power/runtime_active_time=74605838
|
||||
A: power/runtime_enabled=enabled
|
||||
A: power/runtime_status=active
|
||||
A: power/runtime_suspended_time=0
|
||||
A: power/runtime_usage=0
|
||||
A: power/wakeup=disabled
|
||||
A: power/wakeup_abort_count=
|
||||
A: power/wakeup_active=
|
||||
A: power/wakeup_active_count=
|
||||
A: power/wakeup_count=
|
||||
A: power/wakeup_expire_count=
|
||||
A: power/wakeup_last_time_ms=
|
||||
A: power/wakeup_max_time_ms=
|
||||
A: power/wakeup_total_time_ms=
|
||||
A: product=xHCI Host Controller
|
||||
A: quirks=0x0
|
||||
A: removable=unknown
|
||||
A: rx_lanes=1
|
||||
A: serial=0000:00:14.0
|
||||
A: speed=480
|
||||
A: tx_lanes=1
|
||||
A: urbnum=490
|
||||
A: version= 2.00
|
||||
|
||||
P: /devices/pci0000:00/0000:00:14.0
|
||||
E: DRIVER=xhci_hcd
|
||||
E: PCI_CLASS=C0330
|
||||
E: PCI_ID=8086:9DED
|
||||
E: PCI_SUBSYS_ID=103C:85EF
|
||||
E: PCI_SLOT_NAME=0000:00:14.0
|
||||
E: MODALIAS=pci:v00008086d00009DEDsv0000103Csd000085EFbc0Csc03i30
|
||||
E: SUBSYSTEM=pci
|
||||
E: ID_PCI_CLASS_FROM_DATABASE=Serial bus controller
|
||||
E: ID_PCI_SUBCLASS_FROM_DATABASE=USB controller
|
||||
E: ID_PCI_INTERFACE_FROM_DATABASE=XHCI
|
||||
E: ID_VENDOR_FROM_DATABASE=Intel Corporation
|
||||
E: ID_MODEL_FROM_DATABASE=Cannon Point-LP USB 3.1 xHCI Controller
|
||||
A: ari_enabled=0
|
||||
A: broken_parity_status=0
|
||||
A: class=0x0c0330
|
||||
H: config=8680ED9D060490023030030C00008000040030A10000000000000000000000000000000000000000000000003C10EF85000000007000000000000000FF010000FD0134808FC6FF8300000000000000007F6DDC0F00000000181C030400000000316000000000000000000000000000000180C2C1080000000000000000000000059087007802E0FE0000000000000000090014F01000400100000000C10A080000080E00001800008F40020000010000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000B50F300112000000
|
||||
A: consistent_dma_mask_bits=64
|
||||
A: d3cold_allowed=1
|
||||
A: dbc=disabled
|
||||
A: device=0x9ded
|
||||
A: dma_mask_bits=64
|
||||
L: driver=../../../bus/pci/drivers/xhci_hcd
|
||||
A: driver_override=(null)
|
||||
A: enable=1
|
||||
A: irq=124
|
||||
A: local_cpulist=0-3
|
||||
A: local_cpus=f
|
||||
A: modalias=pci:v00008086d00009DEDsv0000103Csd000085EFbc0Csc03i30
|
||||
A: msi_bus=1
|
||||
A: msi_irqs/124=msi
|
||||
A: numa_node=-1
|
||||
A: pools=poolinfo - 0.1\nbuffer-2048 0 0 2048 0\nbuffer-512 0 0 512 0\nbuffer-128 0 32 128 1\nbuffer-32 0 0 32 0\nxHCI 1KB stream ctx arrays 0 0 1024 0\nxHCI 256 byte stream ctx arrays 0 0 256 0\nxHCI input/output contexts 11 12 2112 12\nxHCI ring segments 54 54 4096 54\nbuffer-2048 0 0 2048 0\nbuffer-512 0 0 512 0\nbuffer-128 9 32 128 1\nbuffer-32 0 0 32 0
|
||||
A: power/async=enabled
|
||||
A: power/control=auto
|
||||
A: power/runtime_active_kids=1
|
||||
A: power/runtime_active_time=74606194
|
||||
A: power/runtime_enabled=enabled
|
||||
A: power/runtime_status=active
|
||||
A: power/runtime_suspended_time=0
|
||||
A: power/runtime_usage=0
|
||||
A: power/wakeup=enabled
|
||||
A: power/wakeup_abort_count=0
|
||||
A: power/wakeup_active=0
|
||||
A: power/wakeup_active_count=0
|
||||
A: power/wakeup_count=0
|
||||
A: power/wakeup_expire_count=0
|
||||
A: power/wakeup_last_time_ms=0
|
||||
A: power/wakeup_max_time_ms=0
|
||||
A: power/wakeup_total_time_ms=0
|
||||
A: resource=0x00000000a1300000 0x00000000a130ffff 0x0000000000140204\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000
|
||||
A: revision=0x30
|
||||
A: subsystem_device=0x85ef
|
||||
A: subsystem_vendor=0x103c
|
||||
A: vendor=0x8086
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 94 KiB |
@@ -0,0 +1,136 @@
|
||||
P: /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-1/i2c-ELAN1300:00/0018:04F3:3057.0001/hidraw/hidraw0
|
||||
N: hidraw0
|
||||
E: DEVNAME=/dev/hidraw0
|
||||
E: MAJOR=241
|
||||
E: MINOR=0
|
||||
E: SUBSYSTEM=hidraw
|
||||
A: dev=241:0\n
|
||||
L: device=../../../0018:04F3:3057.0001
|
||||
A: power/async=disabled\n
|
||||
A: power/control=auto\n
|
||||
A: power/runtime_active_kids=0\n
|
||||
A: power/runtime_active_time=0\n
|
||||
A: power/runtime_enabled=disabled\n
|
||||
A: power/runtime_status=unsupported\n
|
||||
A: power/runtime_suspended_time=0\n
|
||||
A: power/runtime_usage=0\n
|
||||
|
||||
P: /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-1/i2c-ELAN1300:00/0018:04F3:3057.0001
|
||||
E: DRIVER=hid-multitouch
|
||||
E: HID_ID=0018:000004F3:00003057
|
||||
E: HID_NAME=ELAN1300:00 04F3:3057
|
||||
E: HID_PHYS=i2c-ELAN1300:00
|
||||
E: HID_UNIQ=
|
||||
E: MODALIAS=hid:b0018g0004v000004F3p00003057
|
||||
E: SUBSYSTEM=hid
|
||||
A: country=00\n
|
||||
L: driver=../../../../../../../bus/hid/drivers/hid-multitouch
|
||||
A: modalias=hid:b0018g0004v000004F3p00003057\n
|
||||
A: power/async=enabled\n
|
||||
A: power/control=auto\n
|
||||
A: power/runtime_active_kids=0\n
|
||||
A: power/runtime_active_time=0\n
|
||||
A: power/runtime_enabled=disabled\n
|
||||
A: power/runtime_status=unsupported\n
|
||||
A: power/runtime_suspended_time=0\n
|
||||
A: power/runtime_usage=0\n
|
||||
A: quirks=334864\n
|
||||
H: report_descriptor=05010902A10185010901A100050919012902150025017501950281029506810305010930093109381581257F750895038106050C0A380295018106750895038103C0C0050D0905A10185040922A102150025010947094295027501810275019502810395017504250F095181020501150026880C7510550E6513093035004691019501810246140126A20826A20809318102050D150025649503C0550C66011047FFFF000027FFFF000075109501095681020954257F9501750881020509090125017501950181029507810309C5750895048103050D85020955095975049502250FB102850709607501950115002501B102950FB1030600FF0600FF850609C5150026FF007508960001B102850D09C4150026FF0075089504B102850C09C696E0027508B102850B09C795427508B102C0050D090EA10185030922A10009521500250A75089502B102C00922A1008505095709581500750195022503B102950EB103C0C00600FF0901A101850E09C5150026FF0026FF0075089504B102C0
|
||||
|
||||
P: /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-1/i2c-ELAN1300:00
|
||||
E: DRIVER=i2c_hid
|
||||
E: MODALIAS=acpi:ELAN1300:PNP0C50:
|
||||
E: SUBSYSTEM=i2c
|
||||
E: ID_VENDOR_FROM_DATABASE=ELAD srl
|
||||
L: driver=../../../../../../bus/i2c/drivers/i2c_hid
|
||||
L: firmware_node=../../../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:72/ELAN1300:00
|
||||
A: modalias=acpi:ELAN1300:PNP0C50:\n
|
||||
A: name=ELAN1300:00\n
|
||||
A: power/async=enabled\n
|
||||
A: power/control=auto\n
|
||||
A: power/runtime_active_kids=0\n
|
||||
A: power/runtime_active_time=0\n
|
||||
A: power/runtime_enabled=disabled\n
|
||||
A: power/runtime_status=unsupported\n
|
||||
A: power/runtime_suspended_time=0\n
|
||||
A: power/runtime_usage=0\n
|
||||
|
||||
P: /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-1
|
||||
E: SUBSYSTEM=i2c
|
||||
L: device=../../i2c_designware.1
|
||||
L: firmware_node=../../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:72
|
||||
A: name=Synopsys DesignWare I2C adapter\n
|
||||
A: power/async=disabled\n
|
||||
A: power/runtime_active_kids=0\n
|
||||
A: power/runtime_enabled=enabled\n
|
||||
A: power/runtime_status=suspended\n
|
||||
A: power/runtime_usage=0\n
|
||||
L: software_node=../../../../../kernel/software_nodes/node1
|
||||
|
||||
P: /devices/pci0000:00/0000:00:15.1/i2c_designware.1
|
||||
E: DEVTYPE=mfd_device
|
||||
E: DRIVER=i2c_designware
|
||||
E: MODALIAS=platform:i2c_designware
|
||||
E: SUBSYSTEM=platform
|
||||
E: ID_PATH=pci-0000:00:15.1-platform-i2c_designware.1
|
||||
E: ID_PATH_TAG=pci-0000_00_15_1-platform-i2c_designware_1
|
||||
L: driver=../../../../bus/platform/drivers/i2c_designware
|
||||
A: driver_override=(null)\n
|
||||
L: firmware_node=../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:72
|
||||
A: modalias=platform:i2c_designware\n
|
||||
A: power/async=disabled\n
|
||||
A: power/autosuspend_delay_ms=1000\n
|
||||
A: power/control=auto\n
|
||||
A: power/runtime_active_kids=0\n
|
||||
A: power/runtime_active_time=1507234\n
|
||||
A: power/runtime_enabled=enabled\n
|
||||
A: power/runtime_status=active\n
|
||||
A: power/runtime_suspended_time=12722220\n
|
||||
A: power/runtime_usage=0\n
|
||||
L: software_node=../../../../kernel/software_nodes/node1
|
||||
|
||||
P: /devices/pci0000:00/0000:00:15.1
|
||||
E: DRIVER=intel-lpss
|
||||
E: PCI_CLASS=118000
|
||||
E: PCI_ID=8086:9D61
|
||||
E: PCI_SUBSYS_ID=1043:1D30
|
||||
E: PCI_SLOT_NAME=0000:00:15.1
|
||||
E: MODALIAS=pci:v00008086d00009D61sv00001043sd00001D30bc11sc80i00
|
||||
E: SUBSYSTEM=pci
|
||||
E: ID_PCI_CLASS_FROM_DATABASE=Signal processing controller
|
||||
E: ID_PCI_SUBCLASS_FROM_DATABASE=Signal processing controller
|
||||
E: ID_VENDOR_FROM_DATABASE=Intel Corporation
|
||||
E: ID_MODEL_FROM_DATABASE=Sunrise Point-LP Serial IO I2C Controller
|
||||
A: ari_enabled=0\n
|
||||
A: broken_parity_status=0\n
|
||||
A: class=0x118000\n
|
||||
H: config=8680619D060010002100801110008000048013EF0000000000000000000000000000000000000000000000004310301D000000008000000000000000FF020000
|
||||
A: consistent_dma_mask_bits=64\n
|
||||
A: d3cold_allowed=1\n
|
||||
A: device=0x9d61\n
|
||||
A: dma_mask_bits=32\n
|
||||
L: driver=../../../bus/pci/drivers/intel-lpss
|
||||
A: driver_override=(null)\n
|
||||
A: enable=1\n
|
||||
L: firmware_node=../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:72
|
||||
A: irq=17\n
|
||||
A: local_cpulist=0-7\n
|
||||
A: local_cpus=ff\n
|
||||
A: modalias=pci:v00008086d00009D61sv00001043sd00001D30bc11sc80i00\n
|
||||
A: msi_bus=1\n
|
||||
A: numa_node=-1\n
|
||||
A: power/async=enabled\n
|
||||
A: power/control=on\n
|
||||
A: power/pm_qos_latency_tolerance_us=auto\n
|
||||
A: power/runtime_active_kids=1\n
|
||||
A: power/runtime_active_time=9614317\n
|
||||
A: power/runtime_enabled=forbidden\n
|
||||
A: power/runtime_status=active\n
|
||||
A: power/runtime_suspended_time=4616038\n
|
||||
A: power/runtime_usage=1\n
|
||||
A: resource=0x00000000ef138000 0x00000000ef138fff 0x0000000000140204\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n
|
||||
A: revision=0x21\n
|
||||
A: subsystem_device=0x1d30\n
|
||||
A: subsystem_vendor=0x1043\n
|
||||
A: vendor=0x8086\n
|
||||
|
||||
@@ -0,0 +1,170 @@
|
||||
P: /devices/pci0000:00/0000:00:1e.2/pxa2xx-spi.3/spi_master/spi0/spi-ELAN7001:00/spidev/spidev0.0
|
||||
N: spidev0.0
|
||||
E: DEVNAME=/dev/spidev0.0
|
||||
E: MAJOR=153
|
||||
E: MINOR=0
|
||||
E: SUBSYSTEM=spidev
|
||||
A: dev=153:0\n
|
||||
L: device=../../../spi-ELAN7001:00
|
||||
A: power/async=disabled\n
|
||||
A: power/control=auto\n
|
||||
A: power/runtime_active_kids=0\n
|
||||
A: power/runtime_active_time=0\n
|
||||
A: power/runtime_enabled=disabled\n
|
||||
A: power/runtime_status=unsupported\n
|
||||
A: power/runtime_suspended_time=0\n
|
||||
A: power/runtime_usage=0\n
|
||||
|
||||
P: /devices/pci0000:00/0000:00:1e.2/pxa2xx-spi.3/spi_master/spi0/spi-ELAN7001:00
|
||||
E: DRIVER=spidev
|
||||
E: MODALIAS=acpi:ELAN7001:
|
||||
E: SUBSYSTEM=spi
|
||||
E: ID_VENDOR_FROM_DATABASE=ELAD srl
|
||||
L: driver=../../../../../../../bus/spi/drivers/spidev
|
||||
A: driver_override=spidev\n
|
||||
L: firmware_node=../../../../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:73/ELAN7001:00
|
||||
A: modalias=acpi:ELAN7001:\n
|
||||
A: power/async=disabled\n
|
||||
A: power/control=auto\n
|
||||
A: power/runtime_active_kids=0\n
|
||||
A: power/runtime_active_time=0\n
|
||||
A: power/runtime_enabled=disabled\n
|
||||
A: power/runtime_status=unsupported\n
|
||||
A: power/runtime_suspended_time=0\n
|
||||
A: power/runtime_usage=0\n
|
||||
A: statistics/bytes=23208391
|
||||
A: statistics/bytes_rx=22185696
|
||||
A: statistics/bytes_tx=1191980
|
||||
A: statistics/errors=0
|
||||
A: statistics/messages=519673
|
||||
A: statistics/spi_async=0
|
||||
A: statistics/spi_sync=519673
|
||||
A: statistics/spi_sync_immediate=519673
|
||||
A: statistics/timedout=0
|
||||
A: statistics/transfer_bytes_histo_0-1=398920
|
||||
A: statistics/transfer_bytes_histo_1024-2047=0
|
||||
A: statistics/transfer_bytes_histo_128-255=113366
|
||||
A: statistics/transfer_bytes_histo_16-31=0
|
||||
A: statistics/transfer_bytes_histo_16384-32767=0
|
||||
A: statistics/transfer_bytes_histo_2-3=517580
|
||||
A: statistics/transfer_bytes_histo_2048-4095=0
|
||||
A: statistics/transfer_bytes_histo_256-511=0
|
||||
A: statistics/transfer_bytes_histo_32-63=0
|
||||
A: statistics/transfer_bytes_histo_32768-65535=0
|
||||
A: statistics/transfer_bytes_histo_4-7=0
|
||||
A: statistics/transfer_bytes_histo_4096-8191=0
|
||||
A: statistics/transfer_bytes_histo_512-1023=0
|
||||
A: statistics/transfer_bytes_histo_64-127=0
|
||||
A: statistics/transfer_bytes_histo_65536+=0
|
||||
A: statistics/transfer_bytes_histo_8-15=0
|
||||
A: statistics/transfer_bytes_histo_8192-16383=0
|
||||
A: statistics/transfers=1029866
|
||||
A: statistics/transfers_split_maxsize=0
|
||||
|
||||
P: /devices/pci0000:00/0000:00:1e.2/pxa2xx-spi.3/spi_master/spi0
|
||||
E: SUBSYSTEM=spi_master
|
||||
L: device=../../../pxa2xx-spi.3
|
||||
A: power/async=disabled\n
|
||||
A: power/control=auto\n
|
||||
A: power/runtime_active_kids=0\n
|
||||
A: power/runtime_active_time=0\n
|
||||
A: power/runtime_enabled=disabled\n
|
||||
A: power/runtime_status=unsupported\n
|
||||
A: power/runtime_suspended_time=0\n
|
||||
A: power/runtime_usage=0\n
|
||||
A: statistics/bytes=23208391
|
||||
A: statistics/bytes_rx=22185696
|
||||
A: statistics/bytes_tx=1191980
|
||||
A: statistics/errors=0
|
||||
A: statistics/messages=519673
|
||||
A: statistics/spi_async=0
|
||||
A: statistics/spi_sync=519673
|
||||
A: statistics/spi_sync_immediate=519673
|
||||
A: statistics/timedout=0
|
||||
A: statistics/transfer_bytes_histo_0-1=398920
|
||||
A: statistics/transfer_bytes_histo_1024-2047=0
|
||||
A: statistics/transfer_bytes_histo_128-255=113366
|
||||
A: statistics/transfer_bytes_histo_16-31=0
|
||||
A: statistics/transfer_bytes_histo_16384-32767=0
|
||||
A: statistics/transfer_bytes_histo_2-3=517580
|
||||
A: statistics/transfer_bytes_histo_2048-4095=0
|
||||
A: statistics/transfer_bytes_histo_256-511=0
|
||||
A: statistics/transfer_bytes_histo_32-63=0
|
||||
A: statistics/transfer_bytes_histo_32768-65535=0
|
||||
A: statistics/transfer_bytes_histo_4-7=0
|
||||
A: statistics/transfer_bytes_histo_4096-8191=0
|
||||
A: statistics/transfer_bytes_histo_512-1023=0
|
||||
A: statistics/transfer_bytes_histo_64-127=0
|
||||
A: statistics/transfer_bytes_histo_65536+=0
|
||||
A: statistics/transfer_bytes_histo_8-15=0
|
||||
A: statistics/transfer_bytes_histo_8192-16383=0
|
||||
A: statistics/transfers=1029866
|
||||
A: statistics/transfers_split_maxsize=0
|
||||
|
||||
P: /devices/pci0000:00/0000:00:1e.2/pxa2xx-spi.3
|
||||
E: DEVTYPE=mfd_device
|
||||
E: DRIVER=pxa2xx-spi
|
||||
E: MODALIAS=platform:pxa2xx-spi
|
||||
E: SUBSYSTEM=platform
|
||||
E: ID_PATH=pci-0000:00:1e.2-platform-pxa2xx-spi.3
|
||||
E: ID_PATH_TAG=pci-0000_00_1e_2-platform-pxa2xx-spi_3
|
||||
L: driver=../../../../bus/platform/drivers/pxa2xx-spi
|
||||
A: driver_override=(null)\n
|
||||
L: firmware_node=../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:73
|
||||
A: modalias=platform:pxa2xx-spi\n
|
||||
A: power/async=disabled\n
|
||||
A: power/autosuspend_delay_ms=50\n
|
||||
A: power/control=auto\n
|
||||
A: power/runtime_active_kids=0\n
|
||||
A: power/runtime_active_time=65446\n
|
||||
A: power/runtime_enabled=enabled\n
|
||||
A: power/runtime_status=suspended\n
|
||||
A: power/runtime_suspended_time=14155204\n
|
||||
A: power/runtime_usage=0\n
|
||||
|
||||
P: /devices/pci0000:00/0000:00:1e.2
|
||||
E: DRIVER=intel-lpss
|
||||
E: PCI_CLASS=118000
|
||||
E: PCI_ID=8086:9D29
|
||||
E: PCI_SUBSYS_ID=1043:1D2D
|
||||
E: PCI_SLOT_NAME=0000:00:1e.2
|
||||
E: MODALIAS=pci:v00008086d00009D29sv00001043sd00001D2Dbc11sc80i00
|
||||
E: SUBSYSTEM=pci
|
||||
E: ID_PCI_CLASS_FROM_DATABASE=Signal processing controller
|
||||
E: ID_PCI_SUBCLASS_FROM_DATABASE=Signal processing controller
|
||||
E: ID_VENDOR_FROM_DATABASE=Intel Corporation
|
||||
E: ID_MODEL_FROM_DATABASE=Sunrise Point-LP Serial IO SPI Controller
|
||||
A: ari_enabled=0\n
|
||||
A: broken_parity_status=0\n
|
||||
A: class=0x118000\n
|
||||
H: config=8680299D060010002100801110008000043013EF00000000000000000000000000000000000000000000000043102D1D000000008000000000000000FF030000
|
||||
A: consistent_dma_mask_bits=64\n
|
||||
A: d3cold_allowed=1\n
|
||||
A: device=0x9d29\n
|
||||
A: dma_mask_bits=32\n
|
||||
L: driver=../../../bus/pci/drivers/intel-lpss
|
||||
A: driver_override=(null)\n
|
||||
A: enable=1\n
|
||||
L: firmware_node=../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:73
|
||||
A: irq=22\n
|
||||
A: local_cpulist=0-7\n
|
||||
A: local_cpus=ff\n
|
||||
A: modalias=pci:v00008086d00009D29sv00001043sd00001D2Dbc11sc80i00\n
|
||||
A: msi_bus=1\n
|
||||
A: numa_node=-1\n
|
||||
A: pools=poolinfo - 0.1\ndma3chan1 0 102 40 1\ndma3chan0 0 102 40 1\n
|
||||
A: power/async=enabled\n
|
||||
A: power/control=on\n
|
||||
A: power/pm_qos_latency_tolerance_us=auto\n
|
||||
A: power/runtime_active_kids=0\n
|
||||
A: power/runtime_active_time=9330720\n
|
||||
A: power/runtime_enabled=forbidden\n
|
||||
A: power/runtime_status=active\n
|
||||
A: power/runtime_suspended_time=4891014\n
|
||||
A: power/runtime_usage=1\n
|
||||
A: resource=0x00000000ef133000 0x00000000ef133fff 0x0000000000140204\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n
|
||||
A: revision=0x21\n
|
||||
A: subsystem_device=0x1d2d\n
|
||||
A: subsystem_vendor=0x1043\n
|
||||
A: vendor=0x8086\n
|
||||
|
||||
+31
-12
@@ -24,13 +24,17 @@ envs.set('NO_AT_BRIDGE', '1')
|
||||
drivers_tests = [
|
||||
'aes3500',
|
||||
'elan',
|
||||
'elanmoc',
|
||||
'elanspi',
|
||||
'synaptics',
|
||||
'upektc_img',
|
||||
'vfs0050',
|
||||
'vfs301',
|
||||
'vfs5011',
|
||||
'vfs7552',
|
||||
'goodixmoc',
|
||||
'nb1010',
|
||||
'egis0570',
|
||||
]
|
||||
|
||||
if get_option('introspection')
|
||||
@@ -82,17 +86,22 @@ if get_option('introspection')
|
||||
endforeach
|
||||
|
||||
foreach driver_test: drivers_tests
|
||||
if driver_test.contains('-')
|
||||
driver_name = driver_test.split('-')[0]
|
||||
else
|
||||
driver_name = driver_test
|
||||
endif
|
||||
driver_envs = envs
|
||||
driver_envs.set('FP_DRIVERS_WHITELIST', driver_test)
|
||||
driver_envs.set('FP_DRIVERS_WHITELIST', driver_name)
|
||||
|
||||
if (driver_test in supported_drivers and
|
||||
if (driver_name in supported_drivers and
|
||||
gusb_dep.version().version_compare('>= 0.3.0'))
|
||||
test(driver_test,
|
||||
find_program('umockdev-test.py'),
|
||||
args: join_paths(meson.current_source_dir(), driver_test),
|
||||
env: driver_envs,
|
||||
suite: ['drivers'],
|
||||
timeout: 10,
|
||||
timeout: 15,
|
||||
depends: libfprint_typelib,
|
||||
)
|
||||
else
|
||||
@@ -177,9 +186,8 @@ foreach test_name: unit_tests
|
||||
link_with: test_utils,
|
||||
)
|
||||
test(test_name,
|
||||
find_program('test-runner.sh'),
|
||||
test_exe,
|
||||
suite: ['unit-tests'],
|
||||
args: [test_exe],
|
||||
env: envs,
|
||||
)
|
||||
endforeach
|
||||
@@ -193,11 +201,17 @@ test('udev-hwdb',
|
||||
|
||||
gdb = find_program('gdb', required: false)
|
||||
if gdb.found()
|
||||
libfprint_wrapper = [
|
||||
gdb.path(),
|
||||
'-batch',
|
||||
'-ex', 'run',
|
||||
'--args',
|
||||
]
|
||||
add_test_setup('gdb',
|
||||
timeout_multiplier: 1000,
|
||||
exe_wrapper: libfprint_wrapper,
|
||||
env: [
|
||||
'LIBFPRINT_TEST_WRAPPER=@0@ --args'.format(
|
||||
gdb.path())
|
||||
'LIBFPRINT_TEST_WRAPPER=' + ' '.join(libfprint_wrapper),
|
||||
])
|
||||
endif
|
||||
|
||||
@@ -207,14 +221,20 @@ if valgrind.found()
|
||||
glib_suppressions = glib_share + '/valgrind/glib.supp'
|
||||
python_suppressions = '@0@/@1@'.format(meson.source_root(),
|
||||
files('valgrind-python.supp')[0])
|
||||
libfprint_wrapper = [
|
||||
valgrind.path(),
|
||||
'--tool=memcheck',
|
||||
'--leak-check=full',
|
||||
'--suppressions=' + glib_suppressions,
|
||||
'--suppressions=' + python_suppressions,
|
||||
]
|
||||
add_test_setup('valgrind',
|
||||
timeout_multiplier: 10,
|
||||
exe_wrapper: libfprint_wrapper,
|
||||
env: [
|
||||
'G_SLICE=always-malloc',
|
||||
'UNDER_VALGRIND=1',
|
||||
('LIBFPRINT_TEST_WRAPPER=@0@ --tool=memcheck --leak-check=full ' +
|
||||
'--suppressions=@1@ --suppressions=@2@').format(
|
||||
valgrind.path(), glib_suppressions, python_suppressions)
|
||||
'LIBFPRINT_TEST_WRAPPER=' + ' '.join(libfprint_wrapper),
|
||||
])
|
||||
endif
|
||||
|
||||
@@ -305,9 +325,8 @@ if get_option('tod')
|
||||
tod_test_envs.set('FP_TOD_TEST_DRIVER_NAME', tod_driver)
|
||||
|
||||
test(test_name + '-' + tod_driver,
|
||||
find_program('test-runner.sh'),
|
||||
test_exe,
|
||||
suite: ['unit-tests', 'tod', tod_driver],
|
||||
args: [test_exe],
|
||||
env: tod_test_envs,
|
||||
depends: fake_driver,
|
||||
)
|
||||
|
||||
@@ -1,129 +0,0 @@
|
||||
@DEV /dev/bus/usb/001/070
|
||||
USBDEVFS_GET_CAPABILITIES 0 7D000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 01
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 40 38 0 00009C37FE5C669C2D000A01014101C10000D11BB7134A090FA1000000000100000000000003
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 5 5 0 A7FE011100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE01130100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 37 37 0 A7FE02512000014650312D30303030303030302D302D30303030303030302D6E6F626F6479
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 6 0 0000FE025400
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 6 0 0000FE026000
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910100
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE0255010C
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 6 0 0000FE026000
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910100
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE02550119
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 6 0 0000FE026000
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE02550125
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910100
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 6 0 0000FE026000
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE02550125
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910100
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 6 0 0000FE026000
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE02550132
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910100
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 6 0 0000FE026000
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE0255013E
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910100
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 6 0 0000FE026000
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE0255013E
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910100
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 6 0 0000FE026000
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE0255014B
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910100
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 6 0 0000FE026000
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910100
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE02550157
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 6 0 0000FE026000
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910100
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE02550164
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 37 0 0000FE02591F014650312D30303030303030302D302D30303030303030302D6E6F626F6479
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 6 0 0000FE046000
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910100
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 39 0 0000FE0468214F2B014650312D30303030303030302D302D30303030303030302D6E6F626F6479
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 5 5 0 A7FE037100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 41 0 0000FE03752301012007014650312D30303030303030302D302D30303030303030302D6E6F626F6479
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 5 5 0 A7FE037200
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 6 0 0000FE037600
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 35 35 0 A7FE04651E4650312D30303030303030302D302D30303030303030302D6E6F626F6479
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 6 0 0000FE046600
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 36 36 0 A7FE05811F014650312D30303030303030302D302D30303030303030302D6E6F626F6479
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 37 0 0000FE05831F014650312D30303030303030302D302D30303030303030302D6E6F626F6479
|
||||
@@ -1,188 +0,0 @@
|
||||
@DEV /dev/bus/usb/001/070
|
||||
USBDEVFS_GET_CAPABILITIES 0 7D000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 01
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 40 38 0 00009C37FE5C669C2D000A01014101C10000D11BB7134A090FA1000000000100000000000003
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 5 5 0 A7FE011100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE01130100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 5 5 0 A7FE021100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE02130100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 37 37 0 A7FE03512000014650312D30303030303030302D302D30303030303030302D6E6F626F6479
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 6 0 0000FE035400
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 6 0 0000FE036000
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910100
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE0355010C
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 6 0 0000FE036000
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910100
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE03550119
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 6 0 0000FE036000
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE03550125
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910100
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 6 0 0000FE036000
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE03550125
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910100
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 6 0 0000FE036000
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE03550132
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910100
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 6 0 0000FE036000
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE0355013E
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910100
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 6 0 0000FE036000
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE0355013E
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910100
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 6 0 0000FE036000
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE0355014B
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910100
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 6 0 0000FE036000
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910100
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE03550157
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 6 0 0000FE036000
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910100
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE03550164
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 37 0 0000FE03591F014650312D30303030303030302D302D30303030303030302D6E6F626F6479
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 5 5 0 A7FE047100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 41 0 0000FE04752301012007014650312D30303030303030302D302D30303030303030302D6E6F626F6479
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 5 5 0 A7FE047200
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 6 0 0000FE047600
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 35 35 0 A7FE05651E4650312D30303030303030302D302D30303030303030302D6E6F626F6479
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 6 0 0000FE056600
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000000
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 6 0 0000FE056000
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 06000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910101
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 7 0 0000FE00910100
|
||||
USBDEVFS_REAPURBNDELAY 0 1 131 0 0 7 7 0 05000000000100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 1 1 0 A8
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 39 0 0000FE0568214F2B014650312D30303030303030302D302D30303030303030302D6E6F626F6479
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 36 36 0 A7FE06811F014650312D30303030303030302D302D30303030303030302D6E6F626F6479
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 37 0 0000FE06831F014650312D30303030303030302D302D30303030303030302D6E6F626F6479
|
||||
USBDEVFS_REAPURBNDELAY 0 3 1 0 0 5 5 0 A7FE07A100
|
||||
USBDEVFS_REAPURBNDELAY 0 3 129 0 0 266 6 0 0000FE07A200
|
||||
|
||||
Binary file not shown.
@@ -19,12 +19,13 @@ assert d.has_feature(FPrint.DeviceFeature.IDENTIFY)
|
||||
assert d.has_feature(FPrint.DeviceFeature.VERIFY)
|
||||
assert not d.has_feature(FPrint.DeviceFeature.DUPLICATES_CHECK)
|
||||
assert d.has_feature(FPrint.DeviceFeature.STORAGE)
|
||||
assert d.has_feature(FPrint.DeviceFeature.STORAGE_LIST)
|
||||
assert d.has_feature(FPrint.DeviceFeature.STORAGE_DELETE)
|
||||
assert not d.has_feature(FPrint.DeviceFeature.STORAGE_CLEAR)
|
||||
assert d.has_feature(FPrint.DeviceFeature.STORAGE_CLEAR)
|
||||
|
||||
d.open_sync()
|
||||
|
||||
d.clear_storage_sync()
|
||||
|
||||
template = FPrint.Print.new(d)
|
||||
|
||||
def enroll_progress(*args):
|
||||
@@ -38,11 +39,6 @@ p = d.enroll_sync(template, None, enroll_progress, None)
|
||||
assert d.get_finger_status() == FPrint.FingerStatusFlags.NONE
|
||||
print("enroll done")
|
||||
|
||||
print("listing")
|
||||
stored = d.list_prints_sync()
|
||||
print("listing done")
|
||||
assert len(stored) == 1
|
||||
assert stored[0].equal(p)
|
||||
print("verifying")
|
||||
assert d.get_finger_status() == FPrint.FingerStatusFlags.NONE
|
||||
verify_res, verify_print = d.verify_sync(p)
|
||||
|
||||
+202
-54
@@ -1,14 +1,14 @@
|
||||
P: /devices/pci0000:00/0000:00:14.0/usb1/1-1
|
||||
N: bus/usb/001/070=12010002FF10FF08CB06BD0000000000010109022700010100A0320904000003FF000000070501024000000705810240000007058303080004
|
||||
E: DEVNAME=/dev/bus/usb/001/070
|
||||
P: /devices/pci0000:00/0000:00:14.0/usb1/1-9
|
||||
N: bus/usb/001/005
|
||||
E: DEVNAME=/dev/bus/usb/001/005
|
||||
E: DEVTYPE=usb_device
|
||||
E: DRIVER=usb
|
||||
E: PRODUCT=6cb/bd/0
|
||||
E: TYPE=255/16/255
|
||||
E: BUSNUM=001
|
||||
E: DEVNUM=070
|
||||
E: DEVNUM=005
|
||||
E: MAJOR=189
|
||||
E: MINOR=69
|
||||
E: MINOR=4
|
||||
E: SUBSYSTEM=usb
|
||||
E: ID_VENDOR=06cb
|
||||
E: ID_VENDOR_ENC=06cb
|
||||
@@ -17,59 +17,207 @@ E: ID_MODEL=00bd
|
||||
E: ID_MODEL_ENC=00bd
|
||||
E: ID_MODEL_ID=00bd
|
||||
E: ID_REVISION=0000
|
||||
E: ID_SERIAL=06cb_00bd_317bb11d90a4
|
||||
E: ID_SERIAL_SHORT=317bb11d90a4
|
||||
E: ID_SERIAL=06cb_00bd_c087f7d72126
|
||||
E: ID_SERIAL_SHORT=c087f7d72126
|
||||
E: ID_BUS=usb
|
||||
E: ID_USB_INTERFACES=:ff0000:
|
||||
E: ID_VENDOR_FROM_DATABASE=Synaptics, Inc.
|
||||
A: authorized=1
|
||||
A: avoid_reset_quirk=0
|
||||
A: bConfigurationValue=1
|
||||
A: bDeviceClass=ff
|
||||
A: bDeviceProtocol=ff
|
||||
A: bDeviceSubClass=10
|
||||
A: bMaxPacketSize0=8
|
||||
A: bMaxPower=100mA
|
||||
A: bNumConfigurations=1
|
||||
A: bNumInterfaces= 1
|
||||
A: bcdDevice=0000
|
||||
A: bmAttributes=a0
|
||||
E: ID_AUTOSUSPEND=1
|
||||
E: ID_MODEL_FROM_DATABASE=Prometheus MIS Touch Fingerprint Reader
|
||||
E: ID_PATH=pci-0000:00:14.0-usb-0:9
|
||||
E: ID_PATH_TAG=pci-0000_00_14_0-usb-0_9
|
||||
E: LIBFPRINT_DRIVER=Synaptics Sensors
|
||||
A: authorized=1\n
|
||||
A: avoid_reset_quirk=0\n
|
||||
A: bConfigurationValue=1\n
|
||||
A: bDeviceClass=ff\n
|
||||
A: bDeviceProtocol=ff\n
|
||||
A: bDeviceSubClass=10\n
|
||||
A: bMaxPacketSize0=8\n
|
||||
A: bMaxPower=100mA\n
|
||||
A: bNumConfigurations=1\n
|
||||
A: bNumInterfaces= 1\n
|
||||
A: bcdDevice=0000\n
|
||||
A: bmAttributes=a0\n
|
||||
A: busnum=1\n
|
||||
A: configuration=
|
||||
H: descriptors=12010002FF10FF08CB06BD0000000000010109022700010100A0320904000003FF000000070501024000000705810240000007058303080004
|
||||
A: dev=189:69
|
||||
A: devnum=70\n
|
||||
A: devpath=1
|
||||
A: dev=189:4\n
|
||||
A: devnum=5\n
|
||||
A: devpath=9\n
|
||||
L: driver=../../../../../bus/usb/drivers/usb
|
||||
A: idProduct=00bd
|
||||
A: idVendor=06cb
|
||||
A: ltm_capable=no
|
||||
A: maxchild=0
|
||||
L: port=../1-0:1.0/usb1-port1
|
||||
A: power/active_duration=33942
|
||||
A: power/autosuspend=2
|
||||
A: power/autosuspend_delay_ms=2000
|
||||
A: power/connected_duration=33942
|
||||
A: power/control=on
|
||||
A: power/level=on
|
||||
A: power/persist=1
|
||||
A: power/runtime_active_time=33702
|
||||
A: power/runtime_status=active
|
||||
A: power/runtime_suspended_time=0
|
||||
A: power/wakeup=disabled
|
||||
A: power/wakeup_abort_count=
|
||||
A: power/wakeup_active=
|
||||
A: power/wakeup_active_count=
|
||||
A: power/wakeup_count=
|
||||
A: power/wakeup_expire_count=
|
||||
A: power/wakeup_last_time_ms=
|
||||
A: power/wakeup_max_time_ms=
|
||||
A: power/wakeup_total_time_ms=
|
||||
A: quirks=0x0
|
||||
A: removable=removable
|
||||
A: rx_lanes=1
|
||||
A: serial=317bb11d90a4
|
||||
A: speed=12
|
||||
A: tx_lanes=1
|
||||
A: urbnum=12
|
||||
A: version= 2.00
|
||||
L: firmware_node=../../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:1c/device:1d/device:28
|
||||
A: idProduct=00bd\n
|
||||
A: idVendor=06cb\n
|
||||
A: ltm_capable=no\n
|
||||
A: maxchild=0\n
|
||||
L: port=../1-0:1.0/usb1-port9
|
||||
A: power/active_duration=82065\n
|
||||
A: power/autosuspend=2\n
|
||||
A: power/autosuspend_delay_ms=2000\n
|
||||
A: power/connected_duration=4271349\n
|
||||
A: power/control=auto\n
|
||||
A: power/level=auto\n
|
||||
A: power/persist=1\n
|
||||
A: power/runtime_active_time=82975\n
|
||||
A: power/runtime_status=suspended\n
|
||||
A: power/runtime_suspended_time=4186597\n
|
||||
A: power/wakeup=disabled\n
|
||||
A: power/wakeup_abort_count=\n
|
||||
A: power/wakeup_active=\n
|
||||
A: power/wakeup_active_count=\n
|
||||
A: power/wakeup_count=\n
|
||||
A: power/wakeup_expire_count=\n
|
||||
A: power/wakeup_last_time_ms=\n
|
||||
A: power/wakeup_max_time_ms=\n
|
||||
A: power/wakeup_total_time_ms=\n
|
||||
A: quirks=0x0\n
|
||||
A: removable=fixed\n
|
||||
A: rx_lanes=1\n
|
||||
A: serial=c087f7d72126\n
|
||||
A: speed=12\n
|
||||
A: tx_lanes=1\n
|
||||
A: urbnum=618\n
|
||||
A: version= 2.00\n
|
||||
|
||||
P: /devices/pci0000:00/0000:00:14.0/usb1
|
||||
N: bus/usb/001/001=12010002090001406B1D020012050302010109021900010100E0000904000001090000000705810304000C
|
||||
E: DEVNAME=/dev/bus/usb/001/001
|
||||
E: DEVTYPE=usb_device
|
||||
E: DRIVER=usb
|
||||
E: PRODUCT=1d6b/2/512
|
||||
E: TYPE=9/0/1
|
||||
E: BUSNUM=001
|
||||
E: DEVNUM=001
|
||||
E: MAJOR=189
|
||||
E: MINOR=0
|
||||
E: SUBSYSTEM=usb
|
||||
E: ID_VENDOR=Linux_5.12.9-300.fc34.x86_64_xhci-hcd
|
||||
E: ID_VENDOR_ENC=Linux\x205.12.9-300.fc34.x86_64\x20xhci-hcd
|
||||
E: ID_VENDOR_ID=1d6b
|
||||
E: ID_MODEL=xHCI_Host_Controller
|
||||
E: ID_MODEL_ENC=xHCI\x20Host\x20Controller
|
||||
E: ID_MODEL_ID=0002
|
||||
E: ID_REVISION=0512
|
||||
E: ID_SERIAL=Linux_5.12.9-300.fc34.x86_64_xhci-hcd_xHCI_Host_Controller_0000:00:14.0
|
||||
E: ID_SERIAL_SHORT=0000:00:14.0
|
||||
E: ID_BUS=usb
|
||||
E: ID_USB_INTERFACES=:090000:
|
||||
E: ID_VENDOR_FROM_DATABASE=Linux Foundation
|
||||
E: ID_AUTOSUSPEND=1
|
||||
E: ID_MODEL_FROM_DATABASE=2.0 root hub
|
||||
E: ID_PATH=pci-0000:00:14.0
|
||||
E: ID_PATH_TAG=pci-0000_00_14_0
|
||||
E: ID_FOR_SEAT=usb-pci-0000_00_14_0
|
||||
E: TAGS=:seat:
|
||||
E: CURRENT_TAGS=:seat:
|
||||
A: authorized=1\n
|
||||
A: authorized_default=1\n
|
||||
A: avoid_reset_quirk=0\n
|
||||
A: bConfigurationValue=1\n
|
||||
A: bDeviceClass=09\n
|
||||
A: bDeviceProtocol=01\n
|
||||
A: bDeviceSubClass=00\n
|
||||
A: bMaxPacketSize0=64\n
|
||||
A: bMaxPower=0mA\n
|
||||
A: bNumConfigurations=1\n
|
||||
A: bNumInterfaces= 1\n
|
||||
A: bcdDevice=0512\n
|
||||
A: bmAttributes=e0\n
|
||||
A: busnum=1\n
|
||||
A: configuration=
|
||||
H: descriptors=12010002090001406B1D020012050302010109021900010100E0000904000001090000000705810304000C
|
||||
A: dev=189:0\n
|
||||
A: devnum=1\n
|
||||
A: devpath=0\n
|
||||
L: driver=../../../../bus/usb/drivers/usb
|
||||
L: firmware_node=../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:1c/device:1d
|
||||
A: idProduct=0002\n
|
||||
A: idVendor=1d6b\n
|
||||
A: interface_authorized_default=1\n
|
||||
A: ltm_capable=no\n
|
||||
A: manufacturer=Linux 5.12.9-300.fc34.x86_64 xhci-hcd\n
|
||||
A: maxchild=12\n
|
||||
A: power/active_duration=4270585\n
|
||||
A: power/autosuspend=0\n
|
||||
A: power/autosuspend_delay_ms=0\n
|
||||
A: power/connected_duration=4272308\n
|
||||
A: power/control=auto\n
|
||||
A: power/level=auto\n
|
||||
A: power/runtime_active_time=4270770\n
|
||||
A: power/runtime_status=active\n
|
||||
A: power/runtime_suspended_time=0\n
|
||||
A: power/wakeup=disabled\n
|
||||
A: power/wakeup_abort_count=\n
|
||||
A: power/wakeup_active=\n
|
||||
A: power/wakeup_active_count=\n
|
||||
A: power/wakeup_count=\n
|
||||
A: power/wakeup_expire_count=\n
|
||||
A: power/wakeup_last_time_ms=\n
|
||||
A: power/wakeup_max_time_ms=\n
|
||||
A: power/wakeup_total_time_ms=\n
|
||||
A: product=xHCI Host Controller\n
|
||||
A: quirks=0x0\n
|
||||
A: removable=unknown\n
|
||||
A: rx_lanes=1\n
|
||||
A: serial=0000:00:14.0\n
|
||||
A: speed=480\n
|
||||
A: tx_lanes=1\n
|
||||
A: urbnum=463\n
|
||||
A: version= 2.00\n
|
||||
|
||||
P: /devices/pci0000:00/0000:00:14.0
|
||||
E: DRIVER=xhci_hcd
|
||||
E: PCI_CLASS=C0330
|
||||
E: PCI_ID=8086:9DED
|
||||
E: PCI_SUBSYS_ID=17AA:2292
|
||||
E: PCI_SLOT_NAME=0000:00:14.0
|
||||
E: MODALIAS=pci:v00008086d00009DEDsv000017AAsd00002292bc0Csc03i30
|
||||
E: SUBSYSTEM=pci
|
||||
E: ID_PCI_CLASS_FROM_DATABASE=Serial bus controller
|
||||
E: ID_PCI_SUBCLASS_FROM_DATABASE=USB controller
|
||||
E: ID_PCI_INTERFACE_FROM_DATABASE=XHCI
|
||||
E: ID_VENDOR_FROM_DATABASE=Intel Corporation
|
||||
E: ID_AUTOSUSPEND=1
|
||||
E: ID_MODEL_FROM_DATABASE=Cannon Point-LP USB 3.1 xHCI Controller
|
||||
A: ari_enabled=0\n
|
||||
A: broken_parity_status=0\n
|
||||
A: class=0x0c0330\n
|
||||
H: config=8680ED9D060490021130030C00008000040022EA000000000000000000000000000000000000000000000000AA179222000000007000000000000000FF010000
|
||||
A: consistent_dma_mask_bits=64\n
|
||||
A: d3cold_allowed=1\n
|
||||
A: dbc=disabled\n
|
||||
A: device=0x9ded\n
|
||||
A: dma_mask_bits=64\n
|
||||
L: driver=../../../bus/pci/drivers/xhci_hcd
|
||||
A: driver_override=(null)\n
|
||||
A: enable=1\n
|
||||
L: firmware_node=../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:1c
|
||||
A: irq=128\n
|
||||
A: local_cpulist=0-7\n
|
||||
A: local_cpus=ff\n
|
||||
A: modalias=pci:v00008086d00009DEDsv000017AAsd00002292bc0Csc03i30\n
|
||||
A: msi_bus=1\n
|
||||
A: msi_irqs/128=msi\n
|
||||
A: numa_node=-1\n
|
||||
A: pools=poolinfo - 0.1\nbuffer-2048 0 0 2048 0\nbuffer-512 0 0 512 0\nbuffer-128 0 0 128 0\nbuffer-32 0 0 32 0\nxHCI 1KB stream ctx arrays 0 0 1024 0\nxHCI 256 byte stream ctx arrays 0 0 256 0\nxHCI input/output contexts 9 12 2112 12\nxHCI ring segments 40 50 4096 50\nbuffer-2048 0 0 2048 0\nbuffer-512 0 0 512 0\nbuffer-128 6 32 128 1\nbuffer-32 0 0 32 0\n
|
||||
A: power/control=auto\n
|
||||
A: power/runtime_active_time=4271635\n
|
||||
A: power/runtime_status=active\n
|
||||
A: power/runtime_suspended_time=0\n
|
||||
A: power/wakeup=enabled\n
|
||||
A: power/wakeup_abort_count=0\n
|
||||
A: power/wakeup_active=0\n
|
||||
A: power/wakeup_active_count=0\n
|
||||
A: power/wakeup_count=0\n
|
||||
A: power/wakeup_expire_count=0\n
|
||||
A: power/wakeup_last_time_ms=0\n
|
||||
A: power/wakeup_max_time_ms=0\n
|
||||
A: power/wakeup_total_time_ms=0\n
|
||||
A: power_state=D0\n
|
||||
A: resource=0x00000000ea220000 0x00000000ea22ffff 0x0000000000140204\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n
|
||||
A: revision=0x11\n
|
||||
A: subsystem_device=0x2292\n
|
||||
A: subsystem_vendor=0x17aa\n
|
||||
A: vendor=0x8086\n
|
||||
|
||||
|
||||
@@ -42,6 +42,8 @@ fpi_device_fake_probe (FpDevice *device)
|
||||
fake_dev->last_called_function = fpi_device_fake_probe;
|
||||
g_assert_cmpuint (fpi_device_get_current_action (device), ==, FPI_DEVICE_ACTION_PROBE);
|
||||
|
||||
fpi_device_update_features (device, fake_dev->probe_features_update, fake_dev->probe_features_value);
|
||||
|
||||
if (fake_dev->return_action_error)
|
||||
{
|
||||
fpi_device_action_error (device, fake_dev->ret_error);
|
||||
@@ -247,6 +249,23 @@ fpi_device_fake_delete (FpDevice *device)
|
||||
fpi_device_delete_complete (device, fake_dev->ret_error);
|
||||
}
|
||||
|
||||
static void
|
||||
fpi_device_fake_clear_storage (FpDevice *device)
|
||||
{
|
||||
FpiDeviceFake *fake_dev = FPI_DEVICE_FAKE (device);
|
||||
|
||||
fake_dev->last_called_function = fpi_device_fake_clear_storage;
|
||||
g_assert_cmpuint (fpi_device_get_current_action (device), ==, FPI_DEVICE_ACTION_CLEAR_STORAGE);
|
||||
|
||||
if (fake_dev->return_action_error)
|
||||
{
|
||||
fpi_device_action_error (device, fake_dev->ret_error);
|
||||
return;
|
||||
}
|
||||
|
||||
fpi_device_clear_storage_complete (device, fake_dev->ret_error);
|
||||
}
|
||||
|
||||
static void
|
||||
fpi_device_fake_cancel (FpDevice *device)
|
||||
{
|
||||
@@ -256,6 +275,26 @@ fpi_device_fake_cancel (FpDevice *device)
|
||||
g_assert_cmpuint (fpi_device_get_current_action (device), !=, FPI_DEVICE_ACTION_NONE);
|
||||
}
|
||||
|
||||
static void
|
||||
fpi_device_fake_suspend (FpDevice *device)
|
||||
{
|
||||
FpiDeviceFake *fake_dev = FPI_DEVICE_FAKE (device);
|
||||
|
||||
fake_dev->last_called_function = fpi_device_fake_suspend;
|
||||
|
||||
fpi_device_suspend_complete (device, g_steal_pointer (&fake_dev->ret_suspend));
|
||||
}
|
||||
|
||||
static void
|
||||
fpi_device_fake_resume (FpDevice *device)
|
||||
{
|
||||
FpiDeviceFake *fake_dev = FPI_DEVICE_FAKE (device);
|
||||
|
||||
fake_dev->last_called_function = fpi_device_fake_resume;
|
||||
|
||||
fpi_device_resume_complete (device, g_steal_pointer (&fake_dev->ret_resume));
|
||||
}
|
||||
|
||||
static void
|
||||
fpi_device_fake_init (FpiDeviceFake *self)
|
||||
{
|
||||
@@ -283,6 +322,9 @@ fpi_device_fake_class_init (FpiDeviceFakeClass *klass)
|
||||
dev_class->list = fpi_device_fake_list;
|
||||
dev_class->delete = fpi_device_fake_delete;
|
||||
dev_class->cancel = fpi_device_fake_cancel;
|
||||
dev_class->clear_storage = fpi_device_fake_clear_storage;
|
||||
dev_class->suspend = fpi_device_fake_suspend;
|
||||
dev_class->resume = fpi_device_fake_resume;
|
||||
|
||||
fpi_device_class_auto_initialize_features (dev_class);
|
||||
}
|
||||
|
||||
+19
-11
@@ -27,18 +27,26 @@ G_DECLARE_FINAL_TYPE (FpiDeviceFake, fpi_device_fake, FPI, DEVICE_FAKE, FpDevice
|
||||
|
||||
struct _FpiDeviceFake
|
||||
{
|
||||
FpDevice parent;
|
||||
FpDevice parent;
|
||||
|
||||
gpointer last_called_function;
|
||||
gboolean return_action_error;
|
||||
gpointer last_called_function;
|
||||
gboolean return_action_error;
|
||||
|
||||
GError *ret_error;
|
||||
FpPrint *ret_print;
|
||||
FpPrint *ret_match;
|
||||
FpiMatchResult ret_result;
|
||||
FpImage *ret_image;
|
||||
GPtrArray *ret_list;
|
||||
GCancellable *ext_cancellable;
|
||||
|
||||
gpointer action_data;
|
||||
gpointer user_data;
|
||||
GError *ret_error;
|
||||
FpPrint *ret_print;
|
||||
FpPrint *ret_match;
|
||||
FpiMatchResult ret_result;
|
||||
FpImage *ret_image;
|
||||
GPtrArray *ret_list;
|
||||
|
||||
GError *ret_suspend;
|
||||
GError *ret_resume;
|
||||
|
||||
gpointer action_data;
|
||||
gpointer user_data;
|
||||
|
||||
FpDeviceFeature probe_features_update;
|
||||
FpDeviceFeature probe_features_value;
|
||||
};
|
||||
|
||||
@@ -62,6 +62,7 @@ test_frame_assembling (void)
|
||||
int test_height;
|
||||
guchar *data;
|
||||
struct fpi_frame_asmbl_ctx ctx = { 0, };
|
||||
gint xborder = 5;
|
||||
|
||||
g_autoptr(FpImage) fp_img = NULL;
|
||||
GSList *frames = NULL;
|
||||
@@ -79,7 +80,7 @@ test_frame_assembling (void)
|
||||
ctx.get_pixel = cairo_get_pixel;
|
||||
ctx.frame_width = width;
|
||||
ctx.frame_height = 20;
|
||||
ctx.image_width = width;
|
||||
ctx.image_width = width - 2 * xborder;
|
||||
|
||||
g_assert (height > ctx.frame_height);
|
||||
|
||||
@@ -118,8 +119,8 @@ test_frame_assembling (void)
|
||||
|
||||
/* The FpImage and cairo surface need to be identical in the test area */
|
||||
for (int y = 0; y < test_height; y++)
|
||||
for (int x = 0; x < width; x++)
|
||||
g_assert_cmpint (data[x * 4 + y * stride + 1], ==, fp_img->data[x + y * width]);
|
||||
for (int x = 0; x < ctx.image_width; x++)
|
||||
g_assert_cmpint (data[(x + xborder) * 4 + y * stride + 1], ==, fp_img->data[x + y * ctx.image_width]);
|
||||
|
||||
g_slist_free_full (frames, g_free);
|
||||
cairo_surface_destroy (img);
|
||||
|
||||
+602
-82
@@ -55,9 +55,11 @@ typedef FpDevice FpAutoCloseDevice;
|
||||
static FpAutoCloseDevice *
|
||||
auto_close_fake_device_new (void)
|
||||
{
|
||||
g_autoptr(GError) error = NULL;
|
||||
FpAutoCloseDevice *device = g_object_new (FPI_TYPE_DEVICE_FAKE, NULL);
|
||||
|
||||
g_assert_true (fp_device_open_sync (device, NULL, NULL));
|
||||
if (!fp_device_open_sync (device, NULL, &error))
|
||||
g_error ("Could not open device: %s", error->message);
|
||||
|
||||
return device;
|
||||
}
|
||||
@@ -65,6 +67,7 @@ auto_close_fake_device_new (void)
|
||||
static void
|
||||
auto_close_fake_device_free (FpAutoCloseDevice *device)
|
||||
{
|
||||
g_autoptr(GError) error = NULL;
|
||||
FpiDeviceFake *fake_dev = FPI_DEVICE_FAKE (device);
|
||||
|
||||
if (fake_dev->return_action_error)
|
||||
@@ -74,7 +77,8 @@ auto_close_fake_device_free (FpAutoCloseDevice *device)
|
||||
}
|
||||
|
||||
if (fp_device_is_open (device))
|
||||
g_assert_true (fp_device_close_sync (device, NULL, NULL));
|
||||
if (!fp_device_close_sync (device, NULL, &error))
|
||||
g_error ("Could not close device: %s", error->message);
|
||||
|
||||
g_object_unref (device);
|
||||
}
|
||||
@@ -529,67 +533,49 @@ test_driver_get_driver_data (void)
|
||||
}
|
||||
|
||||
static void
|
||||
driver_feature_changes_check (FpDevice *device, gboolean add)
|
||||
{
|
||||
g_autoptr(GFlagsClass) features_class = g_type_class_ref (FP_TYPE_DEVICE_FEATURE);
|
||||
FpDeviceClass *dev_class = FP_DEVICE_GET_CLASS (device);
|
||||
guint expected_features;
|
||||
guint initial_value;
|
||||
guint i;
|
||||
|
||||
if (add)
|
||||
initial_value = FP_DEVICE_FEATURE_NONE;
|
||||
else
|
||||
initial_value = features_class->mask;
|
||||
|
||||
g_assert_cmpuint (fp_device_get_features (device), ==, initial_value);
|
||||
|
||||
for (i = 0, expected_features = initial_value; i < features_class->n_values; ++i)
|
||||
{
|
||||
FpDeviceFeature feature = features_class->values[i].value;
|
||||
FpDeviceFeature added_feature = add ? feature : FP_DEVICE_FEATURE_NONE;
|
||||
FpDeviceFeature removed_feature = add ? FP_DEVICE_FEATURE_NONE : feature;
|
||||
|
||||
dev_class->features |= added_feature;
|
||||
dev_class->features &= ~removed_feature;
|
||||
|
||||
expected_features |= added_feature;
|
||||
expected_features &= ~removed_feature;
|
||||
|
||||
g_assert_cmpuint (fp_device_get_features (device), ==, expected_features);
|
||||
|
||||
if (added_feature != FP_DEVICE_FEATURE_NONE)
|
||||
g_assert_true (fp_device_has_feature (device, added_feature));
|
||||
else if (dev_class->features != FP_DEVICE_FEATURE_NONE)
|
||||
g_assert_false (fp_device_has_feature (device, added_feature));
|
||||
else
|
||||
g_assert_true (fp_device_has_feature (device, added_feature));
|
||||
|
||||
if (removed_feature != FP_DEVICE_FEATURE_NONE)
|
||||
g_assert_false (fp_device_has_feature (device, removed_feature));
|
||||
else if (dev_class->features != FP_DEVICE_FEATURE_NONE)
|
||||
g_assert_false (fp_device_has_feature (device, removed_feature));
|
||||
else
|
||||
g_assert_true (fp_device_has_feature (device, removed_feature));
|
||||
|
||||
g_assert_true (fp_device_has_feature (device, expected_features));
|
||||
}
|
||||
|
||||
if (add)
|
||||
g_assert_cmpuint (fp_device_get_features (device), ==, features_class->mask);
|
||||
else
|
||||
g_assert_cmpuint (fp_device_get_features (device), ==, FP_DEVICE_FEATURE_NONE);
|
||||
}
|
||||
|
||||
static void
|
||||
test_driver_features (void)
|
||||
test_driver_features_probe_updates (void)
|
||||
{
|
||||
g_autoptr(FpDevice) device = g_object_new (FPI_TYPE_DEVICE_FAKE, NULL);
|
||||
g_autoptr(FpAutoResetClass) dev_class = auto_reset_device_class ();
|
||||
FpDeviceClass *dev_class = FP_DEVICE_GET_CLASS (device);
|
||||
FpiDeviceFake *fake_dev;
|
||||
|
||||
dev_class->features = FP_DEVICE_FEATURE_NONE;
|
||||
driver_feature_changes_check (device, TRUE);
|
||||
driver_feature_changes_check (device, FALSE);
|
||||
g_assert_cmpuint (dev_class->features, !=, FP_DEVICE_FEATURE_NONE);
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_CAPTURE);
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_IDENTIFY);
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_VERIFY);
|
||||
g_assert_false (dev_class->features & FP_DEVICE_FEATURE_DUPLICATES_CHECK);
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_STORAGE);
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_STORAGE_LIST);
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_STORAGE_DELETE);
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_STORAGE_CLEAR);
|
||||
|
||||
/* Effectively clears FP_DEVICE_FEATURE_STORAGE_DELETE */
|
||||
fake_dev = FPI_DEVICE_FAKE (device);
|
||||
fake_dev->probe_features_update = FP_DEVICE_FEATURE_STORAGE_LIST | FP_DEVICE_FEATURE_STORAGE_DELETE;
|
||||
fake_dev->probe_features_value = FP_DEVICE_FEATURE_STORAGE_LIST;
|
||||
|
||||
g_async_initable_init_async (G_ASYNC_INITABLE (device),
|
||||
G_PRIORITY_DEFAULT, NULL, NULL, NULL);
|
||||
while (g_main_context_iteration (NULL, FALSE))
|
||||
continue;
|
||||
|
||||
g_assert_true (fp_device_has_feature (device, FP_DEVICE_FEATURE_CAPTURE));
|
||||
g_assert_true (fp_device_has_feature (device, FP_DEVICE_FEATURE_IDENTIFY));
|
||||
g_assert_true (fp_device_has_feature (device, FP_DEVICE_FEATURE_VERIFY));
|
||||
g_assert_false (fp_device_has_feature (device, FP_DEVICE_FEATURE_DUPLICATES_CHECK));
|
||||
g_assert_true (fp_device_has_feature (device, FP_DEVICE_FEATURE_STORAGE));
|
||||
g_assert_true (fp_device_has_feature (device, FP_DEVICE_FEATURE_STORAGE_LIST));
|
||||
g_assert_false (fp_device_has_feature (device, FP_DEVICE_FEATURE_STORAGE_DELETE));
|
||||
g_assert_true (fp_device_has_feature (device, FP_DEVICE_FEATURE_STORAGE_CLEAR));
|
||||
|
||||
g_assert_cmpuint (fp_device_get_features (device),
|
||||
==,
|
||||
FP_DEVICE_FEATURE_CAPTURE |
|
||||
FP_DEVICE_FEATURE_IDENTIFY |
|
||||
FP_DEVICE_FEATURE_VERIFY |
|
||||
FP_DEVICE_FEATURE_STORAGE |
|
||||
FP_DEVICE_FEATURE_STORAGE_LIST |
|
||||
FP_DEVICE_FEATURE_STORAGE_CLEAR);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -606,7 +592,12 @@ test_driver_initial_features (void)
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_STORAGE);
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_STORAGE_LIST);
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_STORAGE_DELETE);
|
||||
g_assert_false (dev_class->features & FP_DEVICE_FEATURE_STORAGE_CLEAR);
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_STORAGE_CLEAR);
|
||||
|
||||
g_async_initable_init_async (G_ASYNC_INITABLE (device),
|
||||
G_PRIORITY_DEFAULT, NULL, NULL, NULL);
|
||||
while (g_main_context_iteration (NULL, FALSE))
|
||||
continue;
|
||||
|
||||
g_assert_true (fp_device_has_feature (device, FP_DEVICE_FEATURE_CAPTURE));
|
||||
g_assert_true (fp_device_has_feature (device, FP_DEVICE_FEATURE_IDENTIFY));
|
||||
@@ -615,7 +606,7 @@ test_driver_initial_features (void)
|
||||
g_assert_true (fp_device_has_feature (device, FP_DEVICE_FEATURE_STORAGE));
|
||||
g_assert_true (fp_device_has_feature (device, FP_DEVICE_FEATURE_STORAGE_LIST));
|
||||
g_assert_true (fp_device_has_feature (device, FP_DEVICE_FEATURE_STORAGE_DELETE));
|
||||
g_assert_false (fp_device_has_feature (device, FP_DEVICE_FEATURE_STORAGE_CLEAR));
|
||||
g_assert_true (fp_device_has_feature (device, FP_DEVICE_FEATURE_STORAGE_CLEAR));
|
||||
|
||||
g_assert_cmpuint (fp_device_get_features (device),
|
||||
==,
|
||||
@@ -624,7 +615,8 @@ test_driver_initial_features (void)
|
||||
FP_DEVICE_FEATURE_VERIFY |
|
||||
FP_DEVICE_FEATURE_STORAGE |
|
||||
FP_DEVICE_FEATURE_STORAGE_LIST |
|
||||
FP_DEVICE_FEATURE_STORAGE_DELETE);
|
||||
FP_DEVICE_FEATURE_STORAGE_DELETE |
|
||||
FP_DEVICE_FEATURE_STORAGE_CLEAR);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -637,6 +629,7 @@ test_driver_initial_features_none (void)
|
||||
dev_class->verify = NULL;
|
||||
dev_class->identify = NULL;
|
||||
dev_class->delete = NULL;
|
||||
dev_class->clear_storage = NULL;
|
||||
dev_class->features = FP_DEVICE_FEATURE_NONE;
|
||||
|
||||
fpi_device_class_auto_initialize_features (dev_class);
|
||||
@@ -670,7 +663,7 @@ test_driver_initial_features_no_capture (void)
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_STORAGE);
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_STORAGE_LIST);
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_STORAGE_DELETE);
|
||||
g_assert_false (dev_class->features & FP_DEVICE_FEATURE_STORAGE_CLEAR);
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_STORAGE_CLEAR);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -691,7 +684,7 @@ test_driver_initial_features_no_verify (void)
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_STORAGE);
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_STORAGE_LIST);
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_STORAGE_DELETE);
|
||||
g_assert_false (dev_class->features & FP_DEVICE_FEATURE_STORAGE_CLEAR);
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_STORAGE_CLEAR);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -712,7 +705,7 @@ test_driver_initial_features_no_identify (void)
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_STORAGE);
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_STORAGE_LIST);
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_STORAGE_DELETE);
|
||||
g_assert_false (dev_class->features & FP_DEVICE_FEATURE_STORAGE_CLEAR);
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_STORAGE_CLEAR);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -720,7 +713,6 @@ test_driver_initial_features_no_storage (void)
|
||||
{
|
||||
g_autoptr(FpAutoResetClass) dev_class = auto_reset_device_class ();
|
||||
|
||||
dev_class->list = NULL;
|
||||
dev_class->delete = NULL;
|
||||
dev_class->features = FP_DEVICE_FEATURE_NONE;
|
||||
|
||||
@@ -732,9 +724,9 @@ test_driver_initial_features_no_storage (void)
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_VERIFY);
|
||||
g_assert_false (dev_class->features & FP_DEVICE_FEATURE_DUPLICATES_CHECK);
|
||||
g_assert_false (dev_class->features & FP_DEVICE_FEATURE_STORAGE);
|
||||
g_assert_false (dev_class->features & FP_DEVICE_FEATURE_STORAGE_LIST);
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_STORAGE_LIST);
|
||||
g_assert_false (dev_class->features & FP_DEVICE_FEATURE_STORAGE_DELETE);
|
||||
g_assert_false (dev_class->features & FP_DEVICE_FEATURE_STORAGE_CLEAR);
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_STORAGE_CLEAR);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -755,7 +747,7 @@ test_driver_initial_features_no_list (void)
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_STORAGE);
|
||||
g_assert_false (dev_class->features & FP_DEVICE_FEATURE_STORAGE_LIST);
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_STORAGE_DELETE);
|
||||
g_assert_false (dev_class->features & FP_DEVICE_FEATURE_STORAGE_CLEAR);
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_STORAGE_CLEAR);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -763,7 +755,28 @@ test_driver_initial_features_no_delete (void)
|
||||
{
|
||||
g_autoptr(FpAutoResetClass) dev_class = auto_reset_device_class ();
|
||||
|
||||
dev_class->list = NULL;
|
||||
dev_class->delete = NULL;
|
||||
dev_class->features = FP_DEVICE_FEATURE_NONE;
|
||||
|
||||
fpi_device_class_auto_initialize_features (dev_class);
|
||||
|
||||
g_assert_cmpuint (dev_class->features, !=, FP_DEVICE_FEATURE_NONE);
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_CAPTURE);
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_IDENTIFY);
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_VERIFY);
|
||||
g_assert_false (dev_class->features & FP_DEVICE_FEATURE_DUPLICATES_CHECK);
|
||||
g_assert_false (dev_class->features & FP_DEVICE_FEATURE_STORAGE);
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_STORAGE_LIST);
|
||||
g_assert_false (dev_class->features & FP_DEVICE_FEATURE_STORAGE_DELETE);
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_STORAGE_CLEAR);
|
||||
}
|
||||
|
||||
static void
|
||||
test_driver_initial_features_no_clear (void)
|
||||
{
|
||||
g_autoptr(FpAutoResetClass) dev_class = auto_reset_device_class ();
|
||||
|
||||
dev_class->clear_storage = NULL;
|
||||
dev_class->features = FP_DEVICE_FEATURE_NONE;
|
||||
|
||||
fpi_device_class_auto_initialize_features (dev_class);
|
||||
@@ -774,7 +787,7 @@ test_driver_initial_features_no_delete (void)
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_VERIFY);
|
||||
g_assert_false (dev_class->features & FP_DEVICE_FEATURE_DUPLICATES_CHECK);
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_STORAGE);
|
||||
g_assert_false (dev_class->features & FP_DEVICE_FEATURE_STORAGE_LIST);
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_STORAGE_LIST);
|
||||
g_assert_true (dev_class->features & FP_DEVICE_FEATURE_STORAGE_DELETE);
|
||||
g_assert_false (dev_class->features & FP_DEVICE_FEATURE_STORAGE_CLEAR);
|
||||
}
|
||||
@@ -1235,6 +1248,11 @@ test_driver_match_cb (FpDevice *device,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
fake_device_stub_verify (FpDevice *device)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
test_driver_verify (void)
|
||||
{
|
||||
@@ -1599,6 +1617,28 @@ fake_device_stub_identify (FpDevice *device)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
test_driver_identify_cb (FpDevice *device,
|
||||
GAsyncResult *res,
|
||||
gpointer user_data)
|
||||
{
|
||||
MatchCbData *data = user_data;
|
||||
gboolean r;
|
||||
|
||||
g_assert (data->called == FALSE);
|
||||
data->called = TRUE;
|
||||
|
||||
r = fp_device_identify_finish (device, res, &data->match, &data->print, &data->error);
|
||||
|
||||
if (r)
|
||||
g_assert_no_error (data->error);
|
||||
else
|
||||
g_assert_nonnull (data->error);
|
||||
|
||||
if (data->match)
|
||||
g_assert_no_error (data->error);
|
||||
}
|
||||
|
||||
static void
|
||||
test_driver_supports_identify (void)
|
||||
{
|
||||
@@ -1952,6 +1992,314 @@ test_driver_identify_report_no_callback (void)
|
||||
g_assert_false (match);
|
||||
}
|
||||
|
||||
static void
|
||||
test_driver_identify_suspend_continues (void)
|
||||
{
|
||||
g_autoptr(FpAutoResetClass) dev_class = auto_reset_device_class ();
|
||||
g_autoptr(MatchCbData) match_data = g_new0 (MatchCbData, 1);
|
||||
g_autoptr(MatchCbData) identify_data = g_new0 (MatchCbData, 1);
|
||||
g_autoptr(GPtrArray) prints = NULL;
|
||||
g_autoptr(FpAutoCloseDevice) device = NULL;
|
||||
g_autoptr(GError) error = NULL;
|
||||
void (*orig_identify) (FpDevice *device);
|
||||
FpiDeviceFake *fake_dev;
|
||||
FpPrint *expected_matched;
|
||||
|
||||
device = g_object_new (FPI_TYPE_DEVICE_FAKE, NULL);
|
||||
fake_dev = FPI_DEVICE_FAKE (device);
|
||||
orig_identify = dev_class->identify;
|
||||
dev_class->identify = fake_device_stub_identify;
|
||||
|
||||
prints = make_fake_prints_gallery (device, 500);
|
||||
expected_matched = g_ptr_array_index (prints, g_random_int_range (0, 499));
|
||||
fp_print_set_description (expected_matched, "fake-verified");
|
||||
|
||||
match_data->gallery = prints;
|
||||
|
||||
fake_dev->ret_print = make_fake_print (device, NULL);
|
||||
|
||||
g_assert_true (fp_device_open_sync (device, NULL, NULL));
|
||||
|
||||
fp_device_identify (device, prints, NULL,
|
||||
test_driver_match_cb, match_data, NULL,
|
||||
(GAsyncReadyCallback) test_driver_identify_cb, identify_data);
|
||||
|
||||
while (g_main_context_iteration (NULL, FALSE))
|
||||
continue;
|
||||
|
||||
fake_dev->ret_suspend = NULL;
|
||||
fp_device_suspend_sync (device, NULL, &error);
|
||||
g_assert (fake_dev->last_called_function == dev_class->suspend);
|
||||
g_assert_no_error (error);
|
||||
|
||||
while (g_main_context_iteration (NULL, FALSE))
|
||||
continue;
|
||||
|
||||
g_assert_false (match_data->called);
|
||||
g_assert_false (identify_data->called);
|
||||
|
||||
fake_dev->ret_resume = NULL;
|
||||
fp_device_resume_sync (device, NULL, &error);
|
||||
g_assert (fake_dev->last_called_function == dev_class->resume);
|
||||
g_assert_no_error (error);
|
||||
|
||||
orig_identify (device);
|
||||
|
||||
/* This currently happens immediately (not ABI though) */
|
||||
g_assert_true (match_data->called);
|
||||
g_assert (match_data->match == expected_matched);
|
||||
|
||||
while (g_main_context_iteration (NULL, FALSE))
|
||||
continue;
|
||||
|
||||
g_assert_true (identify_data->called);
|
||||
g_assert (identify_data->match == expected_matched);
|
||||
|
||||
g_assert (fake_dev->last_called_function == orig_identify);
|
||||
}
|
||||
|
||||
static void
|
||||
test_driver_identify_suspend_succeeds (void)
|
||||
{
|
||||
g_autoptr(FpAutoResetClass) dev_class = auto_reset_device_class ();
|
||||
g_autoptr(MatchCbData) match_data = g_new0 (MatchCbData, 1);
|
||||
g_autoptr(MatchCbData) identify_data = g_new0 (MatchCbData, 1);
|
||||
g_autoptr(GPtrArray) prints = NULL;
|
||||
g_autoptr(FpAutoCloseDevice) device = NULL;
|
||||
g_autoptr(GError) error = NULL;
|
||||
void (*orig_identify) (FpDevice *device);
|
||||
FpiDeviceFake *fake_dev;
|
||||
FpPrint *expected_matched;
|
||||
|
||||
device = g_object_new (FPI_TYPE_DEVICE_FAKE, NULL);
|
||||
fake_dev = FPI_DEVICE_FAKE (device);
|
||||
orig_identify = dev_class->identify;
|
||||
dev_class->identify = fake_device_stub_identify;
|
||||
|
||||
prints = make_fake_prints_gallery (device, 500);
|
||||
expected_matched = g_ptr_array_index (prints, g_random_int_range (0, 499));
|
||||
fp_print_set_description (expected_matched, "fake-verified");
|
||||
|
||||
match_data->gallery = prints;
|
||||
|
||||
g_assert_true (fp_device_open_sync (device, NULL, NULL));
|
||||
|
||||
fake_dev->ret_print = make_fake_print (device, NULL);
|
||||
fp_device_identify (device, prints, NULL,
|
||||
test_driver_match_cb, match_data, NULL,
|
||||
(GAsyncReadyCallback) test_driver_identify_cb, identify_data);
|
||||
|
||||
while (g_main_context_iteration (NULL, FALSE))
|
||||
continue;
|
||||
|
||||
/* suspend_sync hangs until cancellation, so we need to trigger orig_identify
|
||||
* from the mainloop after calling suspend_sync.
|
||||
*/
|
||||
fpi_device_add_timeout (device, 0, (FpTimeoutFunc) orig_identify, NULL, NULL);
|
||||
|
||||
fake_dev->ret_suspend = fpi_device_error_new (FP_DEVICE_ERROR_NOT_SUPPORTED);
|
||||
fp_device_suspend_sync (device, NULL, &error);
|
||||
|
||||
/* At this point we are done with everything */
|
||||
g_assert (fake_dev->last_called_function == orig_identify);
|
||||
g_assert_error (error, FP_DEVICE_ERROR, FP_DEVICE_ERROR_NOT_SUPPORTED);
|
||||
g_clear_error (&error);
|
||||
|
||||
/* We suspended, but device reported success and that will be reported. */
|
||||
g_assert_true (match_data->called);
|
||||
g_assert (match_data->match == expected_matched);
|
||||
g_assert_true (identify_data->called);
|
||||
g_assert (identify_data->match == expected_matched);
|
||||
|
||||
/* Resuming the device does not call resume handler, as the action was
|
||||
* cancelled already.
|
||||
*/
|
||||
fake_dev->last_called_function = NULL;
|
||||
fp_device_resume_sync (device, NULL, &error);
|
||||
g_assert (fake_dev->last_called_function == NULL);
|
||||
g_assert_no_error (error);
|
||||
}
|
||||
|
||||
static void
|
||||
test_driver_identify_suspend_busy_error (void)
|
||||
{
|
||||
g_autoptr(FpAutoResetClass) dev_class = auto_reset_device_class ();
|
||||
g_autoptr(MatchCbData) match_data = g_new0 (MatchCbData, 1);
|
||||
g_autoptr(MatchCbData) identify_data = g_new0 (MatchCbData, 1);
|
||||
g_autoptr(GPtrArray) prints = NULL;
|
||||
g_autoptr(FpAutoCloseDevice) device = NULL;
|
||||
g_autoptr(GError) error = NULL;
|
||||
void (*orig_identify) (FpDevice *device);
|
||||
FpiDeviceFake *fake_dev;
|
||||
FpPrint *expected_matched;
|
||||
|
||||
device = g_object_new (FPI_TYPE_DEVICE_FAKE, NULL);
|
||||
fake_dev = FPI_DEVICE_FAKE (device);
|
||||
orig_identify = dev_class->identify;
|
||||
dev_class->identify = fake_device_stub_identify;
|
||||
|
||||
prints = make_fake_prints_gallery (device, 500);
|
||||
expected_matched = g_ptr_array_index (prints, g_random_int_range (0, 499));
|
||||
fp_print_set_description (expected_matched, "fake-verified");
|
||||
|
||||
match_data->gallery = prints;
|
||||
|
||||
g_assert_true (fp_device_open_sync (device, NULL, NULL));
|
||||
|
||||
fake_dev->ret_error = fpi_device_error_new (FP_DEVICE_ERROR_GENERAL);
|
||||
fake_dev->ret_print = make_fake_print (device, NULL);
|
||||
fp_device_identify (device, prints, NULL,
|
||||
test_driver_match_cb, match_data, NULL,
|
||||
(GAsyncReadyCallback) test_driver_identify_cb, identify_data);
|
||||
|
||||
while (g_main_context_iteration (NULL, FALSE))
|
||||
continue;
|
||||
|
||||
/* suspend_sync hangs until cancellation, so we need to trigger orig_identify
|
||||
* from the mainloop after calling suspend_sync.
|
||||
*/
|
||||
fpi_device_add_timeout (device, 0, (FpTimeoutFunc) orig_identify, NULL, NULL);
|
||||
|
||||
fake_dev->ret_suspend = fpi_device_error_new (FP_DEVICE_ERROR_NOT_SUPPORTED);
|
||||
fp_device_suspend_sync (device, NULL, &error);
|
||||
fake_dev->ret_error = NULL;
|
||||
|
||||
/* At this point we are done with everything */
|
||||
g_assert (fake_dev->last_called_function == orig_identify);
|
||||
g_assert_error (error, FP_DEVICE_ERROR, FP_DEVICE_ERROR_NOT_SUPPORTED);
|
||||
g_clear_error (&error);
|
||||
|
||||
/* The device reported an error, an this error will be overwritten.
|
||||
*/
|
||||
g_assert_false (match_data->called);
|
||||
g_assert_true (identify_data->called);
|
||||
g_assert_null (identify_data->match);
|
||||
g_assert_error (identify_data->error, FP_DEVICE_ERROR, FP_DEVICE_ERROR_BUSY);
|
||||
|
||||
fake_dev->last_called_function = NULL;
|
||||
fp_device_resume_sync (device, NULL, &error);
|
||||
g_assert (fake_dev->last_called_function == NULL);
|
||||
g_assert_no_error (error);
|
||||
}
|
||||
|
||||
static void
|
||||
test_driver_identify_suspend_while_idle (void)
|
||||
{
|
||||
g_autoptr(FpAutoResetClass) dev_class = auto_reset_device_class ();
|
||||
g_autoptr(FpAutoCloseDevice) device = NULL;
|
||||
g_autoptr(GError) error = NULL;
|
||||
FpiDeviceFake *fake_dev;
|
||||
|
||||
device = g_object_new (FPI_TYPE_DEVICE_FAKE, NULL);
|
||||
fake_dev = FPI_DEVICE_FAKE (device);
|
||||
|
||||
/* Suspending and resuming a closed device works */
|
||||
fp_device_suspend (device, NULL, (GAsyncReadyCallback) fp_device_suspend_finish, &error);
|
||||
while (g_main_context_iteration (NULL, FALSE))
|
||||
continue;
|
||||
g_assert (fake_dev->last_called_function == NULL);
|
||||
g_assert_no_error (error);
|
||||
|
||||
fp_device_resume (device, NULL, (GAsyncReadyCallback) fp_device_resume_finish, NULL);
|
||||
while (g_main_context_iteration (NULL, FALSE))
|
||||
continue;
|
||||
g_assert (fake_dev->last_called_function == NULL);
|
||||
g_assert_no_error (error);
|
||||
|
||||
g_assert_true (fp_device_open_sync (device, NULL, NULL));
|
||||
|
||||
fake_dev->last_called_function = NULL;
|
||||
fp_device_suspend (device, NULL, (GAsyncReadyCallback) fp_device_suspend_finish, &error);
|
||||
while (g_main_context_iteration (NULL, FALSE))
|
||||
continue;
|
||||
g_assert (fake_dev->last_called_function == NULL);
|
||||
g_assert_no_error (error);
|
||||
|
||||
fp_device_resume (device, NULL, (GAsyncReadyCallback) fp_device_resume_finish, NULL);
|
||||
while (g_main_context_iteration (NULL, FALSE))
|
||||
continue;
|
||||
g_assert (fake_dev->last_called_function == NULL);
|
||||
g_assert_no_error (error);
|
||||
}
|
||||
|
||||
static void
|
||||
test_driver_identify_warmup_cooldown (void)
|
||||
{
|
||||
g_autoptr(FpAutoResetClass) dev_class = auto_reset_device_class ();
|
||||
g_autoptr(MatchCbData) identify_data = g_new0 (MatchCbData, 1);
|
||||
g_autoptr(GPtrArray) prints = NULL;
|
||||
g_autoptr(FpAutoCloseDevice) device = NULL;
|
||||
g_autoptr(GError) error = NULL;
|
||||
void (*orig_identify) (FpDevice *device);
|
||||
FpiDeviceFake *fake_dev;
|
||||
gint64 start_time;
|
||||
|
||||
dev_class->temp_hot_seconds = 2;
|
||||
dev_class->temp_cold_seconds = 5;
|
||||
|
||||
device = g_object_new (FPI_TYPE_DEVICE_FAKE, NULL);
|
||||
fake_dev = FPI_DEVICE_FAKE (device);
|
||||
orig_identify = dev_class->identify;
|
||||
dev_class->identify = fake_device_stub_identify;
|
||||
|
||||
prints = make_fake_prints_gallery (device, 500);
|
||||
|
||||
g_assert_true (fp_device_open_sync (device, NULL, NULL));
|
||||
fake_dev->last_called_function = NULL;
|
||||
|
||||
fake_dev->ret_error = fpi_device_error_new (FP_DEVICE_ERROR_GENERAL);
|
||||
|
||||
/* Undefined: Whether match_cb is called. */
|
||||
fp_device_identify (device, prints, NULL,
|
||||
NULL, NULL, NULL,
|
||||
(GAsyncReadyCallback) test_driver_identify_cb, identify_data);
|
||||
|
||||
/* Identify is running, the temperature will change after only a short time.
|
||||
* Changes are delayed by 100ms and we give 150ms of slack for the test.
|
||||
*/
|
||||
start_time = g_get_monotonic_time ();
|
||||
g_assert_cmpint (fp_device_get_temperature (device), ==, FP_TEMPERATURE_COLD);
|
||||
while (fp_device_get_temperature (device) == FP_TEMPERATURE_COLD)
|
||||
g_main_context_iteration (NULL, TRUE);
|
||||
g_assert_cmpint (fp_device_get_temperature (device), ==, FP_TEMPERATURE_WARM);
|
||||
g_assert_false (g_cancellable_is_cancelled (fpi_device_get_cancellable (device)));
|
||||
g_assert_cmpint (g_get_monotonic_time () - start_time, <, 0 + 250000);
|
||||
|
||||
/* we reach hot 2 seconds later */
|
||||
while (fp_device_get_temperature (device) == FP_TEMPERATURE_WARM)
|
||||
g_main_context_iteration (NULL, TRUE);
|
||||
g_assert_cmpint (fp_device_get_temperature (device), ==, FP_TEMPERATURE_HOT);
|
||||
g_assert_true (g_cancellable_is_cancelled (fpi_device_get_cancellable (device)));
|
||||
g_assert_cmpint (g_get_monotonic_time () - start_time, <, 2000000 + 250000);
|
||||
|
||||
/* cancel vfunc will be called now */
|
||||
g_assert (fake_dev->last_called_function == NULL);
|
||||
while (g_main_context_iteration (NULL, FALSE))
|
||||
continue;
|
||||
g_assert (fake_dev->last_called_function == dev_class->cancel);
|
||||
|
||||
orig_identify (device);
|
||||
fake_dev->ret_error = NULL;
|
||||
while (g_main_context_iteration (NULL, FALSE))
|
||||
continue;
|
||||
g_assert_true (identify_data->called);
|
||||
g_assert_error (identify_data->error, FP_DEVICE_ERROR, FP_DEVICE_ERROR_TOO_HOT);
|
||||
|
||||
/* Now, wait for it to cool down again;
|
||||
* WARM should be reached after about 2s
|
||||
* COLD after 5s but give it some more slack. */
|
||||
start_time = g_get_monotonic_time ();
|
||||
while (fp_device_get_temperature (device) == FP_TEMPERATURE_HOT)
|
||||
g_main_context_iteration (NULL, TRUE);
|
||||
g_assert_cmpint (fp_device_get_temperature (device), ==, FP_TEMPERATURE_WARM);
|
||||
g_assert_cmpint (g_get_monotonic_time () - start_time, <, 2000000 + 250000);
|
||||
|
||||
while (fp_device_get_temperature (device) == FP_TEMPERATURE_WARM)
|
||||
g_main_context_iteration (NULL, TRUE);
|
||||
g_assert_cmpint (fp_device_get_temperature (device), ==, FP_TEMPERATURE_COLD);
|
||||
g_assert_cmpint (g_get_monotonic_time () - start_time, <, 5000000 + 500000);
|
||||
}
|
||||
|
||||
static void
|
||||
fake_device_stub_capture (FpDevice *device)
|
||||
{
|
||||
@@ -2175,6 +2523,39 @@ test_driver_delete_error (void)
|
||||
g_assert_false (ret);
|
||||
}
|
||||
|
||||
static void
|
||||
test_driver_clear_storage (void)
|
||||
{
|
||||
g_autoptr(GError) error = NULL;
|
||||
g_autoptr(FpAutoCloseDevice) device = auto_close_fake_device_new ();
|
||||
FpDeviceClass *dev_class = FP_DEVICE_GET_CLASS (device);
|
||||
FpiDeviceFake *fake_dev = FPI_DEVICE_FAKE (device);
|
||||
gboolean ret;
|
||||
|
||||
ret = fp_device_clear_storage_sync (device, NULL, &error);
|
||||
g_assert (fake_dev->last_called_function == dev_class->clear_storage);
|
||||
g_assert_no_error (error);
|
||||
g_assert_true (ret);
|
||||
}
|
||||
|
||||
static void
|
||||
test_driver_clear_storage_error (void)
|
||||
{
|
||||
g_autoptr(GError) error = NULL;
|
||||
g_autoptr(FpAutoCloseDevice) device = auto_close_fake_device_new ();
|
||||
FpDeviceClass *dev_class = FP_DEVICE_GET_CLASS (device);
|
||||
FpiDeviceFake *fake_dev = FPI_DEVICE_FAKE (device);
|
||||
gboolean ret;
|
||||
|
||||
fake_dev->ret_error = fpi_device_error_new (FP_DEVICE_ERROR_GENERAL);
|
||||
ret = fp_device_clear_storage_sync (device, NULL, &error);
|
||||
g_assert (fake_dev->last_called_function == dev_class->clear_storage);
|
||||
g_assert_error (error, FP_DEVICE_ERROR, FP_DEVICE_ERROR_GENERAL);
|
||||
g_assert (error == g_steal_pointer (&fake_dev->ret_error));
|
||||
|
||||
g_assert_false (ret);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
fake_device_delete_wait_for_cancel_timeout (gpointer data)
|
||||
{
|
||||
@@ -2262,6 +2643,89 @@ test_driver_cancel_fail (void)
|
||||
g_assert_no_error (error);
|
||||
}
|
||||
|
||||
static void
|
||||
test_driver_critical (void)
|
||||
{
|
||||
g_autoptr(FpAutoCloseDevice) device = auto_close_fake_device_new ();
|
||||
g_autoptr(GCancellable) cancellable = g_cancellable_new ();
|
||||
g_autoptr(FpPrint) enrolled_print = make_fake_print_reffed (device, NULL);
|
||||
g_autoptr(FpAutoResetClass) dev_class = auto_reset_device_class ();
|
||||
void (*orig_verify) (FpDevice *device) = dev_class->verify;
|
||||
FpiDeviceFake *fake_dev = FPI_DEVICE_FAKE (device);
|
||||
|
||||
fake_dev->last_called_function = NULL;
|
||||
|
||||
dev_class->verify = fake_device_stub_verify;
|
||||
fp_device_verify (device, enrolled_print, cancellable,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL);
|
||||
|
||||
/* We started a verify operation, now emulate a "critical" section */
|
||||
fpi_device_critical_enter (device);
|
||||
|
||||
/* Throw a suspend and external cancellation against it. */
|
||||
fp_device_suspend (device, NULL, NULL, NULL);
|
||||
g_cancellable_cancel (cancellable);
|
||||
|
||||
/* The only thing that happens is that the cancellable is cancelled */
|
||||
g_assert_true (fpi_device_action_is_cancelled (device));
|
||||
g_assert (fake_dev->last_called_function == NULL);
|
||||
while (g_main_context_iteration (NULL, FALSE))
|
||||
continue;
|
||||
g_assert (fake_dev->last_called_function == NULL);
|
||||
|
||||
/* Leaving and entering the critical section in the same mainloop iteration
|
||||
* does not do anything. */
|
||||
fpi_device_critical_leave (device);
|
||||
fpi_device_critical_enter (device);
|
||||
while (g_main_context_iteration (NULL, FALSE))
|
||||
continue;
|
||||
g_assert (fake_dev->last_called_function == NULL);
|
||||
|
||||
/* Leaving it and running the mainloop will first run the cancel handler */
|
||||
fpi_device_critical_leave (device);
|
||||
while (g_main_context_iteration (NULL, FALSE) && !fake_dev->last_called_function)
|
||||
continue;
|
||||
g_assert (fake_dev->last_called_function == dev_class->cancel);
|
||||
g_assert_true (fpi_device_action_is_cancelled (device));
|
||||
fake_dev->last_called_function = NULL;
|
||||
|
||||
/* Then the suspend handler */
|
||||
while (g_main_context_iteration (NULL, FALSE) && !fake_dev->last_called_function)
|
||||
continue;
|
||||
g_assert (fake_dev->last_called_function == dev_class->suspend);
|
||||
fake_dev->last_called_function = NULL;
|
||||
|
||||
/* Nothing happens afterwards */
|
||||
while (g_main_context_iteration (NULL, FALSE))
|
||||
continue;
|
||||
g_assert (fake_dev->last_called_function == NULL);
|
||||
|
||||
|
||||
/* Throw a resume at the system */
|
||||
fpi_device_critical_enter (device);
|
||||
fp_device_resume (device, NULL, NULL, NULL);
|
||||
|
||||
/* Nothing will happen, as the resume is delayed */
|
||||
while (g_main_context_iteration (NULL, FALSE))
|
||||
continue;
|
||||
g_assert (fake_dev->last_called_function == NULL);
|
||||
|
||||
/* Finally the resume is called from the mainloop after leaving the critical section */
|
||||
fpi_device_critical_leave (device);
|
||||
g_assert (fake_dev->last_called_function == NULL);
|
||||
while (g_main_context_iteration (NULL, FALSE) && !fake_dev->last_called_function)
|
||||
continue;
|
||||
g_assert (fake_dev->last_called_function == dev_class->resume);
|
||||
fake_dev->last_called_function = NULL;
|
||||
|
||||
|
||||
/* The "verify" operation is still ongoing, finish it. */
|
||||
orig_verify (device);
|
||||
while (g_main_context_iteration (NULL, FALSE))
|
||||
continue;
|
||||
}
|
||||
|
||||
static void
|
||||
test_driver_current_action (void)
|
||||
{
|
||||
@@ -2328,32 +2792,32 @@ test_driver_action_get_cancellable_open (void)
|
||||
}
|
||||
|
||||
static void
|
||||
test_driver_action_get_cancellable_open_fail_vfunc (FpDevice *device)
|
||||
test_driver_action_get_cancellable_open_internal_vfunc (FpDevice *device)
|
||||
{
|
||||
FpiDeviceFake *fake_dev = FPI_DEVICE_FAKE (device);
|
||||
|
||||
g_assert_cmpuint (fpi_device_get_current_action (device), ==, FPI_DEVICE_ACTION_OPEN);
|
||||
fake_dev->last_called_function = test_driver_action_get_cancellable_open_fail_vfunc;
|
||||
fake_dev->last_called_function = test_driver_action_get_cancellable_open_internal_vfunc;
|
||||
|
||||
g_assert_false (G_IS_CANCELLABLE (fpi_device_get_cancellable (device)));
|
||||
g_assert_true (G_IS_CANCELLABLE (fpi_device_get_cancellable (device)));
|
||||
|
||||
fpi_device_open_complete (device, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
test_driver_action_get_cancellable_open_fail (void)
|
||||
test_driver_action_get_cancellable_open_internal (void)
|
||||
{
|
||||
g_autoptr(FpAutoResetClass) dev_class = auto_reset_device_class ();
|
||||
g_autoptr(FpAutoCloseDevice) device = NULL;
|
||||
FpiDeviceFake *fake_dev;
|
||||
|
||||
dev_class->open = test_driver_action_get_cancellable_open_fail_vfunc;
|
||||
dev_class->open = test_driver_action_get_cancellable_open_internal_vfunc;
|
||||
device = g_object_new (FPI_TYPE_DEVICE_FAKE, NULL);
|
||||
fake_dev = FPI_DEVICE_FAKE (device);
|
||||
|
||||
g_assert_true (fp_device_open_sync (device, NULL, NULL));
|
||||
|
||||
g_assert (fake_dev->last_called_function == test_driver_action_get_cancellable_open_fail_vfunc);
|
||||
g_assert (fake_dev->last_called_function == test_driver_action_get_cancellable_open_internal_vfunc);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2378,7 +2842,11 @@ test_driver_action_is_cancelled_open_vfunc (FpDevice *device)
|
||||
g_assert_true (G_IS_CANCELLABLE (fpi_device_get_cancellable (device)));
|
||||
g_assert_false (fpi_device_action_is_cancelled (device));
|
||||
|
||||
g_cancellable_cancel (fpi_device_get_cancellable (device));
|
||||
if (fake_dev->ext_cancellable)
|
||||
g_cancellable_cancel (fake_dev->ext_cancellable);
|
||||
else
|
||||
g_cancellable_cancel (fpi_device_get_cancellable (device));
|
||||
|
||||
g_assert_true (fpi_device_action_is_cancelled (device));
|
||||
|
||||
fpi_device_open_complete (device, NULL);
|
||||
@@ -2397,13 +2865,34 @@ test_driver_action_is_cancelled_open (void)
|
||||
device = g_object_new (FPI_TYPE_DEVICE_FAKE, NULL);
|
||||
fake_dev = FPI_DEVICE_FAKE (device);
|
||||
|
||||
cancellable = g_cancellable_new ();
|
||||
cancellable = fake_dev->ext_cancellable = g_cancellable_new ();
|
||||
g_assert_false (fp_device_open_sync (device, cancellable, &error));
|
||||
g_assert_error (error, G_IO_ERROR, G_IO_ERROR_CANCELLED);
|
||||
|
||||
g_assert (fake_dev->last_called_function == test_driver_action_is_cancelled_open_vfunc);
|
||||
}
|
||||
|
||||
static void
|
||||
test_driver_action_internally_cancelled_open (void)
|
||||
{
|
||||
g_autoptr(FpAutoResetClass) dev_class = auto_reset_device_class ();
|
||||
g_autoptr(FpAutoCloseDevice) device = NULL;
|
||||
g_autoptr(GCancellable) cancellable = NULL;
|
||||
g_autoptr(GError) error = NULL;
|
||||
FpiDeviceFake *fake_dev;
|
||||
|
||||
dev_class->open = test_driver_action_is_cancelled_open_vfunc;
|
||||
device = g_object_new (FPI_TYPE_DEVICE_FAKE, NULL);
|
||||
fake_dev = FPI_DEVICE_FAKE (device);
|
||||
|
||||
/* No error, just some internal cancellation but we let nothing happen externally. */
|
||||
cancellable = g_cancellable_new ();
|
||||
g_assert_true (fp_device_open_sync (device, cancellable, &error));
|
||||
g_assert_null (error);
|
||||
|
||||
g_assert (fake_dev->last_called_function == test_driver_action_is_cancelled_open_vfunc);
|
||||
}
|
||||
|
||||
static void
|
||||
test_driver_action_is_cancelled_error (void)
|
||||
{
|
||||
@@ -2541,6 +3030,12 @@ test_driver_action_error_all (void)
|
||||
g_assert_error (error, FP_DEVICE_ERROR, FP_DEVICE_ERROR_DATA_INVALID);
|
||||
g_clear_error (&error);
|
||||
|
||||
fake_dev->ret_error = fpi_device_error_new (FP_DEVICE_ERROR_DATA_INVALID);
|
||||
g_assert_false (fp_device_clear_storage_sync (device, NULL, &error));
|
||||
g_assert_true (fake_dev->last_called_function == dev_class->clear_storage);
|
||||
g_assert_error (error, FP_DEVICE_ERROR, FP_DEVICE_ERROR_DATA_INVALID);
|
||||
g_clear_error (&error);
|
||||
|
||||
/* Test close last, as we can't operate on a closed device. */
|
||||
fake_dev->ret_error = fpi_device_error_new (FP_DEVICE_ERROR_DATA_INVALID);
|
||||
g_assert_false (fp_device_close_sync (device, NULL, &error));
|
||||
@@ -2640,6 +3135,16 @@ test_driver_action_error_fallback_all (void)
|
||||
g_assert_error (error, FP_DEVICE_ERROR, FP_DEVICE_ERROR_GENERAL);
|
||||
g_clear_error (&error);
|
||||
|
||||
g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING,
|
||||
"*Device failed to pass an error to generic action "
|
||||
"error function*");
|
||||
|
||||
g_assert_false (fp_device_clear_storage_sync (device, NULL, &error));
|
||||
g_test_assert_expected_messages ();
|
||||
g_assert_true (fake_dev->last_called_function == dev_class->clear_storage);
|
||||
g_assert_error (error, FP_DEVICE_ERROR, FP_DEVICE_ERROR_GENERAL);
|
||||
g_clear_error (&error);
|
||||
|
||||
/* Test close last, as we can't operate on a closed device. */
|
||||
g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING,
|
||||
"*Device failed to pass an error to generic action "
|
||||
@@ -2802,7 +3307,7 @@ main (int argc, char *argv[])
|
||||
g_test_add_func ("/driver/get_usb_device", test_driver_get_usb_device);
|
||||
g_test_add_func ("/driver/get_virtual_env", test_driver_get_virtual_env);
|
||||
g_test_add_func ("/driver/get_driver_data", test_driver_get_driver_data);
|
||||
g_test_add_func ("/driver/features", test_driver_features);
|
||||
g_test_add_func ("/driver/features/probe_updates", test_driver_features_probe_updates);
|
||||
g_test_add_func ("/driver/initial_features", test_driver_initial_features);
|
||||
g_test_add_func ("/driver/initial_features/none", test_driver_initial_features_none);
|
||||
g_test_add_func ("/driver/initial_features/no_capture", test_driver_initial_features_no_capture);
|
||||
@@ -2811,6 +3316,8 @@ main (int argc, char *argv[])
|
||||
g_test_add_func ("/driver/initial_features/no_storage", test_driver_initial_features_no_storage);
|
||||
g_test_add_func ("/driver/initial_features/no_list", test_driver_initial_features_no_list);
|
||||
g_test_add_func ("/driver/initial_features/no_delete", test_driver_initial_features_no_delete);
|
||||
g_test_add_func ("/driver/initial_features/no_clear", test_driver_initial_features_no_clear);
|
||||
|
||||
|
||||
g_test_add_func ("/driver/probe", test_driver_probe);
|
||||
g_test_add_func ("/driver/probe/error", test_driver_probe_error);
|
||||
@@ -2838,6 +3345,14 @@ main (int argc, char *argv[])
|
||||
g_test_add_func ("/driver/identify/not_reported", test_driver_identify_not_reported);
|
||||
g_test_add_func ("/driver/identify/complete_retry", test_driver_identify_complete_retry);
|
||||
g_test_add_func ("/driver/identify/report_no_cb", test_driver_identify_report_no_callback);
|
||||
|
||||
g_test_add_func ("/driver/identify/suspend_continues", test_driver_identify_suspend_continues);
|
||||
g_test_add_func ("/driver/identify/suspend_succeeds", test_driver_identify_suspend_succeeds);
|
||||
g_test_add_func ("/driver/identify/suspend_busy_error", test_driver_identify_suspend_busy_error);
|
||||
g_test_add_func ("/driver/identify/suspend_while_idle", test_driver_identify_suspend_while_idle);
|
||||
|
||||
g_test_add_func ("/driver/identify/warmup_cooldown", test_driver_identify_warmup_cooldown);
|
||||
|
||||
g_test_add_func ("/driver/capture", test_driver_capture);
|
||||
g_test_add_func ("/driver/capture/not_supported", test_driver_capture_not_supported);
|
||||
g_test_add_func ("/driver/capture/error", test_driver_capture_error);
|
||||
@@ -2846,15 +3361,20 @@ main (int argc, char *argv[])
|
||||
g_test_add_func ("/driver/list/no_storage", test_driver_list_no_storage);
|
||||
g_test_add_func ("/driver/delete", test_driver_delete);
|
||||
g_test_add_func ("/driver/delete/error", test_driver_delete_error);
|
||||
g_test_add_func ("/driver/clear_storage", test_driver_clear_storage);
|
||||
g_test_add_func ("/driver/clear_storage/error", test_driver_clear_storage_error);
|
||||
g_test_add_func ("/driver/cancel", test_driver_cancel);
|
||||
g_test_add_func ("/driver/cancel/fail", test_driver_cancel_fail);
|
||||
|
||||
g_test_add_func ("/driver/critical", test_driver_critical);
|
||||
|
||||
g_test_add_func ("/driver/get_current_action", test_driver_current_action);
|
||||
g_test_add_func ("/driver/get_current_action/open", test_driver_current_action_open);
|
||||
g_test_add_func ("/driver/get_cancellable/error", test_driver_action_get_cancellable_error);
|
||||
g_test_add_func ("/driver/get_cancellable/open", test_driver_action_get_cancellable_open);
|
||||
g_test_add_func ("/driver/get_cancellable/open/fail", test_driver_action_get_cancellable_open_fail);
|
||||
g_test_add_func ("/driver/get_cancellable/open/internal", test_driver_action_get_cancellable_open_internal);
|
||||
g_test_add_func ("/driver/action_is_cancelled/open", test_driver_action_is_cancelled_open);
|
||||
g_test_add_func ("/driver/action_is_cancelled/open/internal", test_driver_action_internally_cancelled_open);
|
||||
g_test_add_func ("/driver/action_is_cancelled/error", test_driver_action_is_cancelled_error);
|
||||
g_test_add_func ("/driver/complete_action/all/error", test_driver_complete_actions_errors);
|
||||
g_test_add_func ("/driver/action_error/error", test_driver_action_error_error);
|
||||
|
||||
+106
-144
@@ -129,12 +129,12 @@ test_ssm_completed_callback (FpiSsm *ssm,
|
||||
}
|
||||
|
||||
static FpiSsm *
|
||||
ssm_test_new_full (int nr_states, const char *name)
|
||||
ssm_test_new_full (int nr_states, int cleanup_state, const char *name)
|
||||
{
|
||||
FpiSsm *ssm;
|
||||
FpiSsmTestData *data;
|
||||
|
||||
ssm = fpi_ssm_new_full (fake_device, test_ssm_handler, nr_states, name);
|
||||
ssm = fpi_ssm_new_full (fake_device, test_ssm_handler, nr_states, cleanup_state, name);
|
||||
data = fpi_ssm_test_data_new ();
|
||||
data->expected_last_state = nr_states;
|
||||
fpi_ssm_set_data (ssm, data, (GDestroyNotify) fpi_ssm_test_data_unref_by_ssm);
|
||||
@@ -145,7 +145,7 @@ ssm_test_new_full (int nr_states, const char *name)
|
||||
static FpiSsm *
|
||||
ssm_test_new (void)
|
||||
{
|
||||
return ssm_test_new_full (FPI_TEST_SSM_STATE_NUM, "FPI_TEST_SSM");
|
||||
return ssm_test_new_full (FPI_TEST_SSM_STATE_NUM, FPI_TEST_SSM_STATE_NUM, "FPI_TEST_SSM");
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -158,14 +158,6 @@ test_ssm_cancel_delayed_action_delayed (gpointer data)
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
test_ssm_cancel_cancellable_delayed (gpointer data)
|
||||
{
|
||||
g_cancellable_cancel (G_CANCELLABLE (data));
|
||||
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
/* Tests */
|
||||
|
||||
static void
|
||||
@@ -188,7 +180,8 @@ test_ssm_new_full (void)
|
||||
FpiSsm *ssm;
|
||||
|
||||
ssm = fpi_ssm_new_full (fake_device, test_ssm_handler,
|
||||
FPI_TEST_SSM_STATE_NUM, "Test SSM Name");
|
||||
FPI_TEST_SSM_STATE_NUM, FPI_TEST_SSM_STATE_NUM,
|
||||
"Test SSM Name");
|
||||
|
||||
g_assert_null (fpi_ssm_get_data (ssm));
|
||||
g_assert_no_error (fpi_ssm_get_error (ssm));
|
||||
@@ -215,6 +208,8 @@ test_ssm_new_wrong_states (void)
|
||||
|
||||
g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL,
|
||||
"*BUG:*nr_states*");
|
||||
g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL,
|
||||
"*BUG:*start_cleanup*");
|
||||
ssm = fpi_ssm_new (fake_device, test_ssm_handler, -1);
|
||||
g_test_assert_expected_messages ();
|
||||
}
|
||||
@@ -271,7 +266,7 @@ test_ssm_start_single (void)
|
||||
g_autoptr(FpiSsmTestData) data = NULL;
|
||||
FpiSsm *ssm;
|
||||
|
||||
ssm = ssm_test_new_full (1, "FPI_TEST_SSM_SINGLE_STATE");
|
||||
ssm = ssm_test_new_full (1, 1, "FPI_TEST_SSM_SINGLE_STATE");
|
||||
data = fpi_ssm_test_data_ref (fpi_ssm_get_data (ssm));
|
||||
|
||||
fpi_ssm_start (ssm, test_ssm_completed_callback);
|
||||
@@ -336,7 +331,7 @@ test_ssm_next_with_delayed (void)
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 1);
|
||||
|
||||
fpi_ssm_next_state_delayed (ssm, 10, NULL);
|
||||
fpi_ssm_next_state_delayed (ssm, 10);
|
||||
|
||||
g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, "*BUG:*timeout*");
|
||||
fpi_ssm_next_state (ssm);
|
||||
@@ -444,7 +439,7 @@ test_ssm_jump_to_state_with_delayed (void)
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 1);
|
||||
|
||||
fpi_ssm_jump_to_state_delayed (ssm, FPI_TEST_SSM_STATE_2, 10, NULL);
|
||||
fpi_ssm_jump_to_state_delayed (ssm, FPI_TEST_SSM_STATE_2, 10);
|
||||
|
||||
g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, "*BUG:*timeout*");
|
||||
fpi_ssm_jump_to_state (ssm, FPI_TEST_SSM_STATE_2);
|
||||
@@ -561,7 +556,7 @@ test_ssm_mark_completed_with_delayed (void)
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 1);
|
||||
|
||||
data->expected_last_state = FPI_TEST_SSM_STATE_0;
|
||||
fpi_ssm_mark_completed_delayed (ssm, 10, NULL);
|
||||
fpi_ssm_mark_completed_delayed (ssm, 10);
|
||||
|
||||
g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, "*BUG:*timeout*");
|
||||
fpi_ssm_mark_completed (g_steal_pointer (&ssm));
|
||||
@@ -623,7 +618,7 @@ test_ssm_mark_failed_with_delayed (void)
|
||||
fpi_ssm_start (ssm, test_ssm_completed_callback);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 1);
|
||||
|
||||
fpi_ssm_mark_completed_delayed (ssm, 10, NULL);
|
||||
fpi_ssm_mark_completed_delayed (ssm, 10);
|
||||
|
||||
g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, "*BUG:*timeout*");
|
||||
data->expected_last_state = FPI_TEST_SSM_STATE_0;
|
||||
@@ -654,7 +649,7 @@ test_ssm_delayed_next (void)
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 1);
|
||||
|
||||
fpi_ssm_next_state_delayed (ssm, 10, NULL);
|
||||
fpi_ssm_next_state_delayed (ssm, 10);
|
||||
g_assert_cmpint (data->handler_state, ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 1);
|
||||
@@ -682,7 +677,7 @@ test_ssm_delayed_next_cancel (void)
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 1);
|
||||
|
||||
fpi_ssm_next_state_delayed (ssm, 10, NULL);
|
||||
fpi_ssm_next_state_delayed (ssm, 10);
|
||||
g_assert_cmpint (data->handler_state, ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 1);
|
||||
@@ -701,40 +696,6 @@ test_ssm_delayed_next_cancel (void)
|
||||
g_assert_no_error (data->error);
|
||||
}
|
||||
|
||||
static void
|
||||
test_ssm_delayed_next_cancellable (void)
|
||||
{
|
||||
g_autoptr(FpiSsm) ssm = ssm_test_new ();
|
||||
g_autoptr(GCancellable) cancellable = g_cancellable_new ();
|
||||
FpiSsmTestData *data = fpi_ssm_get_data (ssm);
|
||||
|
||||
fpi_ssm_start (ssm, test_ssm_completed_callback);
|
||||
g_assert_cmpint (data->handler_state, ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 1);
|
||||
|
||||
fpi_ssm_next_state_delayed (ssm, 10, cancellable);
|
||||
g_assert_cmpint (data->handler_state, ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 1);
|
||||
|
||||
g_idle_add_full (G_PRIORITY_HIGH, test_ssm_cancel_cancellable_delayed, cancellable, NULL);
|
||||
|
||||
while (!g_cancellable_is_cancelled (cancellable))
|
||||
g_main_context_iteration (NULL, TRUE);
|
||||
|
||||
g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, "*BUG:*timeout*");
|
||||
fpi_ssm_cancel_delayed_state_change (ssm);
|
||||
g_test_assert_expected_messages ();
|
||||
|
||||
g_assert_cmpint (data->handler_state, ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 1);
|
||||
|
||||
g_assert_false (data->completed);
|
||||
g_assert_no_error (data->error);
|
||||
}
|
||||
|
||||
static void
|
||||
test_ssm_delayed_next_not_started (void)
|
||||
{
|
||||
@@ -742,7 +703,7 @@ test_ssm_delayed_next_not_started (void)
|
||||
FpiSsmTestData *data = fpi_ssm_get_data (ssm);
|
||||
|
||||
g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, "*BUG:*completed*");
|
||||
fpi_ssm_next_state_delayed (ssm, 10, NULL);
|
||||
fpi_ssm_next_state_delayed (ssm, 10);
|
||||
g_test_assert_expected_messages ();
|
||||
|
||||
g_assert_cmpint (data->handler_state, ==, -1);
|
||||
@@ -773,7 +734,7 @@ test_ssm_delayed_next_complete (void)
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 1);
|
||||
|
||||
fpi_ssm_next_state_delayed (ssm, 10, NULL);
|
||||
fpi_ssm_next_state_delayed (ssm, 10);
|
||||
g_assert_cmpint (data->handler_state, ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 1);
|
||||
@@ -785,7 +746,7 @@ test_ssm_delayed_next_complete (void)
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_1);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 2);
|
||||
|
||||
fpi_ssm_next_state_delayed (ssm, 10, NULL);
|
||||
fpi_ssm_next_state_delayed (ssm, 10);
|
||||
g_assert_cmpint (data->handler_state, ==, FPI_TEST_SSM_STATE_1);
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_1);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 2);
|
||||
@@ -797,7 +758,7 @@ test_ssm_delayed_next_complete (void)
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_2);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 3);
|
||||
|
||||
fpi_ssm_next_state_delayed (ssm, 10, NULL);
|
||||
fpi_ssm_next_state_delayed (ssm, 10);
|
||||
g_assert_cmpint (data->handler_state, ==, FPI_TEST_SSM_STATE_2);
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_2);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 3);
|
||||
@@ -809,7 +770,7 @@ test_ssm_delayed_next_complete (void)
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_3);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 4);
|
||||
|
||||
fpi_ssm_next_state_delayed (ssm, 10, NULL);
|
||||
fpi_ssm_next_state_delayed (ssm, 10);
|
||||
g_assert_cmpint (data->handler_state, ==, FPI_TEST_SSM_STATE_3);
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_3);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 4);
|
||||
@@ -835,7 +796,7 @@ test_ssm_delayed_jump_to_state (void)
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 1);
|
||||
|
||||
fpi_ssm_jump_to_state_delayed (ssm, FPI_TEST_SSM_STATE_2, 10, NULL);
|
||||
fpi_ssm_jump_to_state_delayed (ssm, FPI_TEST_SSM_STATE_2, 10);
|
||||
|
||||
g_assert_cmpint (data->handler_state, ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_0);
|
||||
@@ -848,7 +809,7 @@ test_ssm_delayed_jump_to_state (void)
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_2);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 2);
|
||||
|
||||
fpi_ssm_jump_to_state_delayed (ssm, FPI_TEST_SSM_STATE_1, 10, NULL);
|
||||
fpi_ssm_jump_to_state_delayed (ssm, FPI_TEST_SSM_STATE_1, 10);
|
||||
|
||||
g_assert_cmpint (data->handler_state, ==, FPI_TEST_SSM_STATE_2);
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_2);
|
||||
@@ -877,7 +838,7 @@ test_ssm_delayed_jump_to_state_cancel (void)
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 1);
|
||||
|
||||
fpi_ssm_jump_to_state_delayed (ssm, FPI_TEST_SSM_STATE_2, 10, NULL);
|
||||
fpi_ssm_jump_to_state_delayed (ssm, FPI_TEST_SSM_STATE_2, 10);
|
||||
g_assert_cmpint (data->handler_state, ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 1);
|
||||
@@ -896,40 +857,6 @@ test_ssm_delayed_jump_to_state_cancel (void)
|
||||
g_assert_no_error (data->error);
|
||||
}
|
||||
|
||||
static void
|
||||
test_ssm_delayed_jump_to_state_cancellable (void)
|
||||
{
|
||||
g_autoptr(FpiSsm) ssm = ssm_test_new ();
|
||||
g_autoptr(GCancellable) cancellable = g_cancellable_new ();
|
||||
FpiSsmTestData *data = fpi_ssm_get_data (ssm);
|
||||
|
||||
fpi_ssm_start (ssm, test_ssm_completed_callback);
|
||||
g_assert_cmpint (data->handler_state, ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 1);
|
||||
|
||||
fpi_ssm_jump_to_state_delayed (ssm, FPI_TEST_SSM_STATE_2, 10, cancellable);
|
||||
g_assert_cmpint (data->handler_state, ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 1);
|
||||
|
||||
g_idle_add_full (G_PRIORITY_HIGH, test_ssm_cancel_cancellable_delayed, cancellable, NULL);
|
||||
|
||||
while (!g_cancellable_is_cancelled (cancellable))
|
||||
g_main_context_iteration (NULL, TRUE);
|
||||
|
||||
g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, "*BUG:*timeout*");
|
||||
fpi_ssm_cancel_delayed_state_change (ssm);
|
||||
g_test_assert_expected_messages ();
|
||||
|
||||
g_assert_cmpint (data->handler_state, ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 1);
|
||||
|
||||
g_assert_false (data->completed);
|
||||
g_assert_no_error (data->error);
|
||||
}
|
||||
|
||||
static void
|
||||
test_ssm_delayed_jump_to_state_not_started (void)
|
||||
{
|
||||
@@ -937,7 +864,7 @@ test_ssm_delayed_jump_to_state_not_started (void)
|
||||
FpiSsmTestData *data = fpi_ssm_get_data (ssm);
|
||||
|
||||
g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, "*BUG:*completed*");
|
||||
fpi_ssm_jump_to_state_delayed (ssm, FPI_TEST_SSM_STATE_2, 10, NULL);
|
||||
fpi_ssm_jump_to_state_delayed (ssm, FPI_TEST_SSM_STATE_2, 10);
|
||||
g_test_assert_expected_messages ();
|
||||
|
||||
g_assert_cmpint (data->handler_state, ==, -1);
|
||||
@@ -967,7 +894,7 @@ test_ssm_delayed_jump_to_state_last (void)
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 1);
|
||||
|
||||
fpi_ssm_jump_to_state_delayed (ssm, FPI_TEST_SSM_STATE_3, 10, NULL);
|
||||
fpi_ssm_jump_to_state_delayed (ssm, FPI_TEST_SSM_STATE_3, 10);
|
||||
|
||||
g_assert_cmpint (data->handler_state, ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_0);
|
||||
@@ -996,7 +923,7 @@ test_ssm_delayed_jump_to_state_wrong (void)
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 1);
|
||||
|
||||
g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, "*BUG:*nr_states*");
|
||||
fpi_ssm_jump_to_state_delayed (ssm, FPI_TEST_SSM_STATE_NUM + 10, 10, NULL);
|
||||
fpi_ssm_jump_to_state_delayed (ssm, FPI_TEST_SSM_STATE_NUM + 10, 10);
|
||||
g_test_assert_expected_messages ();
|
||||
|
||||
g_assert_cmpint (data->handler_state, ==, FPI_TEST_SSM_STATE_0);
|
||||
@@ -1013,7 +940,7 @@ test_ssm_delayed_jump_to_state_wrong (void)
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 2);
|
||||
|
||||
g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, "*BUG:*state*");
|
||||
fpi_ssm_jump_to_state_delayed (ssm, FPI_TEST_SSM_STATE_0 - 10, 10, NULL);
|
||||
fpi_ssm_jump_to_state_delayed (ssm, FPI_TEST_SSM_STATE_0 - 10, 10);
|
||||
g_test_assert_expected_messages ();
|
||||
|
||||
g_assert_cmpint (data->handler_state, ==, FPI_TEST_SSM_STATE_NUM + 10);
|
||||
@@ -1043,7 +970,7 @@ test_ssm_delayed_mark_completed (void)
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 1);
|
||||
|
||||
data->expected_last_state = FPI_TEST_SSM_STATE_0;
|
||||
fpi_ssm_mark_completed_delayed (g_steal_pointer (&ssm), 10, NULL);
|
||||
fpi_ssm_mark_completed_delayed (g_steal_pointer (&ssm), 10);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 1);
|
||||
|
||||
while (g_slist_length (data->handlers_chain) == 1)
|
||||
@@ -1063,7 +990,7 @@ test_ssm_delayed_mark_completed_not_started (void)
|
||||
g_autoptr(FpiSsmTestData) data = fpi_ssm_test_data_ref (fpi_ssm_get_data (ssm));
|
||||
|
||||
g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, "*BUG:*completed*");
|
||||
fpi_ssm_mark_completed_delayed (ssm, 10, NULL);
|
||||
fpi_ssm_mark_completed_delayed (ssm, 10);
|
||||
g_test_assert_expected_messages ();
|
||||
|
||||
g_timeout_add (100, G_SOURCE_FUNC (fpi_ssm_test_nullify_pointer), &ssm);
|
||||
@@ -1090,7 +1017,7 @@ test_ssm_delayed_mark_completed_cancel (void)
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 1);
|
||||
|
||||
fpi_ssm_mark_completed_delayed (ssm, 10, NULL);
|
||||
fpi_ssm_mark_completed_delayed (ssm, 10);
|
||||
g_assert_cmpint (data->handler_state, ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 1);
|
||||
@@ -1110,40 +1037,6 @@ test_ssm_delayed_mark_completed_cancel (void)
|
||||
g_assert_false (data->ssm_destroyed);
|
||||
}
|
||||
|
||||
static void
|
||||
test_ssm_delayed_mark_completed_cancellable (void)
|
||||
{
|
||||
g_autoptr(FpiSsm) ssm = ssm_test_new ();
|
||||
g_autoptr(GCancellable) cancellable = g_cancellable_new ();
|
||||
FpiSsmTestData *data = fpi_ssm_get_data (ssm);
|
||||
|
||||
fpi_ssm_start (ssm, test_ssm_completed_callback);
|
||||
g_assert_cmpint (data->handler_state, ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 1);
|
||||
|
||||
fpi_ssm_mark_completed_delayed (ssm, 10, cancellable);
|
||||
g_assert_cmpint (data->handler_state, ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 1);
|
||||
|
||||
g_idle_add_full (G_PRIORITY_HIGH, test_ssm_cancel_cancellable_delayed, cancellable, NULL);
|
||||
|
||||
while (!g_cancellable_is_cancelled (cancellable))
|
||||
g_main_context_iteration (NULL, TRUE);
|
||||
|
||||
g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, "*BUG:*timeout*");
|
||||
fpi_ssm_cancel_delayed_state_change (ssm);
|
||||
g_test_assert_expected_messages ();
|
||||
|
||||
g_assert_cmpint (data->handler_state, ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 1);
|
||||
|
||||
g_assert_false (data->completed);
|
||||
g_assert_no_error (data->error);
|
||||
}
|
||||
|
||||
static void
|
||||
test_ssm_delayed_cancel_error (void)
|
||||
{
|
||||
@@ -1170,7 +1063,7 @@ test_ssm_subssm_start (void)
|
||||
{
|
||||
g_autoptr(FpiSsm) ssm = ssm_test_new ();
|
||||
g_autoptr(FpiSsm) subssm =
|
||||
ssm_test_new_full (FPI_TEST_SSM_STATE_NUM, "FPI_TEST_SUB_SSM");
|
||||
ssm_test_new_full (FPI_TEST_SSM_STATE_NUM, FPI_TEST_SSM_STATE_NUM, "FPI_TEST_SUB_SSM");
|
||||
FpiSsmTestData *data = fpi_ssm_get_data (ssm);
|
||||
|
||||
g_autoptr(FpiSsmTestData) subdata =
|
||||
@@ -1222,7 +1115,7 @@ test_ssm_subssm_mark_failed (void)
|
||||
{
|
||||
g_autoptr(FpiSsm) ssm = ssm_test_new ();
|
||||
g_autoptr(FpiSsm) subssm =
|
||||
ssm_test_new_full (FPI_TEST_SSM_STATE_NUM, "FPI_TEST_SUB_SSM");
|
||||
ssm_test_new_full (FPI_TEST_SSM_STATE_NUM, FPI_TEST_SSM_STATE_NUM, "FPI_TEST_SUB_SSM");
|
||||
g_autoptr(FpiSsmTestData) data =
|
||||
fpi_ssm_test_data_ref (fpi_ssm_get_data (ssm));
|
||||
g_autoptr(FpiSsmTestData) subdata =
|
||||
@@ -1261,7 +1154,7 @@ test_ssm_subssm_start_with_started (void)
|
||||
{
|
||||
g_autoptr(FpiSsm) ssm = ssm_test_new ();
|
||||
g_autoptr(FpiSsm) subssm =
|
||||
ssm_test_new_full (FPI_TEST_SSM_STATE_NUM, "FPI_TEST_SUB_SSM");
|
||||
ssm_test_new_full (FPI_TEST_SSM_STATE_NUM, FPI_TEST_SSM_STATE_NUM, "FPI_TEST_SUB_SSM");
|
||||
FpiSsmTestData *data = fpi_ssm_get_data (ssm);
|
||||
|
||||
g_autoptr(FpiSsmTestData) subdata =
|
||||
@@ -1305,7 +1198,7 @@ test_ssm_subssm_start_with_delayed (void)
|
||||
{
|
||||
g_autoptr(FpiSsm) ssm = ssm_test_new ();
|
||||
g_autoptr(FpiSsm) subssm =
|
||||
ssm_test_new_full (FPI_TEST_SSM_STATE_NUM, "FPI_TEST_SUB_SSM");
|
||||
ssm_test_new_full (FPI_TEST_SSM_STATE_NUM, FPI_TEST_SSM_STATE_NUM, "FPI_TEST_SUB_SSM");
|
||||
FpiSsmTestData *data = fpi_ssm_get_data (ssm);
|
||||
|
||||
g_autoptr(FpiSsmTestData) subdata =
|
||||
@@ -1317,7 +1210,7 @@ test_ssm_subssm_start_with_delayed (void)
|
||||
g_assert_cmpint (fpi_ssm_get_cur_state (ssm), ==, FPI_TEST_SSM_STATE_0);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 1);
|
||||
|
||||
fpi_ssm_next_state_delayed (ssm, 10, NULL);
|
||||
fpi_ssm_next_state_delayed (ssm, 10);
|
||||
|
||||
g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, "*BUG:*timeout*");
|
||||
fpi_ssm_start_subsm (ssm, subssm);
|
||||
@@ -1348,6 +1241,76 @@ test_ssm_subssm_start_with_delayed (void)
|
||||
g_assert_no_error (data->error);
|
||||
}
|
||||
|
||||
static void
|
||||
test_ssm_cleanup_complete (void)
|
||||
{
|
||||
FpiSsm *ssm = ssm_test_new_full (4, FPI_TEST_SSM_STATE_2, "FPI_TEST_SSM");
|
||||
|
||||
g_autoptr(FpiSsmTestData) data = fpi_ssm_test_data_ref (fpi_ssm_get_data (ssm));
|
||||
|
||||
fpi_ssm_start (ssm, test_ssm_completed_callback);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 1);
|
||||
|
||||
data->expected_last_state = FPI_TEST_SSM_STATE_3;
|
||||
|
||||
/* Completing jumps to the cleanup state */
|
||||
fpi_ssm_mark_completed (ssm);
|
||||
g_assert_cmpint (data->handler_state, ==, FPI_TEST_SSM_STATE_2);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 2);
|
||||
g_assert_false (data->completed);
|
||||
g_assert_false (data->ssm_destroyed);
|
||||
|
||||
/* Completing again jumps to the next cleanup state */
|
||||
fpi_ssm_mark_completed (ssm);
|
||||
g_assert_cmpint (data->handler_state, ==, FPI_TEST_SSM_STATE_3);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 3);
|
||||
g_assert_false (data->completed);
|
||||
g_assert_false (data->ssm_destroyed);
|
||||
|
||||
/* Completing again finalizes everything */
|
||||
fpi_ssm_mark_completed (ssm);
|
||||
g_assert_cmpint (data->handler_state, ==, FPI_TEST_SSM_STATE_3);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 4);
|
||||
g_assert_true (data->completed);
|
||||
g_assert_no_error (data->error);
|
||||
g_assert_true (data->ssm_destroyed);
|
||||
}
|
||||
|
||||
static void
|
||||
test_ssm_cleanup_fail (void)
|
||||
{
|
||||
FpiSsm *ssm = ssm_test_new_full (4, FPI_TEST_SSM_STATE_2, "FPI_TEST_SSM");
|
||||
|
||||
g_autoptr(FpiSsmTestData) data = fpi_ssm_test_data_ref (fpi_ssm_get_data (ssm));
|
||||
|
||||
fpi_ssm_start (ssm, test_ssm_completed_callback);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 1);
|
||||
|
||||
data->expected_last_state = FPI_TEST_SSM_STATE_3;
|
||||
|
||||
/* Failing jumps to the cleanup state */
|
||||
fpi_ssm_mark_failed (ssm, g_error_new (G_IO_ERROR, G_IO_ERROR_CANCELLED, "non-cleanup"));
|
||||
g_assert_cmpint (data->handler_state, ==, FPI_TEST_SSM_STATE_2);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 2);
|
||||
g_assert_false (data->completed);
|
||||
g_assert_false (data->ssm_destroyed);
|
||||
|
||||
/* Failing again jumps to the next cleanup state */
|
||||
fpi_ssm_mark_failed (ssm, g_error_new (G_IO_ERROR, G_IO_ERROR_FAILED, "cleanup 1"));
|
||||
g_assert_cmpint (data->handler_state, ==, FPI_TEST_SSM_STATE_3);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 3);
|
||||
g_assert_false (data->completed);
|
||||
g_assert_false (data->ssm_destroyed);
|
||||
|
||||
/* Failing again finalizes everything */
|
||||
fpi_ssm_mark_failed (ssm, g_error_new (G_IO_ERROR, G_IO_ERROR_FAILED, "cleanup 2"));
|
||||
g_assert_cmpint (data->handler_state, ==, FPI_TEST_SSM_STATE_3);
|
||||
g_assert_cmpuint (g_slist_length (data->handlers_chain), ==, 4);
|
||||
g_assert_true (data->completed);
|
||||
g_assert_error (data->error, G_IO_ERROR, G_IO_ERROR_CANCELLED);
|
||||
g_assert_true (data->ssm_destroyed);
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
@@ -1384,24 +1347,23 @@ main (int argc, char *argv[])
|
||||
g_test_add_func ("/ssm/mark_failed/with_delayed", test_ssm_mark_failed_with_delayed);
|
||||
g_test_add_func ("/ssm/delayed/next", test_ssm_delayed_next);
|
||||
g_test_add_func ("/ssm/delayed/next/cancel", test_ssm_delayed_next_cancel);
|
||||
g_test_add_func ("/ssm/delayed/next/cancellable", test_ssm_delayed_next_cancellable);
|
||||
g_test_add_func ("/ssm/delayed/next/not_started", test_ssm_delayed_next_not_started);
|
||||
g_test_add_func ("/ssm/delayed/next/complete", test_ssm_delayed_next_complete);
|
||||
g_test_add_func ("/ssm/delayed/jump_to_state", test_ssm_delayed_jump_to_state);
|
||||
g_test_add_func ("/ssm/delayed/jump_to_state/cancel", test_ssm_delayed_jump_to_state_cancel);
|
||||
g_test_add_func ("/ssm/delayed/jump_to_state/cancellable", test_ssm_delayed_jump_to_state_cancellable);
|
||||
g_test_add_func ("/ssm/delayed/jump_to_state/not_started", test_ssm_delayed_jump_to_state_not_started);
|
||||
g_test_add_func ("/ssm/delayed/jump_to_state/last", test_ssm_delayed_jump_to_state_last);
|
||||
g_test_add_func ("/ssm/delayed/jump_to_state/wrong", test_ssm_delayed_jump_to_state_wrong);
|
||||
g_test_add_func ("/ssm/delayed/mark_completed", test_ssm_delayed_mark_completed);
|
||||
g_test_add_func ("/ssm/delayed/mark_completed/cancel", test_ssm_delayed_mark_completed_cancel);
|
||||
g_test_add_func ("/ssm/delayed/mark_completed/cancellable", test_ssm_delayed_mark_completed_cancellable);
|
||||
g_test_add_func ("/ssm/delayed/mark_completed/not_started", test_ssm_delayed_mark_completed_not_started);
|
||||
g_test_add_func ("/ssm/delayed/cancel/error", test_ssm_delayed_cancel_error);
|
||||
g_test_add_func ("/ssm/subssm/start", test_ssm_subssm_start);
|
||||
g_test_add_func ("/ssm/subssm/start/with_started", test_ssm_subssm_start_with_started);
|
||||
g_test_add_func ("/ssm/subssm/start/with_delayed", test_ssm_subssm_start_with_delayed);
|
||||
g_test_add_func ("/ssm/subssm/mark_failed", test_ssm_subssm_mark_failed);
|
||||
g_test_add_func ("/ssm/cleanup/complete", test_ssm_cleanup_complete);
|
||||
g_test_add_func ("/ssm/cleanup/fail", test_ssm_cleanup_fail);
|
||||
|
||||
return g_test_run ();
|
||||
}
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
exec $LIBFPRINT_TEST_WRAPPER $@
|
||||
+40
-10
@@ -3,6 +3,7 @@
|
||||
import sys
|
||||
import os
|
||||
import os.path
|
||||
import glob
|
||||
import shutil
|
||||
import tempfile
|
||||
import subprocess
|
||||
@@ -17,6 +18,9 @@ try:
|
||||
if version < (0, 13, 2):
|
||||
print('umockdev is too old for test to be reliable, expect random failures!')
|
||||
print('Please update umockdev to at least 0.13.2.')
|
||||
pcap_supported = version >= (0, 16, 2) or os.getenv('CI_PROJECT_NAME') == "libfprint"
|
||||
spi_supported = version >= (0, 16) or os.getenv('CI_PROJECT_NAME') == "libfprint"
|
||||
|
||||
except FileNotFoundError:
|
||||
print('umockdev-run not found, skipping test!')
|
||||
print('Please install umockdev.')
|
||||
@@ -28,7 +32,6 @@ ddir = sys.argv[1]
|
||||
tmpdir = tempfile.mkdtemp(prefix='libfprint-umockdev-test-')
|
||||
|
||||
assert os.path.isdir(ddir)
|
||||
assert os.path.isfile(os.path.join(ddir, "device"))
|
||||
|
||||
def cmp_pngs(png_a, png_b):
|
||||
print("Comparing PNGs %s and %s" % (png_a, png_b))
|
||||
@@ -55,14 +58,41 @@ def cmp_pngs(png_a, png_b):
|
||||
|
||||
def get_umockdev_runner(ioctl_basename):
|
||||
ioctl = os.path.join(ddir, "{}.ioctl".format(ioctl_basename))
|
||||
device = os.path.join(ddir, "device")
|
||||
dev = open(ioctl).readline().strip()
|
||||
assert dev.startswith('@DEV ')
|
||||
dev = dev[5:]
|
||||
pcap = os.path.join(ddir, "{}.pcapng".format(ioctl_basename))
|
||||
|
||||
devices = glob.glob(os.path.join(ddir, "device")) + glob.glob(os.path.join(ddir, "device-*[!~]"))
|
||||
device_args = []
|
||||
for device in devices:
|
||||
p = open(device).readline().strip()
|
||||
assert p.startswith('P: ')
|
||||
device_args.extend(("-d", device))
|
||||
|
||||
if os.path.exists(pcap):
|
||||
syspath = '/sys' + p[3:]
|
||||
|
||||
umockdev = ['umockdev-run', *device_args,
|
||||
'-p', "%s=%s" % (syspath, pcap),
|
||||
'--']
|
||||
|
||||
# Skip test if we detect too old umockdev for pcap replay
|
||||
if not pcap_supported:
|
||||
sys.exit(77)
|
||||
|
||||
else:
|
||||
dev = open(ioctl).readline().strip()
|
||||
assert dev.startswith('@DEV ')
|
||||
dev = dev[5:]
|
||||
if dev.endswith(" (SPI)"):
|
||||
dev = dev[:dev.rindex(" ")]
|
||||
|
||||
# Skip test if we detect too old umockdev for spi replay
|
||||
if not spi_supported:
|
||||
sys.exit(77)
|
||||
|
||||
umockdev = ['umockdev-run', *device_args,
|
||||
'-i', "%s=%s" % (dev, ioctl),
|
||||
'--']
|
||||
|
||||
umockdev = ['umockdev-run', '-d', device,
|
||||
'-i', "%s=%s" % (dev, ioctl),
|
||||
'--']
|
||||
wrapper = os.getenv('LIBFPRINT_TEST_WRAPPER')
|
||||
return umockdev + (wrapper.split(' ') if wrapper else []) + [sys.executable]
|
||||
|
||||
@@ -81,10 +111,10 @@ def custom():
|
||||
['%s' % os.path.join(ddir, "custom.py")])
|
||||
|
||||
try:
|
||||
if os.path.exists(os.path.join(ddir, "capture.ioctl")):
|
||||
if glob.glob(os.path.join(ddir, "capture.*")):
|
||||
capture()
|
||||
|
||||
if os.path.exists(os.path.join(ddir, "custom.ioctl")):
|
||||
if glob.glob(os.path.join(ddir, "custom.*")):
|
||||
custom()
|
||||
|
||||
except Exception as e:
|
||||
|
||||
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
@@ -0,0 +1,319 @@
|
||||
P: /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3
|
||||
N: bus/usb/001/003=12010101000000087E14162002000102000109022700010100A0320904000003FF000000070581024000000705020240000007058303040014
|
||||
E: DEVNAME=/dev/bus/usb/001/003
|
||||
E: DEVTYPE=usb_device
|
||||
E: DRIVER=usb
|
||||
E: PRODUCT=147e/2016/2
|
||||
E: TYPE=0/0/0
|
||||
E: BUSNUM=001
|
||||
E: DEVNUM=003
|
||||
E: MAJOR=189
|
||||
E: MINOR=2
|
||||
E: SUBSYSTEM=usb
|
||||
E: ID_VENDOR=UPEK
|
||||
E: ID_VENDOR_ENC=UPEK
|
||||
E: ID_VENDOR_ID=147e
|
||||
E: ID_MODEL=Biometric_Coprocessor
|
||||
E: ID_MODEL_ENC=Biometric\x20Coprocessor
|
||||
E: ID_MODEL_ID=2016
|
||||
E: ID_REVISION=0002
|
||||
E: ID_SERIAL=UPEK_Biometric_Coprocessor
|
||||
E: ID_BUS=usb
|
||||
E: ID_USB_INTERFACES=:ff0000:
|
||||
E: ID_VENDOR_FROM_DATABASE=Upek
|
||||
E: ID_MODEL_FROM_DATABASE=Biometric Touchchip/Touchstrip Fingerprint Sensor
|
||||
E: ID_PATH=pci-0000:00:1a.0-usb-0:1.3
|
||||
E: ID_PATH_TAG=pci-0000_00_1a_0-usb-0_1_3
|
||||
E: LIBFPRINT_DRIVER=Upek TouchChip Fingerprint Coprocessor
|
||||
E: ID_FOR_SEAT=usb-pci-0000_00_1a_0-usb-0_1_3
|
||||
E: TAGS=:seat:
|
||||
E: CURRENT_TAGS=:seat:
|
||||
A: authorized=1\n
|
||||
A: avoid_reset_quirk=0\n
|
||||
A: bConfigurationValue=1\n
|
||||
A: bDeviceClass=00\n
|
||||
A: bDeviceProtocol=00\n
|
||||
A: bDeviceSubClass=00\n
|
||||
A: bMaxPacketSize0=8\n
|
||||
A: bMaxPower=100mA\n
|
||||
A: bNumConfigurations=1\n
|
||||
A: bNumInterfaces= 1\n
|
||||
A: bcdDevice=0002\n
|
||||
A: bmAttributes=a0\n
|
||||
A: busnum=1\n
|
||||
A: configuration=
|
||||
H: descriptors=12010101000000087E14162002000102000109022700010100A0320904000003FF000000070581024000000705020240000007058303040014
|
||||
A: dev=189:2\n
|
||||
A: devnum=3\n
|
||||
A: devpath=1.3\n
|
||||
L: driver=../../../../../../bus/usb/drivers/usb
|
||||
L: firmware_node=../../../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:2d/device:2e/device:2f/device:32
|
||||
A: idProduct=2016\n
|
||||
A: idVendor=147e\n
|
||||
A: ltm_capable=no\n
|
||||
A: manufacturer=UPEK\n
|
||||
A: maxchild=0\n
|
||||
L: port=../1-1:1.0/1-1-port3
|
||||
A: power/active_duration=757220\n
|
||||
A: power/async=enabled\n
|
||||
A: power/autosuspend=2\n
|
||||
A: power/autosuspend_delay_ms=2000\n
|
||||
A: power/connected_duration=857556\n
|
||||
A: power/control=auto\n
|
||||
A: power/level=auto\n
|
||||
A: power/persist=1\n
|
||||
A: power/runtime_active_kids=0\n
|
||||
A: power/runtime_active_time=762579\n
|
||||
A: power/runtime_enabled=enabled\n
|
||||
A: power/runtime_status=active\n
|
||||
A: power/runtime_suspended_time=94791\n
|
||||
A: power/runtime_usage=0\n
|
||||
A: power/wakeup=disabled\n
|
||||
A: power/wakeup_abort_count=\n
|
||||
A: power/wakeup_active=\n
|
||||
A: power/wakeup_active_count=\n
|
||||
A: power/wakeup_count=\n
|
||||
A: power/wakeup_expire_count=\n
|
||||
A: power/wakeup_last_time_ms=\n
|
||||
A: power/wakeup_max_time_ms=\n
|
||||
A: power/wakeup_total_time_ms=\n
|
||||
A: product=Biometric Coprocessor\n
|
||||
A: quirks=0x0\n
|
||||
A: removable=fixed\n
|
||||
A: rx_lanes=1\n
|
||||
A: speed=12\n
|
||||
A: tx_lanes=1\n
|
||||
A: urbnum=620\n
|
||||
A: version= 1.01\n
|
||||
|
||||
P: /devices/pci0000:00/0000:00:1a.0/usb1/1-1
|
||||
N: bus/usb/001/002=12010002090001408780200000000000000109021900010100E0000904000001090000000705810301000C
|
||||
E: DEVNAME=/dev/bus/usb/001/002
|
||||
E: DEVTYPE=usb_device
|
||||
E: DRIVER=usb
|
||||
E: PRODUCT=8087/20/0
|
||||
E: TYPE=9/0/1
|
||||
E: BUSNUM=001
|
||||
E: DEVNUM=002
|
||||
E: MAJOR=189
|
||||
E: MINOR=1
|
||||
E: SUBSYSTEM=usb
|
||||
E: ID_VENDOR=8087
|
||||
E: ID_VENDOR_ENC=8087
|
||||
E: ID_VENDOR_ID=8087
|
||||
E: ID_MODEL=0020
|
||||
E: ID_MODEL_ENC=0020
|
||||
E: ID_MODEL_ID=0020
|
||||
E: ID_REVISION=0000
|
||||
E: ID_SERIAL=8087_0020
|
||||
E: ID_BUS=usb
|
||||
E: ID_USB_INTERFACES=:090000:
|
||||
E: ID_VENDOR_FROM_DATABASE=Intel Corp.
|
||||
E: ID_MODEL_FROM_DATABASE=Integrated Rate Matching Hub
|
||||
E: ID_PATH=pci-0000:00:1a.0-usb-0:1
|
||||
E: ID_PATH_TAG=pci-0000_00_1a_0-usb-0_1
|
||||
E: ID_FOR_SEAT=usb-pci-0000_00_1a_0-usb-0_1
|
||||
E: TAGS=:seat:
|
||||
E: CURRENT_TAGS=:seat:
|
||||
A: authorized=1\n
|
||||
A: avoid_reset_quirk=0\n
|
||||
A: bConfigurationValue=1\n
|
||||
A: bDeviceClass=09\n
|
||||
A: bDeviceProtocol=01\n
|
||||
A: bDeviceSubClass=00\n
|
||||
A: bMaxPacketSize0=64\n
|
||||
A: bMaxPower=0mA\n
|
||||
A: bNumConfigurations=1\n
|
||||
A: bNumInterfaces= 1\n
|
||||
A: bcdDevice=0000\n
|
||||
A: bmAttributes=e0\n
|
||||
A: busnum=1\n
|
||||
A: configuration=
|
||||
H: descriptors=12010002090001408780200000000000000109021900010100E0000904000001090000000705810301000C
|
||||
A: dev=189:1\n
|
||||
A: devnum=2\n
|
||||
A: devpath=1\n
|
||||
L: driver=../../../../../bus/usb/drivers/usb
|
||||
L: firmware_node=../../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:2d/device:2e/device:2f
|
||||
A: idProduct=0020\n
|
||||
A: idVendor=8087\n
|
||||
A: ltm_capable=no\n
|
||||
A: maxchild=6\n
|
||||
L: port=../1-0:1.0/usb1-port1
|
||||
A: power/active_duration=776368\n
|
||||
A: power/async=enabled\n
|
||||
A: power/autosuspend=0\n
|
||||
A: power/autosuspend_delay_ms=0\n
|
||||
A: power/connected_duration=858060\n
|
||||
A: power/control=auto\n
|
||||
A: power/level=auto\n
|
||||
A: power/runtime_active_kids=3\n
|
||||
A: power/runtime_active_time=779955\n
|
||||
A: power/runtime_enabled=enabled\n
|
||||
A: power/runtime_status=active\n
|
||||
A: power/runtime_suspended_time=77820\n
|
||||
A: power/runtime_usage=0\n
|
||||
A: power/wakeup=disabled\n
|
||||
A: power/wakeup_abort_count=\n
|
||||
A: power/wakeup_active=\n
|
||||
A: power/wakeup_active_count=\n
|
||||
A: power/wakeup_count=\n
|
||||
A: power/wakeup_expire_count=\n
|
||||
A: power/wakeup_last_time_ms=\n
|
||||
A: power/wakeup_max_time_ms=\n
|
||||
A: power/wakeup_total_time_ms=\n
|
||||
A: quirks=0x0\n
|
||||
A: removable=fixed\n
|
||||
A: rx_lanes=1\n
|
||||
A: speed=480\n
|
||||
A: tx_lanes=1\n
|
||||
A: urbnum=2620\n
|
||||
A: version= 2.00\n
|
||||
|
||||
P: /devices/pci0000:00/0000:00:1a.0/usb1
|
||||
N: bus/usb/001/001=12010002090000406B1D020010050302010109021900010100E0000904000001090000000705810304000C
|
||||
E: DEVNAME=/dev/bus/usb/001/001
|
||||
E: DEVTYPE=usb_device
|
||||
E: DRIVER=usb
|
||||
E: PRODUCT=1d6b/2/510
|
||||
E: TYPE=9/0/0
|
||||
E: BUSNUM=001
|
||||
E: DEVNUM=001
|
||||
E: MAJOR=189
|
||||
E: MINOR=0
|
||||
E: SUBSYSTEM=usb
|
||||
E: ID_VENDOR=Linux_5.10.0-8-amd64_ehci_hcd
|
||||
E: ID_VENDOR_ENC=Linux\x205.10.0-8-amd64\x20ehci_hcd
|
||||
E: ID_VENDOR_ID=1d6b
|
||||
E: ID_MODEL=EHCI_Host_Controller
|
||||
E: ID_MODEL_ENC=EHCI\x20Host\x20Controller
|
||||
E: ID_MODEL_ID=0002
|
||||
E: ID_REVISION=0510
|
||||
E: ID_SERIAL=Linux_5.10.0-8-amd64_ehci_hcd_EHCI_Host_Controller_0000:00:1a.0
|
||||
E: ID_SERIAL_SHORT=0000:00:1a.0
|
||||
E: ID_BUS=usb
|
||||
E: ID_USB_INTERFACES=:090000:
|
||||
E: ID_VENDOR_FROM_DATABASE=Linux Foundation
|
||||
E: ID_AUTOSUSPEND=1
|
||||
E: ID_MODEL_FROM_DATABASE=2.0 root hub
|
||||
E: ID_PATH=pci-0000:00:1a.0
|
||||
E: ID_PATH_TAG=pci-0000_00_1a_0
|
||||
E: ID_FOR_SEAT=usb-pci-0000_00_1a_0
|
||||
E: TAGS=:seat:
|
||||
E: CURRENT_TAGS=:seat:
|
||||
A: authorized=1\n
|
||||
A: authorized_default=1\n
|
||||
A: avoid_reset_quirk=0\n
|
||||
A: bConfigurationValue=1\n
|
||||
A: bDeviceClass=09\n
|
||||
A: bDeviceProtocol=00\n
|
||||
A: bDeviceSubClass=00\n
|
||||
A: bMaxPacketSize0=64\n
|
||||
A: bMaxPower=0mA\n
|
||||
A: bNumConfigurations=1\n
|
||||
A: bNumInterfaces= 1\n
|
||||
A: bcdDevice=0510\n
|
||||
A: bmAttributes=e0\n
|
||||
A: busnum=1\n
|
||||
A: configuration=
|
||||
H: descriptors=12010002090000406B1D020010050302010109021900010100E0000904000001090000000705810304000C
|
||||
A: dev=189:0\n
|
||||
A: devnum=1\n
|
||||
A: devpath=0\n
|
||||
L: driver=../../../../bus/usb/drivers/usb
|
||||
L: firmware_node=../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:2d/device:2e
|
||||
A: idProduct=0002\n
|
||||
A: idVendor=1d6b\n
|
||||
A: interface_authorized_default=1\n
|
||||
A: ltm_capable=no\n
|
||||
A: manufacturer=Linux 5.10.0-8-amd64 ehci_hcd\n
|
||||
A: maxchild=3\n
|
||||
A: power/active_duration=780512\n
|
||||
A: power/async=enabled\n
|
||||
A: power/autosuspend=0\n
|
||||
A: power/autosuspend_delay_ms=0\n
|
||||
A: power/connected_duration=858228\n
|
||||
A: power/control=auto\n
|
||||
A: power/level=auto\n
|
||||
A: power/runtime_active_kids=1\n
|
||||
A: power/runtime_active_time=780500\n
|
||||
A: power/runtime_enabled=enabled\n
|
||||
A: power/runtime_status=active\n
|
||||
A: power/runtime_suspended_time=77697\n
|
||||
A: power/runtime_usage=0\n
|
||||
A: power/wakeup=disabled\n
|
||||
A: power/wakeup_abort_count=\n
|
||||
A: power/wakeup_active=\n
|
||||
A: power/wakeup_active_count=\n
|
||||
A: power/wakeup_count=\n
|
||||
A: power/wakeup_expire_count=\n
|
||||
A: power/wakeup_last_time_ms=\n
|
||||
A: power/wakeup_max_time_ms=\n
|
||||
A: power/wakeup_total_time_ms=\n
|
||||
A: product=EHCI Host Controller\n
|
||||
A: quirks=0x0\n
|
||||
A: removable=unknown\n
|
||||
A: rx_lanes=1\n
|
||||
A: serial=0000:00:1a.0\n
|
||||
A: speed=480\n
|
||||
A: tx_lanes=1\n
|
||||
A: urbnum=1071\n
|
||||
A: version= 2.00\n
|
||||
|
||||
P: /devices/pci0000:00/0000:00:1a.0
|
||||
E: DRIVER=ehci-pci
|
||||
E: PCI_CLASS=C0320
|
||||
E: PCI_ID=8086:3B3C
|
||||
E: PCI_SUBSYS_ID=17AA:2163
|
||||
E: PCI_SLOT_NAME=0000:00:1a.0
|
||||
E: MODALIAS=pci:v00008086d00003B3Csv000017AAsd00002163bc0Csc03i20
|
||||
E: SUBSYSTEM=pci
|
||||
E: ID_PCI_CLASS_FROM_DATABASE=Serial bus controller
|
||||
E: ID_PCI_SUBCLASS_FROM_DATABASE=USB controller
|
||||
E: ID_PCI_INTERFACE_FROM_DATABASE=EHCI
|
||||
E: ID_VENDOR_FROM_DATABASE=Intel Corporation
|
||||
E: ID_MODEL_FROM_DATABASE=5 Series/3400 Series Chipset USB2 Enhanced Host Controller
|
||||
A: ari_enabled=0\n
|
||||
A: broken_parity_status=0\n
|
||||
A: class=0x0c0320\n
|
||||
A: companion=
|
||||
H: config=86803C3B060190020620030C00000000008072F2000000000000000000000000000000000000000000000000AA1763210000000050000000000000000B040000000000000000000000000000000000000158C2C9000000000A98A020000000002020A7070000000001000001000008C00000DF3F0000000000000000000000000000800011890C13A000000000000000000000000000000013000603000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000AAFF00000000000000000000000000000000000000000004F340BB0000000088858000870F060828171B30
|
||||
A: consistent_dma_mask_bits=32\n
|
||||
A: d3cold_allowed=1\n
|
||||
A: device=0x3b3c\n
|
||||
A: dma_mask_bits=32\n
|
||||
L: driver=../../../bus/pci/drivers/ehci-pci
|
||||
A: driver_override=(null)\n
|
||||
A: enable=1\n
|
||||
L: firmware_node=../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:2d
|
||||
A: irq=23\n
|
||||
A: local_cpulist=0-3\n
|
||||
A: local_cpus=f\n
|
||||
A: modalias=pci:v00008086d00003B3Csv000017AAsd00002163bc0Csc03i20\n
|
||||
A: msi_bus=1\n
|
||||
A: numa_node=-1\n
|
||||
A: pools=poolinfo - 0.1\nehci_sitd 0 0 96 0\nehci_itd 0 0 192 0\nehci_qh 9 42 96 1\nehci_qtd 13 42 96 1\nbuffer-2048 0 0 2048 0\nbuffer-512 0 0 512 0\nbuffer-128 0 0 128 0\nbuffer-32 0 0 32 0\n
|
||||
A: power/async=enabled\n
|
||||
A: power/control=on\n
|
||||
A: power/runtime_active_kids=1\n
|
||||
A: power/runtime_active_time=859876\n
|
||||
A: power/runtime_enabled=forbidden\n
|
||||
A: power/runtime_status=active\n
|
||||
A: power/runtime_suspended_time=0\n
|
||||
A: power/runtime_usage=1\n
|
||||
A: power/wakeup=enabled\n
|
||||
A: power/wakeup_abort_count=0\n
|
||||
A: power/wakeup_active=0\n
|
||||
A: power/wakeup_active_count=0\n
|
||||
A: power/wakeup_count=0\n
|
||||
A: power/wakeup_expire_count=0\n
|
||||
A: power/wakeup_last_time_ms=0\n
|
||||
A: power/wakeup_max_time_ms=0\n
|
||||
A: power/wakeup_total_time_ms=0\n
|
||||
A: resource=0x00000000f2728000 0x00000000f27283ff 0x0000000000040200\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n
|
||||
A: revision=0x06\n
|
||||
A: subsystem_device=0x2163\n
|
||||
A: subsystem_vendor=0x17aa\n
|
||||
A: uframe_periodic_max=100\n
|
||||
A: vendor=0x8086\n
|
||||
|
||||
@@ -81,3 +81,145 @@ A: speed=12
|
||||
A: tx_lanes=1
|
||||
A: urbnum=8
|
||||
A: version= 1.10
|
||||
|
||||
P: /devices/pci0000:00/0000:00:14.0/usb1
|
||||
N: bus/usb/001/001=12010002090001406B1D020011050302010109021900010100E0000904000001090000000705810304000C
|
||||
E: DEVNAME=/dev/bus/usb/001/001
|
||||
E: DEVTYPE=usb_device
|
||||
E: DRIVER=usb
|
||||
E: PRODUCT=1d6b/2/511
|
||||
E: TYPE=9/0/1
|
||||
E: BUSNUM=001
|
||||
E: DEVNUM=001
|
||||
E: MAJOR=189
|
||||
E: MINOR=0
|
||||
E: SUBSYSTEM=usb
|
||||
E: ID_VENDOR=Linux_5.11.2-arch1-1_xhci-hcd
|
||||
E: ID_VENDOR_ENC=Linux\x205.11.2-arch1-1\x20xhci-hcd
|
||||
E: ID_VENDOR_ID=1d6b
|
||||
E: ID_MODEL=xHCI_Host_Controller
|
||||
E: ID_MODEL_ENC=xHCI\x20Host\x20Controller
|
||||
E: ID_MODEL_ID=0002
|
||||
E: ID_REVISION=0511
|
||||
E: ID_SERIAL=Linux_5.11.2-arch1-1_xhci-hcd_xHCI_Host_Controller_0000:00:14.0
|
||||
E: ID_SERIAL_SHORT=0000:00:14.0
|
||||
E: ID_BUS=usb
|
||||
E: ID_USB_INTERFACES=:090000:
|
||||
E: ID_VENDOR_FROM_DATABASE=Linux Foundation
|
||||
E: ID_AUTOSUSPEND=1
|
||||
E: ID_MODEL_FROM_DATABASE=2.0 root hub
|
||||
E: ID_PATH=pci-0000:00:14.0
|
||||
E: ID_PATH_TAG=pci-0000_00_14_0
|
||||
E: ID_FOR_SEAT=usb-pci-0000_00_14_0
|
||||
E: TAGS=:seat:
|
||||
E: CURRENT_TAGS=:seat:
|
||||
A: authorized=1\n
|
||||
A: authorized_default=1\n
|
||||
A: avoid_reset_quirk=0\n
|
||||
A: bConfigurationValue=1\n
|
||||
A: bDeviceClass=09\n
|
||||
A: bDeviceProtocol=01\n
|
||||
A: bDeviceSubClass=00\n
|
||||
A: bMaxPacketSize0=64\n
|
||||
A: bMaxPower=0mA\n
|
||||
A: bNumConfigurations=1\n
|
||||
A: bNumInterfaces= 1\n
|
||||
A: bcdDevice=0511\n
|
||||
A: bmAttributes=e0\n
|
||||
A: busnum=1\n
|
||||
A: configuration=
|
||||
H: descriptors=12010002090001406B1D020011050302010109021900010100E0000904000001090000000705810304000C
|
||||
A: dev=189:0\n
|
||||
A: devnum=1\n
|
||||
A: devpath=0\n
|
||||
L: driver=../../../../bus/usb/drivers/usb
|
||||
L: firmware_node=../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:4c/device:4d
|
||||
A: idProduct=0002\n
|
||||
A: idVendor=1d6b\n
|
||||
A: interface_authorized_default=1\n
|
||||
A: ltm_capable=no\n
|
||||
A: manufacturer=Linux 5.11.2-arch1-1 xhci-hcd\n
|
||||
A: maxchild=16\n
|
||||
A: power/active_duration=3289930\n
|
||||
A: power/autosuspend=0\n
|
||||
A: power/autosuspend_delay_ms=0\n
|
||||
A: power/connected_duration=34389654\n
|
||||
A: power/control=auto\n
|
||||
A: power/level=auto\n
|
||||
A: power/runtime_active_time=3289845\n
|
||||
A: power/runtime_status=active\n
|
||||
A: power/runtime_suspended_time=31099805\n
|
||||
A: power/wakeup=disabled\n
|
||||
A: power/wakeup_abort_count=\n
|
||||
A: power/wakeup_active=\n
|
||||
A: power/wakeup_active_count=\n
|
||||
A: power/wakeup_count=\n
|
||||
A: power/wakeup_expire_count=\n
|
||||
A: power/wakeup_last_time_ms=\n
|
||||
A: power/wakeup_max_time_ms=\n
|
||||
A: power/wakeup_total_time_ms=\n
|
||||
A: product=xHCI Host Controller\n
|
||||
A: quirks=0x0\n
|
||||
A: removable=unknown\n
|
||||
A: rx_lanes=1\n
|
||||
A: serial=0000:00:14.0\n
|
||||
A: speed=480\n
|
||||
A: tx_lanes=1\n
|
||||
A: urbnum=2355\n
|
||||
A: version= 2.00\n
|
||||
|
||||
P: /devices/pci0000:00/0000:00:14.0
|
||||
E: DRIVER=xhci_hcd
|
||||
E: PCI_CLASS=C0330
|
||||
E: PCI_ID=8086:A12F
|
||||
E: PCI_SUBSYS_ID=1028:07BE
|
||||
E: PCI_SLOT_NAME=0000:00:14.0
|
||||
E: MODALIAS=pci:v00008086d0000A12Fsv00001028sd000007BEbc0Csc03i30
|
||||
E: SUBSYSTEM=pci
|
||||
E: ID_PCI_CLASS_FROM_DATABASE=Serial bus controller
|
||||
E: ID_PCI_SUBCLASS_FROM_DATABASE=USB controller
|
||||
E: ID_PCI_INTERFACE_FROM_DATABASE=XHCI
|
||||
E: ID_VENDOR_FROM_DATABASE=Intel Corporation
|
||||
E: ID_MODEL_FROM_DATABASE=100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller
|
||||
A: ari_enabled=0\n
|
||||
A: broken_parity_status=0\n
|
||||
A: class=0x0c0330\n
|
||||
H: config=86802FA1060490023130030C000080000400D1ED0000000000000000000000000000000000000000000000002810BE07000000007000000000000000FF010000
|
||||
A: consistent_dma_mask_bits=64\n
|
||||
A: d3cold_allowed=1\n
|
||||
A: device=0xa12f\n
|
||||
A: dma_mask_bits=64\n
|
||||
L: driver=../../../bus/pci/drivers/xhci_hcd
|
||||
A: driver_override=(null)\n
|
||||
A: enable=1\n
|
||||
L: firmware_node=../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:4c
|
||||
L: iommu=../../virtual/iommu/dmar1
|
||||
L: iommu_group=../../../kernel/iommu_groups/4
|
||||
A: irq=143\n
|
||||
A: local_cpulist=0-7\n
|
||||
A: local_cpus=ff\n
|
||||
A: modalias=pci:v00008086d0000A12Fsv00001028sd000007BEbc0Csc03i30\n
|
||||
A: msi_bus=1\n
|
||||
A: msi_irqs/143=msi\n
|
||||
A: numa_node=-1\n
|
||||
A: pools=poolinfo - 0.1\nbuffer-2048 0 0 2048 0\nbuffer-512 0 0 512 0\nbuffer-128 0 0 128 0\nbuffer-32 0 0 32 0\nxHCI 1KB stream ctx arrays 0 0 1024 0\nxHCI 256 byte stream ctx arrays 0 0 256 0\nxHCI input/output contexts 7 10 2112 10\nxHCI ring segments 30 38 4096 38\nbuffer-2048 0 0 2048 0\nbuffer-512 0 0 512 0\nbuffer-128 0 0 128 0\nbuffer-32 0 0 32 0\n
|
||||
A: power/control=on\n
|
||||
A: power/runtime_active_time=34390988\n
|
||||
A: power/runtime_status=active\n
|
||||
A: power/runtime_suspended_time=0\n
|
||||
A: power/wakeup=enabled\n
|
||||
A: power/wakeup_abort_count=0\n
|
||||
A: power/wakeup_active=0\n
|
||||
A: power/wakeup_active_count=0\n
|
||||
A: power/wakeup_count=0\n
|
||||
A: power/wakeup_expire_count=0\n
|
||||
A: power/wakeup_last_time_ms=0\n
|
||||
A: power/wakeup_max_time_ms=0\n
|
||||
A: power/wakeup_total_time_ms=0\n
|
||||
A: power_state=D0\n
|
||||
A: resource=0x00000000edd10000 0x00000000edd1ffff 0x0000000000140204\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n
|
||||
A: revision=0x31\n
|
||||
A: subsystem_device=0x07be\n
|
||||
A: subsystem_vendor=0x1028\n
|
||||
A: vendor=0x8086\n
|
||||
|
||||
|
||||
@@ -78,3 +78,145 @@ A: speed=12
|
||||
A: tx_lanes=1
|
||||
A: urbnum=7
|
||||
A: version= 1.10
|
||||
|
||||
P: /devices/pci0000:00/0000:00:14.0/usb2
|
||||
N: bus/usb/002/001=12010002090001406B1D020011050302010109021900010100E0000904000001090000000705810304000C
|
||||
E: DEVNAME=/dev/bus/usb/002/001
|
||||
E: DEVTYPE=usb_device
|
||||
E: DRIVER=usb
|
||||
E: PRODUCT=1d6b/2/511
|
||||
E: TYPE=9/0/1
|
||||
E: BUSNUM=002
|
||||
E: DEVNUM=001
|
||||
E: MAJOR=189
|
||||
E: MINOR=0
|
||||
E: SUBSYSTEM=usb
|
||||
E: ID_VENDOR=Linux_5.11.2-arch1-1_xhci-hcd
|
||||
E: ID_VENDOR_ENC=Linux\x205.11.2-arch1-1\x20xhci-hcd
|
||||
E: ID_VENDOR_ID=1d6b
|
||||
E: ID_MODEL=xHCI_Host_Controller
|
||||
E: ID_MODEL_ENC=xHCI\x20Host\x20Controller
|
||||
E: ID_MODEL_ID=0002
|
||||
E: ID_REVISION=0511
|
||||
E: ID_SERIAL=Linux_5.11.2-arch1-1_xhci-hcd_xHCI_Host_Controller_0000:00:14.0
|
||||
E: ID_SERIAL_SHORT=0000:00:14.0
|
||||
E: ID_BUS=usb
|
||||
E: ID_USB_INTERFACES=:090000:
|
||||
E: ID_VENDOR_FROM_DATABASE=Linux Foundation
|
||||
E: ID_AUTOSUSPEND=1
|
||||
E: ID_MODEL_FROM_DATABASE=2.0 root hub
|
||||
E: ID_PATH=pci-0000:00:14.0
|
||||
E: ID_PATH_TAG=pci-0000_00_14_0
|
||||
E: ID_FOR_SEAT=usb-pci-0000_00_14_0
|
||||
E: TAGS=:seat:
|
||||
E: CURRENT_TAGS=:seat:
|
||||
A: authorized=1\n
|
||||
A: authorized_default=1\n
|
||||
A: avoid_reset_quirk=0\n
|
||||
A: bConfigurationValue=1\n
|
||||
A: bDeviceClass=09\n
|
||||
A: bDeviceProtocol=01\n
|
||||
A: bDeviceSubClass=00\n
|
||||
A: bMaxPacketSize0=64\n
|
||||
A: bMaxPower=0mA\n
|
||||
A: bNumConfigurations=1\n
|
||||
A: bNumInterfaces= 1\n
|
||||
A: bcdDevice=0511\n
|
||||
A: bmAttributes=e0\n
|
||||
A: busnum=1\n
|
||||
A: configuration=
|
||||
H: descriptors=12010002090001406B1D020011050302010109021900010100E0000904000001090000000705810304000C
|
||||
A: dev=189:0\n
|
||||
A: devnum=1\n
|
||||
A: devpath=0\n
|
||||
L: driver=../../../../bus/usb/drivers/usb
|
||||
L: firmware_node=../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:4c/device:4d
|
||||
A: idProduct=0002\n
|
||||
A: idVendor=1d6b\n
|
||||
A: interface_authorized_default=1\n
|
||||
A: ltm_capable=no\n
|
||||
A: manufacturer=Linux 5.11.2-arch1-1 xhci-hcd\n
|
||||
A: maxchild=16\n
|
||||
A: power/active_duration=3289930\n
|
||||
A: power/autosuspend=0\n
|
||||
A: power/autosuspend_delay_ms=0\n
|
||||
A: power/connected_duration=34389654\n
|
||||
A: power/control=auto\n
|
||||
A: power/level=auto\n
|
||||
A: power/runtime_active_time=3289845\n
|
||||
A: power/runtime_status=active\n
|
||||
A: power/runtime_suspended_time=31099805\n
|
||||
A: power/wakeup=disabled\n
|
||||
A: power/wakeup_abort_count=\n
|
||||
A: power/wakeup_active=\n
|
||||
A: power/wakeup_active_count=\n
|
||||
A: power/wakeup_count=\n
|
||||
A: power/wakeup_expire_count=\n
|
||||
A: power/wakeup_last_time_ms=\n
|
||||
A: power/wakeup_max_time_ms=\n
|
||||
A: power/wakeup_total_time_ms=\n
|
||||
A: product=xHCI Host Controller\n
|
||||
A: quirks=0x0\n
|
||||
A: removable=unknown\n
|
||||
A: rx_lanes=1\n
|
||||
A: serial=0000:00:14.0\n
|
||||
A: speed=480\n
|
||||
A: tx_lanes=1\n
|
||||
A: urbnum=2355\n
|
||||
A: version= 2.00\n
|
||||
|
||||
P: /devices/pci0000:00/0000:00:14.0
|
||||
E: DRIVER=xhci_hcd
|
||||
E: PCI_CLASS=C0330
|
||||
E: PCI_ID=8086:A12F
|
||||
E: PCI_SUBSYS_ID=1028:07BE
|
||||
E: PCI_SLOT_NAME=0000:00:14.0
|
||||
E: MODALIAS=pci:v00008086d0000A12Fsv00001028sd000007BEbc0Csc03i30
|
||||
E: SUBSYSTEM=pci
|
||||
E: ID_PCI_CLASS_FROM_DATABASE=Serial bus controller
|
||||
E: ID_PCI_SUBCLASS_FROM_DATABASE=USB controller
|
||||
E: ID_PCI_INTERFACE_FROM_DATABASE=XHCI
|
||||
E: ID_VENDOR_FROM_DATABASE=Intel Corporation
|
||||
E: ID_MODEL_FROM_DATABASE=100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller
|
||||
A: ari_enabled=0\n
|
||||
A: broken_parity_status=0\n
|
||||
A: class=0x0c0330\n
|
||||
H: config=86802FA1060490023130030C000080000400D1ED0000000000000000000000000000000000000000000000002810BE07000000007000000000000000FF010000
|
||||
A: consistent_dma_mask_bits=64\n
|
||||
A: d3cold_allowed=1\n
|
||||
A: device=0xa12f\n
|
||||
A: dma_mask_bits=64\n
|
||||
L: driver=../../../bus/pci/drivers/xhci_hcd
|
||||
A: driver_override=(null)\n
|
||||
A: enable=1\n
|
||||
L: firmware_node=../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:4c
|
||||
L: iommu=../../virtual/iommu/dmar1
|
||||
L: iommu_group=../../../kernel/iommu_groups/4
|
||||
A: irq=143\n
|
||||
A: local_cpulist=0-7\n
|
||||
A: local_cpus=ff\n
|
||||
A: modalias=pci:v00008086d0000A12Fsv00001028sd000007BEbc0Csc03i30\n
|
||||
A: msi_bus=1\n
|
||||
A: msi_irqs/143=msi\n
|
||||
A: numa_node=-1\n
|
||||
A: pools=poolinfo - 0.1\nbuffer-2048 0 0 2048 0\nbuffer-512 0 0 512 0\nbuffer-128 0 0 128 0\nbuffer-32 0 0 32 0\nxHCI 1KB stream ctx arrays 0 0 1024 0\nxHCI 256 byte stream ctx arrays 0 0 256 0\nxHCI input/output contexts 7 10 2112 10\nxHCI ring segments 30 38 4096 38\nbuffer-2048 0 0 2048 0\nbuffer-512 0 0 512 0\nbuffer-128 0 0 128 0\nbuffer-32 0 0 32 0\n
|
||||
A: power/control=on\n
|
||||
A: power/runtime_active_time=34390988\n
|
||||
A: power/runtime_status=active\n
|
||||
A: power/runtime_suspended_time=0\n
|
||||
A: power/wakeup=enabled\n
|
||||
A: power/wakeup_abort_count=0\n
|
||||
A: power/wakeup_active=0\n
|
||||
A: power/wakeup_active_count=0\n
|
||||
A: power/wakeup_count=0\n
|
||||
A: power/wakeup_expire_count=0\n
|
||||
A: power/wakeup_last_time_ms=0\n
|
||||
A: power/wakeup_max_time_ms=0\n
|
||||
A: power/wakeup_total_time_ms=0\n
|
||||
A: power_state=D0\n
|
||||
A: resource=0x00000000edd10000 0x00000000edd1ffff 0x0000000000140204\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n0x0000000000000000 0x0000000000000000 0x0000000000000000\n
|
||||
A: revision=0x31\n
|
||||
A: subsystem_device=0x07be\n
|
||||
A: subsystem_vendor=0x1028\n
|
||||
A: vendor=0x8086\n
|
||||
|
||||
|
||||
+37
-45
@@ -22,14 +22,6 @@ except Exception as e:
|
||||
|
||||
FPrint = None
|
||||
|
||||
# Re-run the test with the passed wrapper if set
|
||||
wrapper = os.getenv('LIBFPRINT_TEST_WRAPPER')
|
||||
if wrapper:
|
||||
wrap_cmd = wrapper.split(' ') + [sys.executable, os.path.abspath(__file__)] + \
|
||||
sys.argv[1:]
|
||||
os.unsetenv('LIBFPRINT_TEST_WRAPPER')
|
||||
sys.exit(subprocess.check_call(wrap_cmd))
|
||||
|
||||
ctx = GLib.main_context_default()
|
||||
|
||||
|
||||
@@ -123,7 +115,8 @@ class VirtualDeviceBase(unittest.TestCase):
|
||||
def send_command(self, command, *args):
|
||||
self.assertIn(command, ['INSERT', 'REMOVE', 'SCAN', 'ERROR', 'RETRY',
|
||||
'FINGER', 'UNPLUG', 'SLEEP', 'SET_ENROLL_STAGES', 'SET_SCAN_TYPE',
|
||||
'SET_CANCELLATION_ENABLED', 'SET_KEEP_ALIVE', 'IGNORED_COMMAND'])
|
||||
'SET_CANCELLATION_ENABLED', 'SET_KEEP_ALIVE', 'IGNORED_COMMAND',
|
||||
'CONT'])
|
||||
|
||||
with Connection(self.sockaddr) as con:
|
||||
params = ' '.join(str(p) for p in args)
|
||||
@@ -329,7 +322,7 @@ class VirtualDeviceBase(unittest.TestCase):
|
||||
else:
|
||||
self.assertFalse(match)
|
||||
|
||||
if isinstance(scan_nick, str):
|
||||
if isinstance(scan_nick, str) and not self.dev.has_storage():
|
||||
self.assertEqual(self._verify_fp.props.fpi_data.get_string(), scan_nick)
|
||||
|
||||
|
||||
@@ -477,15 +470,8 @@ class VirtualDevice(VirtualDeviceBase):
|
||||
def test_enroll_verify_no_match(self):
|
||||
matching = self.enroll_print('testprint', FPrint.Finger.LEFT_RING)
|
||||
|
||||
if self.dev.has_storage():
|
||||
with self.assertRaises(GLib.Error) as error:
|
||||
self.check_verify(matching, 'not-testprint', match=False,
|
||||
identify=self.dev.supports_identify())
|
||||
self.assertTrue(error.exception.matches(FPrint.DeviceError.quark(),
|
||||
FPrint.DeviceError.DATA_NOT_FOUND))
|
||||
else:
|
||||
self.check_verify(matching, 'not-testprint', match=False,
|
||||
identify=self.dev.supports_identify())
|
||||
self.check_verify(matching, 'not-testprint', match=False,
|
||||
identify=self.dev.supports_identify())
|
||||
|
||||
def test_enroll_verify_error(self):
|
||||
matching = self.enroll_print('testprint', FPrint.Finger.LEFT_RING)
|
||||
@@ -604,14 +590,11 @@ class VirtualDevice(VirtualDeviceBase):
|
||||
FPrint.DeviceRetry.TOO_SHORT))
|
||||
|
||||
self.send_command('SCAN', 'another-id')
|
||||
verify_match, verify_fp = self.dev.verify_sync(enrolled)
|
||||
self.assertFalse(verify_match)
|
||||
if self.dev.has_storage():
|
||||
with self.assertRaises(GLib.GError) as error:
|
||||
self.dev.verify_sync(enrolled)
|
||||
self.assertTrue(error.exception.matches(FPrint.DeviceError.quark(),
|
||||
FPrint.DeviceError.DATA_NOT_FOUND))
|
||||
self.assertIsNone(verify_fp)
|
||||
else:
|
||||
verify_match, verify_fp = self.dev.verify_sync(enrolled)
|
||||
self.assertFalse(verify_match)
|
||||
self.assertFalse(verify_fp.equal(enrolled))
|
||||
|
||||
self.send_auto(enrolled)
|
||||
@@ -828,13 +811,7 @@ class VirtualDevice(VirtualDeviceBase):
|
||||
self.wait_timeout(10)
|
||||
self.assertFalse(self._verify_completed)
|
||||
|
||||
if self.dev.has_storage():
|
||||
with self.assertRaises(GLib.Error) as error:
|
||||
self.complete_verify()
|
||||
self.assertTrue(error.exception.matches(FPrint.DeviceError.quark(),
|
||||
FPrint.DeviceError.DATA_NOT_FOUND))
|
||||
else:
|
||||
self.complete_verify()
|
||||
self.complete_verify()
|
||||
self.assertTrue(self._verify_reported)
|
||||
|
||||
def test_close_error(self):
|
||||
@@ -1014,8 +991,8 @@ class VirtualDeviceStorage(VirtualDevice):
|
||||
|
||||
def cleanup_device_storage(self):
|
||||
if self.dev.is_open() and not self.dev.props.removed:
|
||||
for print in self.dev.list_prints_sync():
|
||||
self.assertTrue(self.dev.delete_print_sync(print, None))
|
||||
self.send_command('CONT')
|
||||
self.dev.clear_storage_sync()
|
||||
|
||||
def test_device_properties(self):
|
||||
self.assertEqual(self.dev.get_driver(), 'virtual_device_storage')
|
||||
@@ -1037,7 +1014,7 @@ class VirtualDeviceStorage(VirtualDevice):
|
||||
self.assertTrue(self.dev.has_feature(FPrint.DeviceFeature.STORAGE))
|
||||
self.assertTrue(self.dev.has_feature(FPrint.DeviceFeature.STORAGE_LIST))
|
||||
self.assertTrue(self.dev.has_feature(FPrint.DeviceFeature.STORAGE_DELETE))
|
||||
self.assertFalse(self.dev.has_feature(FPrint.DeviceFeature.STORAGE_CLEAR))
|
||||
self.assertTrue(self.dev.has_feature(FPrint.DeviceFeature.STORAGE_CLEAR))
|
||||
|
||||
def test_duplicate_enroll(self):
|
||||
self.enroll_print('testprint', FPrint.Finger.LEFT_LITTLE)
|
||||
@@ -1114,6 +1091,27 @@ class VirtualDeviceStorage(VirtualDevice):
|
||||
self.assertTrue(error.exception.matches(FPrint.DeviceError.quark(),
|
||||
FPrint.DeviceError.DATA_NOT_FOUND))
|
||||
|
||||
def test_clear_storage(self):
|
||||
self.send_command('INSERT', 'p1')
|
||||
l = self.dev.list_prints_sync()
|
||||
print(l[0])
|
||||
self.assertEqual(len(l), 1)
|
||||
self.send_command('CONT')
|
||||
self.dev.clear_storage_sync()
|
||||
self.assertFalse(self.dev.list_prints_sync())
|
||||
|
||||
def test_clear_storage_error(self):
|
||||
self.send_command('INSERT', 'p1')
|
||||
l = self.dev.list_prints_sync()
|
||||
print(l[0])
|
||||
self.assertEqual(len(l), 1)
|
||||
|
||||
self.send_error(FPrint.DeviceError.PROTO)
|
||||
with self.assertRaises(GLib.Error) as error:
|
||||
self.dev.clear_storage_sync()
|
||||
self.assertTrue(error.exception.matches(FPrint.DeviceError.quark(),
|
||||
FPrint.DeviceError.PROTO))
|
||||
|
||||
def test_identify_match(self):
|
||||
rt = self.enroll_print('right-thumb', FPrint.Finger.RIGHT_THUMB)
|
||||
lt = self.enroll_print('left-thumb', FPrint.Finger.LEFT_THUMB)
|
||||
@@ -1145,18 +1143,12 @@ class VirtualDeviceStorage(VirtualDevice):
|
||||
FPrint.DeviceError.DATA_NOT_FOUND))
|
||||
|
||||
def test_verify_missing_print(self):
|
||||
with self.assertRaises(GLib.Error) as error:
|
||||
self.check_verify(FPrint.Print.new(self.dev),
|
||||
'not-existing-print', False, identify=False)
|
||||
self.assertTrue(error.exception.matches(FPrint.DeviceError.quark(),
|
||||
FPrint.DeviceError.DATA_NOT_FOUND))
|
||||
self.check_verify(FPrint.Print.new(self.dev),
|
||||
'not-existing-print', False, identify=False)
|
||||
|
||||
def test_identify_missing_print(self):
|
||||
with self.assertRaises(GLib.Error) as error:
|
||||
self.check_verify(FPrint.Print.new(self.dev),
|
||||
'not-existing-print', False, identify=True)
|
||||
self.assertTrue(error.exception.matches(FPrint.DeviceError.quark(),
|
||||
FPrint.DeviceError.DATA_NOT_FOUND))
|
||||
self.check_verify(FPrint.Print.new(self.dev),
|
||||
'not-existing-print', False, identify=True)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
@@ -21,14 +21,6 @@ except Exception as e:
|
||||
|
||||
FPrint = None
|
||||
|
||||
# Re-run the test with the passed wrapper if set
|
||||
wrapper = os.getenv('LIBFPRINT_TEST_WRAPPER')
|
||||
if wrapper:
|
||||
wrap_cmd = wrapper.split(' ') + [sys.executable, os.path.abspath(__file__)] + \
|
||||
sys.argv[1:]
|
||||
os.unsetenv('LIBFPRINT_TEST_WRAPPER')
|
||||
sys.exit(subprocess.check_call(wrap_cmd))
|
||||
|
||||
def load_image(img):
|
||||
png = cairo.ImageSurface.create_from_png(img)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user