aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt2
-rw-r--r--test/py/libvfio_user.py3
-rw-r--r--test/py/test_vfu_create_ctx.py2
3 files changed, 6 insertions, 1 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 7f94212..2f085b8 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -44,6 +44,8 @@ add_executable(unit-tests unit-tests.c mocks.c
../lib/migration.c
../lib/pci.c
../lib/pci_caps.c
+ ../lib/tran.c
+ ../lib/tran_pipe.c
../lib/tran_sock.c)
target_link_libraries(unit-tests PUBLIC cmocka dl json-c)
diff --git a/test/py/libvfio_user.py b/test/py/libvfio_user.py
index dda4038..c96b1bc 100644
--- a/test/py/libvfio_user.py
+++ b/test/py/libvfio_user.py
@@ -121,6 +121,9 @@ VFIO_DEVICE_STATE_MASK = ((1 << 3) - 1)
# libvfio-user defines
VFU_TRANS_SOCK = 0
+VFU_TRANS_PIPE = 1
+VFU_TRANS_MAX = 2
+
LIBVFIO_USER_FLAG_ATTACH_NB = (1 << 0)
VFU_DEV_TYPE_PCI = 0
diff --git a/test/py/test_vfu_create_ctx.py b/test/py/test_vfu_create_ctx.py
index cb1448f..720a3fa 100644
--- a/test/py/test_vfu_create_ctx.py
+++ b/test/py/test_vfu_create_ctx.py
@@ -33,7 +33,7 @@ import errno
def test_vfu_create_ctx_bad_trans():
- ctx = vfu_create_ctx(trans=VFU_TRANS_SOCK + 1)
+ ctx = vfu_create_ctx(trans=VFU_TRANS_MAX)
assert ctx is None
assert c.get_errno() == errno.ENOTSUP