diff options
author | Zenghui Yu <yuzenghui@huawei.com> | 2022-10-09 05:31:31 +0200 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2022-10-10 10:41:39 +0200 |
commit | 8a6ffcbe26fd14d58075dcf3cbdf1b5b69b20402 (patch) | |
tree | b0435f1da94620b5c4858bafd123e5c488883345 /tools | |
parent | KVM: arm64: Enable stack protection and branch profiling for VHE (diff) | |
download | linux-8a6ffcbe26fd14d58075dcf3cbdf1b5b69b20402.tar.xz linux-8a6ffcbe26fd14d58075dcf3cbdf1b5b69b20402.zip |
KVM: arm64: selftests: Fix multiple versions of GIC creation
Commit 98f94ce42ac6 ("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: 98f94ce42ac6 ("KVM: selftests: Move KVM_CREATE_DEVICE_TEST code to separate helper")
Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20221009033131.365-1-yuzenghui@huawei.com
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/kvm/aarch64/vgic_init.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/kvm/aarch64/vgic_init.c b/tools/testing/selftests/kvm/aarch64/vgic_init.c index e05ecb31823f..9c131d977a1b 100644 --- a/tools/testing/selftests/kvm/aarch64/vgic_init.c +++ b/tools/testing/selftests/kvm/aarch64/vgic_init.c @@ -662,8 +662,8 @@ int test_kvm_device(uint32_t gic_dev_type) : KVM_DEV_TYPE_ARM_VGIC_V2; if (!__kvm_test_create_device(v.vm, other)) { - ret = __kvm_test_create_device(v.vm, other); - TEST_ASSERT(ret && (errno == EINVAL || errno == EEXIST), + ret = __kvm_create_device(v.vm, other); + TEST_ASSERT(ret < 0 && (errno == EINVAL || errno == EEXIST), "create GIC device while other version exists"); } |