From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC426C4332F for ; Mon, 10 Oct 2022 04:10:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229471AbiJJEKf (ORCPT ); Mon, 10 Oct 2022 00:10:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230381AbiJJEKc (ORCPT ); Mon, 10 Oct 2022 00:10:32 -0400 Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1833325FB; Sun, 9 Oct 2022 21:10:29 -0700 (PDT) Date: Mon, 10 Oct 2022 04:10:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1665375028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Cmx7UC5ERbZvs6NltikBKO+6xKGttyQo1AEh/wBpODM=; b=mWnNl9esZ4y1R7iZLuV38Ia7gZTlaSRQxos7LCRu9JrUofDzcFj4pgoUkfZa9sSZtDlTEx u1tilWLnPq16Hnl1a0BT5mPphvQ9yAzQe3k7kzjl1eNBcFcSqnXYXeDgFNYSa0RM55JLGO RHyqL7uUKo6dN+egY/xOYyt/ETSk4GY= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Zenghui Yu Cc: kvmarm@lists.linux.dev, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, maz@kernel.org, andrew.jones@linux.dev, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, pbonzini@redhat.com, seanjc@google.com, wanghaibin.wang@huawei.com Subject: Re: [PATCH] KVM: arm64: selftests: Fix multiple versions of GIC creation Message-ID: References: <20221009033131.365-1-yuzenghui@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221009033131.365-1-yuzenghui@huawei.com> X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Sun, Oct 09, 2022 at 11:31:31AM +0800, Zenghui Yu wrote: > 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 Reviewed-by: Oliver Upton -- Thanks, Oliver > --- > 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 > >