Skip to content

Commit 8a6ffcb

Browse files
Zenghui YuMarc Zyngier
authored andcommitted
KVM: arm64: selftests: Fix multiple versions of GIC creation
Commit 98f94ce ("KVM: selftests: Move KVM_CREATE_DEVICE_TEST code to separate helper") wrongly converted a "real" GIC device creation to __kvm_test_create_device() and caused the test failure on my D05 (which supports v2 emulation). Fix it. Fixes: 98f94ce ("KVM: selftests: Move KVM_CREATE_DEVICE_TEST code to separate helper") Signed-off-by: Zenghui Yu <[email protected]> Reviewed-by: Oliver Upton <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 837d632 commit 8a6ffcb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/testing/selftests/kvm/aarch64/vgic_init.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,8 +662,8 @@ int test_kvm_device(uint32_t gic_dev_type)
662662
: KVM_DEV_TYPE_ARM_VGIC_V2;
663663

664664
if (!__kvm_test_create_device(v.vm, other)) {
665-
ret = __kvm_test_create_device(v.vm, other);
666-
TEST_ASSERT(ret && (errno == EINVAL || errno == EEXIST),
665+
ret = __kvm_create_device(v.vm, other);
666+
TEST_ASSERT(ret < 0 && (errno == EINVAL || errno == EEXIST),
667667
"create GIC device while other version exists");
668668
}
669669

0 commit comments

Comments
 (0)