Skip to content

Commit

Permalink
test: add test for nonexistent state
Browse files Browse the repository at this point in the history
Signed-off-by: William Henderson <william.henderson@nutanix.com>
  • Loading branch information
w-henderson committed Aug 11, 2023
1 parent 456730b commit 2be61bc
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/py/test_migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,21 @@ def test_migration_stop_copy_to_pre_copy_blocked():
expect=22)


def test_migration_nonexistent_state():
global ctx, sock

feature = vfio_user_device_feature(
argsz=len(vfio_user_device_feature()) +
len(vfio_user_device_feature_mig_state()),
flags=VFIO_DEVICE_FEATURE_SET | VFIO_DEVICE_FEATURE_MIG_DEVICE_STATE
)
payload = vfio_user_device_feature_mig_state(
device_state=0xabcd
)
msg(ctx, sock, VFIO_USER_DEVICE_FEATURE, bytes(feature) + bytes(payload),
expect=22)


def test_migration_cleanup():
disconnect_client(ctx, sock)
vfu_destroy_ctx(ctx)
Expand Down

0 comments on commit 2be61bc

Please sign in to comment.