From 543c3998073be9a14aa6ecabb3c978e94b007eb0 Mon Sep 17 00:00:00 2001 From: William Henderson Date: Thu, 7 Sep 2023 16:04:33 +0000 Subject: [PATCH] refactor bad python Signed-off-by: William Henderson --- test/py/test_migration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/py/test_migration.py b/test/py/test_migration.py index 92c32925..7370b520 100644 --- a/test/py/test_migration.py +++ b/test/py/test_migration.py @@ -391,7 +391,7 @@ def test_handle_mig_data_read_short_write(): payload = bytes(mig_data_payload(data)) # don't send the last byte - msg(ctx, sock, VFIO_USER_MIG_DATA_READ, payload[0:len(payload) - 1], + msg(ctx, sock, VFIO_USER_MIG_DATA_READ, payload[:-1], expect=errno.EINVAL) @@ -474,7 +474,7 @@ def test_device_feature_short_write(): payload = bytes(payload) # don't send the last byte - msg(ctx, sock, VFIO_USER_DEVICE_FEATURE, payload[0:len(payload) - 1], + msg(ctx, sock, VFIO_USER_DEVICE_FEATURE, payload[:-1], expect=errno.EINVAL)