From b52bff72d4eb646a453d19e19ddbd13ed6111a09 Mon Sep 17 00:00:00 2001 From: Jag Raman Date: Mon, 23 May 2022 08:15:47 -0400 Subject: 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 Reviewed-by: John Levon Reviewed-by: Thanos Makatos --- test/py/test_quiesce.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/py/test_quiesce.py') 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) -- cgit v1.1