mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2026-05-11 08:28:08 +02:00
Generate the umockdev ioctl recording for self test
This commit is contained in:
parent
6667a32a07
commit
3428f5348d
6 changed files with 403 additions and 5 deletions
|
|
@ -34,6 +34,7 @@ struct _FpiDeviceCrfpMoc
|
|||
FpiSsm *task_ssm;
|
||||
GCancellable *interrupt_cancellable;
|
||||
int fd;
|
||||
int emul_fd;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (FpiDeviceCrfpMoc, fpi_device_crfpmoc, FP_TYPE_DEVICE)
|
||||
|
|
@ -224,6 +225,45 @@ crfpmoc_get_print_data (FpPrint *print, guint8 **template,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
crfpmoc_umockdev_record (FpiDeviceCrfpMoc *self, int res,
|
||||
int cmd, void *arg)
|
||||
{
|
||||
gchar *buffer;
|
||||
gsize size, bufsiz, len;
|
||||
struct crfpmoc_cros_ec_command_v2 *s_cmd =
|
||||
(struct crfpmoc_cros_ec_command_v2 *) arg;
|
||||
guchar *ptr = (guchar *) arg;
|
||||
|
||||
if (self->emul_fd == -1)
|
||||
return;
|
||||
|
||||
switch (cmd)
|
||||
{
|
||||
case CRFPMOC_CROS_EC_DEV_IOCXCMD_V2:
|
||||
size = (sizeof (*s_cmd) + s_cmd->insize);
|
||||
bufsiz = size * 2 + 48;
|
||||
buffer = g_malloc (bufsiz);
|
||||
len = snprintf (buffer, bufsiz, "CROS_EC_DEV_IOCXCMD_V2 %u ",
|
||||
s_cmd->insize);
|
||||
g_assert (len < 48);
|
||||
while (size > 0)
|
||||
{
|
||||
len += snprintf (&buffer[len], bufsiz - len, "%02X", *ptr++);
|
||||
size--;
|
||||
}
|
||||
g_assert (len < bufsiz);
|
||||
buffer[len++] = '\n';
|
||||
if (write (self->emul_fd, buffer, len) != len)
|
||||
fp_dbg ("emulation trace write failed");
|
||||
g_free (buffer);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
crfpmoc_ec_command (FpiDeviceCrfpMoc *self, int command,
|
||||
int version, const void *outdata,
|
||||
|
|
@ -249,6 +289,8 @@ crfpmoc_ec_command (FpiDeviceCrfpMoc *self, int command,
|
|||
memcpy (s_cmd->data, outdata, outsize);
|
||||
|
||||
r = ioctl (self->fd, CRFPMOC_CROS_EC_DEV_IOCXCMD_V2, s_cmd);
|
||||
crfpmoc_umockdev_record (self, r, CRFPMOC_CROS_EC_DEV_IOCXCMD_V2, s_cmd);
|
||||
|
||||
if (r < 0)
|
||||
{
|
||||
fp_warn ("ioctl %d, errno %d (%s), EC result %d (%s)", r, errno,
|
||||
|
|
@ -260,8 +302,8 @@ crfpmoc_ec_command (FpiDeviceCrfpMoc *self, int command,
|
|||
memcpy (indata, s_cmd->data, MIN (r, insize));
|
||||
if (s_cmd->result != EC_RES_SUCCESS)
|
||||
{
|
||||
fp_warn ("EC result %d (%s)", s_cmd->result,
|
||||
crfpmoc_strresult (s_cmd->result));
|
||||
fp_dbg ("EC result %d (%s)", s_cmd->result,
|
||||
crfpmoc_strresult (s_cmd->result));
|
||||
r = -CRFPMOC_EECRESULT - s_cmd->result;
|
||||
}
|
||||
}
|
||||
|
|
@ -831,6 +873,13 @@ crfpmoc_open (FpDevice *device)
|
|||
|
||||
self->fd = fd;
|
||||
|
||||
/* For testing we need to create the umockdev trace file ourselves
|
||||
* since there is no record support. There is playback support.
|
||||
*/
|
||||
self->emul_fd = -1;
|
||||
if (g_strcmp0 (g_getenv ("FP_DEVICE_EMULATION"), "1") == 0)
|
||||
self->emul_fd = creat ("/tmp/crfpmoc.ioctl", 0777);
|
||||
|
||||
fpi_device_open_complete (device, NULL);
|
||||
}
|
||||
|
||||
|
|
@ -893,6 +942,11 @@ crfpmoc_close (FpDevice *device)
|
|||
close (self->fd);
|
||||
self->fd = -1;
|
||||
}
|
||||
if (self->emul_fd >= 0)
|
||||
{
|
||||
close (self->emul_fd);
|
||||
self->emul_fd = -1;
|
||||
}
|
||||
fpi_device_close_complete (device, NULL);
|
||||
}
|
||||
|
||||
|
|
@ -1478,7 +1532,6 @@ crfpmoc_clear_storage (FpDevice *device)
|
|||
static void
|
||||
fpi_device_crfpmoc_init (FpiDeviceCrfpMoc *self)
|
||||
{
|
||||
G_DEBUG_HERE ();
|
||||
self->fd = -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -139,11 +139,12 @@ if os.path.exists(os.path.join(test_dir, "custom.py")):
|
|||
capture_file = "custom.ioctl"
|
||||
cmd = ['umockdev-record', '--ioctl', f'{misc_device}={os.path.join(test_dir, capture_file)}'] + cmd
|
||||
|
||||
print(f'cmd={cmd}')
|
||||
with subprocess.Popen(cmd) as capture_process:
|
||||
capture_process.wait()
|
||||
if capture_process.returncode != 0:
|
||||
print('Failed to capture fingerprint')
|
||||
if usb_device:
|
||||
if not misc_device:
|
||||
os.killpg(capture_pid, signal.SIGKILL)
|
||||
sys.exit(1)
|
||||
|
||||
|
|
|
|||
137
tests/crfpmoc/custom.ioctl
Normal file
137
tests/crfpmoc/custom.ioctl
Normal file
|
|
@ -0,0 +1,137 @@
|
|||
@DEV /dev/cros_fp
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000080000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000080000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000080000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 8 00000000090400000000000008000000000000000100000001000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0100000006040000240000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0100000006040000240000000000000010000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0100000006040000240000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000030000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000010000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000030000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000010000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000030000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000010000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000030000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000010000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000030000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 48 010000000304000000000000300000000000000046504320090000001F020000010000009466000047524559A000A0000800FF0324140000050001000100000004000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 12 000000000B000000000000000C00000000000000080000002002200201000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 12 000000000B000000000000000C00000000000000080000002002200201000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 48 010000000304000000000000300000000000000046504320090000001F020000010000009466000047524559A000A0000800FF0324140000050001000100000004000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 252 000000000404000008000000FC00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 252 000000000404000008000000FC00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 252 000000000404000008000000FC00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 252 000000000404000008000000FC00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 252 000000000404000008000000FC00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 252 000000000404000008000000FC00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 252 000000000404000008000000FC00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 252 000000000404000008000000FC00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 252 000000000404000008000000FC00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 252 000000000404000008000000FC00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 252 000000000404000008000000FC00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 252 000000000404000008000000FC00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 252 000000000404000008000000FC00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 252 000000000404000008000000FC00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 252 000000000404000008000000FC00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 252 000000000404000008000000FC00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 252 000000000404000008000000FC00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 252 000000000404000008000000FC00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 252 000000000404000008000000FC00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 252 000000000404000008000000FC00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 116 00000000040400000800000074000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000080000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000080000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000080000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 8 00000000090400000000000008000000000000000100000001000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0100000006040000240000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0100000006040000240000000000000010000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0100000006040000240000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 00000000050400007C0000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000002000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000002000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000002000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000040000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000040000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000040000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000040000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000040000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 48 010000000304000000000000300000000000000046504320090000001F020000010000009466000047524559A000A0000800FF0324140000050001000100000004000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 22 0000000007040000000000001600000000000000C07001006CF50200406B0400D4471CCB240000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000080000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000080000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000080000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 8 00000000090400000000000008000000000000000100000001000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0100000006040000240000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0100000006040000240000000000000010000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0100000006040000240000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 0000000005040000F80000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 0 00000000050400007C0000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000002000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000002000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000002000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000040000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000040000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000040000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000040000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000040000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 48 010000000304000000000000300000000000000046504320090000001F020000010000009466000047524559A000A0000800FF0324140000050001000100000004000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 22 0000000007040000000000001600000000000000C0700100A4F40200786A0400A8AE2CCB240000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000080000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000080000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000080000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000000000000
|
||||
CROS_EC_DEV_IOCXCMD_V2 4 000000000204000004000000040000000000000000000000
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
import traceback
|
||||
import sys
|
||||
import gi
|
||||
import os
|
||||
|
||||
gi.require_version('FPrint', '2.0')
|
||||
from gi.repository import FPrint, GLib
|
||||
|
|
@ -61,6 +62,7 @@ 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")
|
||||
|
||||
print(verify_res, verify_print)
|
||||
assert verify_res == True
|
||||
|
||||
|
|
|
|||
205
tests/crfpmoc/device
Normal file
205
tests/crfpmoc/device
Normal file
|
|
@ -0,0 +1,205 @@
|
|||
P: /devices/pci0000:00/0000:00:1e.3/pxa2xx-spi.8/spi_master/spi1/spi-PRP0001:01/cros-ec-dev.2.auto/misc/cros_fp
|
||||
N: cros_fp
|
||||
E: DEVNAME=/dev/cros_fp
|
||||
E: MAJOR=10
|
||||
E: MINOR=120
|
||||
E: SUBSYSTEM=misc
|
||||
A: dev=10:120\n
|
||||
L: device=../../../cros-ec-dev.2.auto
|
||||
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.3/pxa2xx-spi.8/spi_master/spi1/spi-PRP0001:01/cros-ec-dev.2.auto
|
||||
E: DRIVER=cros-ec-dev
|
||||
E: ID_PATH=pci-0000:00:1e.3-platform-pxa2xx-spi.8-cs-01-platform-cros-ec-dev.2.auto
|
||||
E: ID_PATH_TAG=pci-0000_00_1e_3-platform-pxa2xx-spi_8-cs-01-platform-cros-ec-dev_2_auto
|
||||
E: MODALIAS=platform:cros-ec-dev
|
||||
E: SUBSYSTEM=platform
|
||||
L: driver=../../../../../../../../bus/platform/drivers/cros-ec-dev
|
||||
A: driver_override=(null)\n
|
||||
A: modalias=platform:cros-ec-dev\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
|
||||
|
||||
P: /devices/pci0000:00/0000:00:1e.3/pxa2xx-spi.8/spi_master/spi1/spi-PRP0001:01
|
||||
E: DRIVER=cros-ec-spi
|
||||
E: MODALIAS=of:NcrfpTCgoogle,cros-ec-spi
|
||||
E: SUBSYSTEM=spi
|
||||
L: driver=../../../../../../../bus/spi/drivers/cros-ec-spi
|
||||
A: driver_override=\n
|
||||
L: firmware_node=../../../../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:1b/PRP0001:01
|
||||
A: modalias=of:NcrfpTCgoogle,cros-ec-spi\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: power/wakeup=enabled\n
|
||||
A: power/wakeup_abort_count=0\n
|
||||
A: power/wakeup_active=0\n
|
||||
A: power/wakeup_active_count=785\n
|
||||
A: power/wakeup_count=0\n
|
||||
A: power/wakeup_expire_count=0\n
|
||||
A: power/wakeup_last_time_ms=153464742\n
|
||||
A: power/wakeup_max_time_ms=0\n
|
||||
A: power/wakeup_total_time_ms=0\n
|
||||
A: statistics/bytes=4561436\n
|
||||
A: statistics/bytes_rx=4561436\n
|
||||
A: statistics/bytes_tx=962795\n
|
||||
A: statistics/errors=0\n
|
||||
A: statistics/messages=152584\n
|
||||
A: statistics/spi_async=0\n
|
||||
A: statistics/spi_sync=152584\n
|
||||
A: statistics/spi_sync_immediate=152584\n
|
||||
A: statistics/timedout=0\n
|
||||
A: statistics/transfer_bytes_histo_0-1=28757\n
|
||||
A: statistics/transfer_bytes_histo_1024-2047=0\n
|
||||
A: statistics/transfer_bytes_histo_128-255=585\n
|
||||
A: statistics/transfer_bytes_histo_16-31=1443\n
|
||||
A: statistics/transfer_bytes_histo_16384-32767=0\n
|
||||
A: statistics/transfer_bytes_histo_2-3=380\n
|
||||
A: statistics/transfer_bytes_histo_2048-4095=0\n
|
||||
A: statistics/transfer_bytes_histo_256-511=3192\n
|
||||
A: statistics/transfer_bytes_histo_32-63=89947\n
|
||||
A: statistics/transfer_bytes_histo_32768-65535=0\n
|
||||
A: statistics/transfer_bytes_histo_4-7=1494\n
|
||||
A: statistics/transfer_bytes_histo_4096-8191=0\n
|
||||
A: statistics/transfer_bytes_histo_512-1023=711\n
|
||||
A: statistics/transfer_bytes_histo_64-127=686\n
|
||||
A: statistics/transfer_bytes_histo_65536+=0\n
|
||||
A: statistics/transfer_bytes_histo_8-15=25389\n
|
||||
A: statistics/transfer_bytes_histo_8192-16383=0\n
|
||||
A: statistics/transfers=152584\n
|
||||
A: statistics/transfers_split_maxsize=0\n
|
||||
|
||||
P: /devices/pci0000:00/0000:00:1e.3/pxa2xx-spi.8/spi_master/spi1
|
||||
E: SUBSYSTEM=spi_master
|
||||
L: device=../../../pxa2xx-spi.8
|
||||
L: firmware_node=../../../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:1b
|
||||
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
|
||||
L: software_node=../../../../../../kernel/software_nodes/node3
|
||||
A: statistics/bytes=4561436\n
|
||||
A: statistics/bytes_rx=4561436\n
|
||||
A: statistics/bytes_tx=962795\n
|
||||
A: statistics/errors=0\n
|
||||
A: statistics/messages=152584\n
|
||||
A: statistics/spi_async=0\n
|
||||
A: statistics/spi_sync=152584\n
|
||||
A: statistics/spi_sync_immediate=152584\n
|
||||
A: statistics/timedout=0\n
|
||||
A: statistics/transfer_bytes_histo_0-1=28757\n
|
||||
A: statistics/transfer_bytes_histo_1024-2047=0\n
|
||||
A: statistics/transfer_bytes_histo_128-255=585\n
|
||||
A: statistics/transfer_bytes_histo_16-31=1443\n
|
||||
A: statistics/transfer_bytes_histo_16384-32767=0\n
|
||||
A: statistics/transfer_bytes_histo_2-3=380\n
|
||||
A: statistics/transfer_bytes_histo_2048-4095=0\n
|
||||
A: statistics/transfer_bytes_histo_256-511=3192\n
|
||||
A: statistics/transfer_bytes_histo_32-63=89947\n
|
||||
A: statistics/transfer_bytes_histo_32768-65535=0\n
|
||||
A: statistics/transfer_bytes_histo_4-7=1494\n
|
||||
A: statistics/transfer_bytes_histo_4096-8191=0\n
|
||||
A: statistics/transfer_bytes_histo_512-1023=711\n
|
||||
A: statistics/transfer_bytes_histo_64-127=686\n
|
||||
A: statistics/transfer_bytes_histo_65536+=0\n
|
||||
A: statistics/transfer_bytes_histo_8-15=25389\n
|
||||
A: statistics/transfer_bytes_histo_8192-16383=0\n
|
||||
A: statistics/transfers=152584\n
|
||||
A: statistics/transfers_split_maxsize=0\n
|
||||
A: waiting_for_supplier=0\n
|
||||
|
||||
P: /devices/pci0000:00/0000:00:1e.3/pxa2xx-spi.8
|
||||
E: DEVTYPE=mfd_device
|
||||
E: DRIVER=pxa2xx-spi
|
||||
E: ID_PATH=pci-0000:00:1e.3-platform-pxa2xx-spi.8
|
||||
E: ID_PATH_TAG=pci-0000_00_1e_3-platform-pxa2xx-spi_8
|
||||
E: MODALIAS=platform:pxa2xx-spi
|
||||
E: SUBSYSTEM=platform
|
||||
L: driver=../../../../bus/platform/drivers/pxa2xx-spi
|
||||
A: driver_override=(null)\n
|
||||
L: firmware_node=../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:1b
|
||||
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=1159131\n
|
||||
A: power/runtime_enabled=enabled\n
|
||||
A: power/runtime_status=suspended\n
|
||||
A: power/runtime_suspended_time=153162174\n
|
||||
A: power/runtime_usage=0\n
|
||||
L: software_node=../../../../kernel/software_nodes/node3
|
||||
|
||||
P: /devices/pci0000:00/0000:00:1e.3
|
||||
E: DRIVER=intel-lpss
|
||||
E: ID_MODEL_FROM_DATABASE=Tiger Lake-LP Serial IO SPI Controller
|
||||
E: ID_PATH=pci-0000:00:1e.3
|
||||
E: ID_PATH_TAG=pci-0000_00_1e_3
|
||||
E: ID_PCI_CLASS_FROM_DATABASE=Serial bus controller
|
||||
E: ID_PCI_SUBCLASS_FROM_DATABASE=Serial bus controller
|
||||
E: ID_VENDOR_FROM_DATABASE=Intel Corporation
|
||||
E: MODALIAS=pci:v00008086d0000A0ABsv00008086sd00007270bc0Csc80i00
|
||||
E: PCI_CLASS=C8000
|
||||
E: PCI_ID=8086:A0AB
|
||||
E: PCI_SLOT_NAME=0000:00:1e.3
|
||||
E: PCI_SUBSYS_ID=8086:7270
|
||||
E: SUBSYSTEM=pci
|
||||
A: ari_enabled=0\n
|
||||
A: broken_parity_status=0\n
|
||||
A: class=0x0c8000\n
|
||||
H: config=8680ABA0060010002000800C100080000450F57F00000000000000000000000000000000000000000000000086807072000000008000000000000000FF04000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000019003000B0000000000000000000000090014F01000400101210000C124000000080F00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000B50F210100000000
|
||||
A: consistent_dma_mask_bits=64\n
|
||||
A: d3cold_allowed=1\n
|
||||
A: device=0xa0ab\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:1b
|
||||
L: iommu=../../virtual/iommu/dmar1
|
||||
L: iommu_group=../../../kernel/iommu_groups/13
|
||||
A: irq=37\n
|
||||
A: local_cpulist=0-7\n
|
||||
A: local_cpus=ff\n
|
||||
A: modalias=pci:v00008086d0000A0ABsv00008086sd00007270bc0Csc80i00\n
|
||||
A: msi_bus=1\n
|
||||
A: numa_node=-1\n
|
||||
A: pools=poolinfo - 0.1\ndma8chan1 0 102 40 1\ndma8chan0 0 102 40 1\n
|
||||
A: power/async=enabled\n
|
||||
A: power/control=auto\n
|
||||
A: power/pm_qos_latency_tolerance_us=auto\n
|
||||
A: power/runtime_active_kids=0\n
|
||||
A: power/runtime_active_time=1613046\n
|
||||
A: power/runtime_enabled=enabled\n
|
||||
A: power/runtime_status=suspended\n
|
||||
A: power/runtime_suspended_time=152711240\n
|
||||
A: power/runtime_usage=0\n
|
||||
A: power_state=D3hot\n
|
||||
A: resource=0x000000007ff55000 0x000000007ff55fff 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=0x20\n
|
||||
A: subsystem_device=0x7270\n
|
||||
A: subsystem_vendor=0x8086\n
|
||||
A: vendor=0x8086\n
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ drivers_tests = [
|
|||
'realtek',
|
||||
'realtek-5816',
|
||||
'focaltech_moc',
|
||||
# 'crfpmoc',
|
||||
'crfpmoc',
|
||||
]
|
||||
|
||||
if get_option('introspection')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue