]> git.baikalelectronics.ru Git - kernel.git/commitdiff
KVM: s390: selftests: Fix memop extension capability check
authorJanis Schoetterl-Glausch <scgl@linux.ibm.com>
Tue, 14 Jun 2022 16:26:35 +0000 (18:26 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 15 Jun 2022 12:07:51 +0000 (08:07 -0400)
Fix the inverted logic of the memop extension capability check.

Fixes: 8cf15235f6e5 ("KVM: s390: selftests: Use TAP interface in the memop test")
Signed-off-by: Janis Schoetterl-Glausch <scgl@linux.ibm.com>
Message-Id: <20220614162635.3445019-1-scgl@linux.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/s390x/memop.c

index a8f9b74b91449fc5fd048b056f7db4d1f1617058..9113696d5178a1b6a56a718c8b8b97a14d76984c 100644 (file)
@@ -768,7 +768,7 @@ int main(int argc, char *argv[])
 
        extension_cap = kvm_check_cap(KVM_CAP_S390_MEM_OP_EXTENSION);
        for (idx = 0; idx < ARRAY_SIZE(testlist); idx++) {
-               if (testlist[idx].extension >= extension_cap) {
+               if (extension_cap >= testlist[idx].extension) {
                        testlist[idx].test();
                        ksft_test_result_pass("%s\n", testlist[idx].name);
                } else {