Skip to content

Commit e376d95

Browse files
schlacClaudio Imbrenda
authored andcommitted
KVM: s390: selftests: Add has device attr check to uc_attr_mem_limit selftest
Fixup the uc_attr_mem_limit test case to also cover the KVM_HAS_DEVICE_ATTR ioctl. Signed-off-by: Christoph Schlameuss <[email protected]> Tested-by: Hariharan Mari <[email protected]> Reviewed-by: Claudio Imbrenda <[email protected]> Link: https://lore.kernel.org/r/[email protected] Message-ID: <[email protected]> Signed-off-by: Claudio Imbrenda <[email protected]>
1 parent b1da33b commit e376d95

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/testing/selftests/kvm/s390x/ucontrol_test.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,13 @@ TEST_F(uc_kvm, uc_attr_mem_limit)
210210
struct kvm_device_attr attr = {
211211
.group = KVM_S390_VM_MEM_CTRL,
212212
.attr = KVM_S390_VM_MEM_LIMIT_SIZE,
213-
.addr = (unsigned long)&limit,
213+
.addr = (u64)&limit,
214214
};
215215
int rc;
216216

217+
rc = ioctl(self->vm_fd, KVM_HAS_DEVICE_ATTR, &attr);
218+
EXPECT_EQ(0, rc);
219+
217220
rc = ioctl(self->vm_fd, KVM_GET_DEVICE_ATTR, &attr);
218221
EXPECT_EQ(0, rc);
219222
EXPECT_EQ(~0UL, limit);

0 commit comments

Comments
 (0)