diff options
author | Claudio Imbrenda <imbrenda@linux.ibm.com> | 2025-01-23 17:46:16 +0300 |
---|---|---|
committer | Claudio Imbrenda <imbrenda@linux.ibm.com> | 2025-01-31 14:03:52 +0300 |
commit | 63e71519891024b622d00c486c4d0348c44ca911 (patch) | |
tree | bfe1874446091f205a1a7f6328734361fc66eb10 /tools | |
parent | 413c98f24c63b3b8aff202fce6f01e8950730511 (diff) | |
download | linux-63e71519891024b622d00c486c4d0348c44ca911.tar.xz |
KVM: s390: selftests: fix ucontrol memory region test
With the latest patch, attempting to create a memslot from userspace
will result in an EEXIST error for UCONTROL VMs, instead of EINVAL,
since the new memslot will collide with the internal memslot. There is
no simple way to bring back the previous behaviour.
This is not a problem, but the test needs to be fixed accordingly.
Reviewed-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
Link: https://lore.kernel.org/r/20250123144627.312456-5-imbrenda@linux.ibm.com
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Message-ID: <20250123144627.312456-5-imbrenda@linux.ibm.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/kvm/s390/ucontrol_test.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/testing/selftests/kvm/s390/ucontrol_test.c b/tools/testing/selftests/kvm/s390/ucontrol_test.c index 135ee22856cf..22ce9219620c 100644 --- a/tools/testing/selftests/kvm/s390/ucontrol_test.c +++ b/tools/testing/selftests/kvm/s390/ucontrol_test.c @@ -459,10 +459,14 @@ TEST_F(uc_kvm, uc_no_user_region) }; ASSERT_EQ(-1, ioctl(self->vm_fd, KVM_SET_USER_MEMORY_REGION, ®ion)); - ASSERT_EQ(EINVAL, errno); + ASSERT_TRUE(errno == EEXIST || errno == EINVAL) + TH_LOG("errno %s (%i) not expected for ioctl KVM_SET_USER_MEMORY_REGION", + strerror(errno), errno); ASSERT_EQ(-1, ioctl(self->vm_fd, KVM_SET_USER_MEMORY_REGION2, ®ion2)); - ASSERT_EQ(EINVAL, errno); + ASSERT_TRUE(errno == EEXIST || errno == EINVAL) + TH_LOG("errno %s (%i) not expected for ioctl KVM_SET_USER_MEMORY_REGION2", + strerror(errno), errno); } TEST_F(uc_kvm, uc_map_unmap) |