Skip to content

Commit

Permalink
KVM: s390: selftests: Add has device attr check to uc_attr_mem_limit …
Browse files Browse the repository at this point in the history
…selftest

Fixup the uc_attr_mem_limit test case to also cover the
KVM_HAS_DEVICE_ATTR ioctl.

Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
Tested-by: Hariharan Mari <hari55@linux.ibm.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Link: https://lore.kernel.org/r/20241216092140.329196-7-schlameuss@linux.ibm.com
Message-ID: <20241216092140.329196-7-schlameuss@linux.ibm.com>
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
  • Loading branch information
Christoph Schlameuss authored and Claudio Imbrenda committed Jan 7, 2025
1 parent b1da33b commit e376d95
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/testing/selftests/kvm/s390x/ucontrol_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,13 @@ TEST_F(uc_kvm, uc_attr_mem_limit)
struct kvm_device_attr attr = {
.group = KVM_S390_VM_MEM_CTRL,
.attr = KVM_S390_VM_MEM_LIMIT_SIZE,
.addr = (unsigned long)&limit,
.addr = (u64)&limit,
};
int rc;

rc = ioctl(self->vm_fd, KVM_HAS_DEVICE_ATTR, &attr);
EXPECT_EQ(0, rc);

rc = ioctl(self->vm_fd, KVM_GET_DEVICE_ATTR, &attr);
EXPECT_EQ(0, rc);
EXPECT_EQ(~0UL, limit);
Expand Down

0 comments on commit e376d95

Please sign in to comment.