aboutsummaryrefslogtreecommitdiff
path: root/test/py/test_request_errors.py
AgeCommit message (Collapse)AuthorFilesLines
2023-09-15adapt to VFIO live migration v2 (#782)William Henderson1-15/+8
This commit adapts the vfio-user protocol specification and the libvfio-user implementation to v2 of the VFIO live migration interface, as used in the kernel and QEMU. The differences between v1 and v2 are discussed in this email thread [1], and we slightly differ from upstream VFIO v2 in that instead of transferring data over a new FD, we use the existing UNIX socket with new commands VFIO_USER_MIG_DATA_READ/WRITE. We also don't yet use P2P states. The updated spec was submitted to qemu-devel [2]. [1] https://lore.kernel.org/all/20220130160826.32449-9-yishaih@nvidia.com/ [2] https://lore.kernel.org/all/20230718094150.110183-1-william.henderson@nutanix.com/ Signed-off-by: William Henderson <william.henderson@nutanix.com>
2023-08-31Introduce client object in python tests (#772)Mattias Nissler1-24/+24
Thus far, the client end of the socket is the only piece of client state tracked in tests, for which a global `socket` variable has been used. In preparation to add more state, replace the `socket` global with a `client` global object that groups all client state. Signed-off-by: Mattias Nissler <mnissler@rivosinc.com> Reviewed-by: John Levon <john.levon@nutanix.com> Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
2022-10-04fix compilation for i386 and ppc64 (#709)Thanos Makatos1-3/+3
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com> Reviewed-by: John Levon <john.levon@nutanix.com> Reported-by: Eduardo Lima <eblima@gmail.com>
2022-02-18test/py: simplify errno handling (#645)John Levon1-1/+1
We explicitly identify the quiesce EBUSY case for msg(), letting us simplify the handling of expected errno. Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2021-11-30introduce device quiesce callback (#609)Thanos Makatos1-4/+113
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com> Reviewed-by: John Leon <john.levon@nutanix.com>
2021-10-22run python code through flake8 (#613)John Levon1-3/+9
Aside from general style goodness, this found a couple of accidental re-definitions, so it's worth taking the pain now. Also, only run rstlint as part of pre-push. Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2021-05-26improve request header handlingJohn Levon1-0/+124
We should require a non-empty payload for every command type except VFIO_USER_DEVICE_RESET. We should also reply to the caller with such failures. Add some testing for is_valid_header(), and move the fd handling test over to it too. Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>