aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2022-07-28 15:15:50 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2022-07-28 15:15:50 +1000
commitd11d44f5b6d2243b8baa57ed436508a200c1a837 (patch)
treede33c4c2def3273b074dba16324f276e9e2e87a4 /tools
parent355f4b5774ffb3dd144b5de6aaffe4e8f10ff629 (diff)
parent0982c8d859f8f7022b9fd44d421c7ec721bb41f9 (diff)
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git
# Conflicts: # tools/testing/selftests/kvm/aarch64/vgic_init.c
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/kvm/aarch64/vgic_init.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/tools/testing/selftests/kvm/aarch64/vgic_init.c b/tools/testing/selftests/kvm/aarch64/vgic_init.c
index e8cab9840aa3..8a51e76ee899 100644
--- a/tools/testing/selftests/kvm/aarch64/vgic_init.c
+++ b/tools/testing/selftests/kvm/aarch64/vgic_init.c
@@ -663,7 +663,7 @@ int test_kvm_device(uint32_t gic_dev_type)
if (!__kvm_test_create_device(v.vm, other)) {
ret = __kvm_test_create_device(v.vm, other);
- TEST_ASSERT(ret && errno == EINVAL,
+ TEST_ASSERT(ret && (errno == EINVAL || errno == EEXIST),
"create GIC device while other version exists");
}
@@ -691,6 +691,7 @@ int main(int ac, char **av)
{
int ret;
int pa_bits;
+ int cnt_impl = 0;
pa_bits = vm_guest_mode_params[VM_MODE_DEFAULT].pa_bits;
max_phys_size = 1ULL << pa_bits;
@@ -699,13 +700,17 @@ int main(int ac, char **av)
if (!ret) {
pr_info("Running GIC_v3 tests.\n");
run_tests(KVM_DEV_TYPE_ARM_VGIC_V3);
- return 0;
+ cnt_impl++;
}
ret = test_kvm_device(KVM_DEV_TYPE_ARM_VGIC_V2);
- __TEST_REQUIRE(!ret, "No GICv2 nor GICv3 support");
+ if (!ret) {
+ pr_info("Running GIC_v2 tests.\n");
+ run_tests(KVM_DEV_TYPE_ARM_VGIC_V2);
+ cnt_impl++;
+ }
+
+ __TEST_REQUIRE(!cnt_impl, "No GICv2 nor GICv3 support");
- pr_info("Running GIC_v2 tests.\n");
- run_tests(KVM_DEV_TYPE_ARM_VGIC_V2);
return 0;
}