diff options
Diffstat (limited to 'test/py/test_dma_map.py')
-rw-r--r-- | test/py/test_dma_map.py | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/test/py/test_dma_map.py b/test/py/test_dma_map.py index fe48c45..e4ac2ba 100644 --- a/test/py/test_dma_map.py +++ b/test/py/test_dma_map.py @@ -36,31 +36,12 @@ import errno ctx = None -@vfu_dma_register_cb_t -def dma_register(ctx, info): - pass - -@vfu_dma_unregister_cb_t -def dma_unregister(ctx, info): - pass - return 0 - -def test_dma_map_setup(): +def test_dma_region_too_big(): global ctx - ctx = vfu_create_ctx(flags=LIBVFIO_USER_FLAG_ATTACH_NB) + ctx = prepare_ctx_for_dma() assert ctx != None - ret = vfu_pci_init(ctx) - assert ret == 0 - - ret = vfu_setup_device_dma(ctx, dma_register, dma_unregister) - assert ret == 0 - - ret = vfu_realize_ctx(ctx) - assert ret == 0 - -def test_dma_region_too_big(): sock = connect_client(ctx) payload = vfio_user_dma_map(argsz=len(vfio_user_dma_map()), @@ -90,5 +71,5 @@ def test_dma_region_too_many(): disconnect_client(ctx, sock) -def test_dirty_pages_cleanup(): +def test_dma_region_cleanup(): vfu_destroy_ctx(ctx) |