Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3067205rwb; Sat, 8 Oct 2022 21:05:48 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6yCNgVXxH5SLT+/i69HHjA1CkeptJXzgGiel8QJKmmSpjRZ7mTa99TtMHFJn+FDCuZkOjE X-Received: by 2002:a05:6402:400b:b0:459:644:c1bb with SMTP id d11-20020a056402400b00b004590644c1bbmr11703826eda.223.1665288348093; Sat, 08 Oct 2022 21:05:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665288348; cv=none; d=google.com; s=arc-20160816; b=wg3e1rfoVoicf+2j0nqQ2749NimLJ0+Z4XhHpqj/zkJJb/rlcw0U+jEnppc0uGaTCD MR/PLVtEGSLdfDK9tenXQdjmRzd43By8yjTqvD9XJklBbJUWpJwW+hCx2DxrCjiDfCrs wiHIijYxDTEGT6D2dDg2CYwKORZlh1utds9eJr6bG8LyFdMdev2siOawzvz/GOP1AAwM a9wewz8byT994s88d0LB9ZdKwZY0ArQwsONXVQubIWmN5xAEjUhlLBCIszyUicNd0U0K ui97xCL+q/lgISvJ+ezJqFOy9RzpXSLdHKh8Gi+4w0u1s0anMLeoQSPKhK42X8mLVF5E qyTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=vU5cUcRWU84sqXHMTASMehCOOtYQccSuQrISq/Ek9y8=; b=q9VMYgC+XKZrt6OLt2dMv0DDHTJNESKgahiUtHliZDTBm/gSgoPMQxipYcdmwXGygh yaXWU7TkR0LPD66425UaKdwul/z00/0eHeLnquNAocF6JubvuAdk6tqLELnrHXCTMKxV V0CJnd7aqsEpcPT9JhGRkdlA52La+OFyAzmel3LP4bWLnWFitmOGZsXOcnOFnyPnwylK bWoHprRkWHgcrnmTZEI3yWUznvrMAssEflsGbOz6xs9y9YLJe8A3e7PaeuERGgrYzzvO v1nabA9JZZA01/6AZ3zgskTlNqsFfXUvwgkkx6VWJT5HAwziO9zvpEDnUKESPkQ4nqYT uWyg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dt3-20020a170907728300b0073dc32ccd9fsi6761051ejc.104.2022.10.08.21.05.23; Sat, 08 Oct 2022 21:05:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229643AbiJIDcX (ORCPT + 99 others); Sat, 8 Oct 2022 23:32:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbiJIDcU (ORCPT ); Sat, 8 Oct 2022 23:32:20 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C88952FFE2; Sat, 8 Oct 2022 20:32:18 -0700 (PDT) Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MlSDC1JpTzVhr8; Sun, 9 Oct 2022 11:27:55 +0800 (CST) Received: from kwepemm600007.china.huawei.com (7.193.23.208) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sun, 9 Oct 2022 11:32:16 +0800 Received: from DESKTOP-8RFUVS3.china.huawei.com (10.174.185.179) by kwepemm600007.china.huawei.com (7.193.23.208) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sun, 9 Oct 2022 11:32:15 +0800 From: Zenghui Yu To: , , , CC: , , , , , , , , , Zenghui Yu Subject: [PATCH] KVM: arm64: selftests: Fix multiple versions of GIC creation Date: Sun, 9 Oct 2022 11:31:31 +0800 Message-ID: <20221009033131.365-1-yuzenghui@huawei.com> X-Mailer: git-send-email 2.23.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.174.185.179] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemm600007.china.huawei.com (7.193.23.208) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- tools/testing/selftests/kvm/aarch64/vgic_init.c | 4 ++-- 1 file 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"); } -- 2.33.0