aboutsummaryrefslogtreecommitdiff
path: root/test/py/test_dma_map.py
diff options
context:
space:
mode:
authorJohn Levon <john.levon@nutanix.com>2022-05-27 19:06:31 +0100
committerGitHub <noreply@github.com>2022-05-27 19:06:31 +0100
commit188cd00c520855615331d35c087a22215767b8fb (patch)
tree8bda987bcdeb1c8cf0751dbe190a28aef2609272 /test/py/test_dma_map.py
parent538d6063c9f8d395e1d38285ddfe405c3fcd7619 (diff)
downloadlibvfio-user-188cd00c520855615331d35c087a22215767b8fb.zip
libvfio-user-188cd00c520855615331d35c087a22215767b8fb.tar.gz
libvfio-user-188cd00c520855615331d35c087a22215767b8fb.tar.bz2
re-work SGL API (#675)
Harmonize and rename the vfu_*sg() APIs to better reflect their functionality: in our case, there is no mapping happening as part of these calls, they are merely housekeeping for range splitting, dirty tracking, and so on. Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'test/py/test_dma_map.py')
-rw-r--r--test/py/test_dma_map.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/py/test_dma_map.py b/test/py/test_dma_map.py
index f33d110..e8ce8f2 100644
--- a/test/py/test_dma_map.py
+++ b/test/py/test_dma_map.py
@@ -119,7 +119,7 @@ def test_dma_map_busy(mock_dma_register, mock_quiesce):
mock_dma_register.assert_called_once()
# check that the DMA region has been added
- count, sgs = vfu_addr_to_sg(ctx, 0x10000, 0x1000)
+ count, sgs = vfu_addr_to_sgl(ctx, 0x10000, 0x1000)
assert len(sgs) == 1
sg = sgs[0]
assert sg.dma_addr == 0x10000 and sg.region == 0 and sg.length == 0x1000 \
@@ -224,7 +224,7 @@ def test_dma_map_busy_reply_fail(mock_dma_register, mock_quiesce, mock_reset):
mock_reset.assert_called_once()
# check that the DMA region was NOT added
- count, sgs = vfu_addr_to_sg(ctx, 0x10000, 0x1000)
+ count, sgs = vfu_addr_to_sgl(ctx, 0x10000, 0x1000)
assert count == -1
assert c.get_errno() == errno.ENOENT