diff options
author | Jag Raman <jag.raman@oracle.com> | 2022-05-23 08:15:47 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-23 13:15:47 +0100 |
commit | b52bff72d4eb646a453d19e19ddbd13ed6111a09 (patch) | |
tree | 493045e75edc44a0696dfaffd84896a8e0cdaf7f /test/py/test_quiesce.py | |
parent | b427c6084311f0c620bf4afe7746739e8c887977 (diff) | |
download | libvfio-user-b52bff72d4eb646a453d19e19ddbd13ed6111a09.zip libvfio-user-b52bff72d4eb646a453d19e19ddbd13ed6111a09.tar.gz libvfio-user-b52bff72d4eb646a453d19e19ddbd13ed6111a09.tar.bz2 |
libvfio-user.h: sync VFIO_DEVICE_STATE_XXXX definitions with upstream (#690)
Rename VFIO_DEVICE_STATE_XXXX defines as VFIO_DEVICE_STATE_V1_XXXX.
Upstream renamed these variable to be of the XXXX_V1_XXXX format and
switched an enum for VFIO_DEVICE_STATE_XXXX.
Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
Reviewed-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'test/py/test_quiesce.py')
-rw-r--r-- | test/py/test_quiesce.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/py/test_quiesce.py b/test/py/test_quiesce.py index e74eeed..f283ccc 100644 --- a/test/py/test_quiesce.py +++ b/test/py/test_quiesce.py @@ -202,10 +202,10 @@ def test_allowed_funcs_in_quiesed_migration(mock_quiesce, global ctx, sock _map_dma_region(ctx, sock) - data = VFIO_DEVICE_STATE_SAVING.to_bytes(c.sizeof(c.c_int), 'little') + data = VFIO_DEVICE_STATE_V1_SAVING.to_bytes(c.sizeof(c.c_int), 'little') write_region(ctx, sock, VFU_PCI_DEV_MIGR_REGION_IDX, offset=0, count=len(data), data=data) - mock_trans.assert_called_once_with(ctx, VFIO_DEVICE_STATE_SAVING) + mock_trans.assert_called_once_with(ctx, VFIO_DEVICE_STATE_V1_SAVING) @patch('libvfio_user.migr_trans_cb', side_effect=_side_effect) @@ -216,13 +216,13 @@ def test_allowed_funcs_in_quiesed_migration_busy(mock_quiesce, global ctx, sock _map_dma_region(ctx, sock) mock_quiesce.side_effect = fail_with_errno(errno.EBUSY) - data = VFIO_DEVICE_STATE_STOP.to_bytes(c.sizeof(c.c_int), 'little') + data = VFIO_DEVICE_STATE_V1_STOP.to_bytes(c.sizeof(c.c_int), 'little') write_region(ctx, sock, VFU_PCI_DEV_MIGR_REGION_IDX, offset=0, count=len(data), data=data, rsp=False, busy=True) ret = vfu_device_quiesced(ctx, 0) assert ret == 0 - mock_trans.assert_called_once_with(ctx, VFIO_DEVICE_STATE_STOP) + mock_trans.assert_called_once_with(ctx, VFIO_DEVICE_STATE_V1_STOP) @patch('libvfio_user.reset_cb', side_effect=_side_effect) |