Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp182992rwi; Sun, 9 Oct 2022 21:17:03 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4/tJK79yJ2Yu7l47VcO5rrjRRwrUSgYEXEEvaSwbH24y61ifSHJ3XIjvgbiNk+TPe6maPV X-Received: by 2002:a63:200e:0:b0:45b:d6ed:6c5 with SMTP id g14-20020a63200e000000b0045bd6ed06c5mr14901238pgg.121.1665375423400; Sun, 09 Oct 2022 21:17:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665375423; cv=none; d=google.com; s=arc-20160816; b=S780rc/VQ1ODGCoaGBXSRGUWus/8zRbm4QjpwrZNVsM9C1Qm5wVQMO6g668Jt5Ter4 i9foE5PM6C0GMPKnVNHpnN69+dmDsmUZVVjMq8KaZmRKl4R6xVuqbXfbCSrB7z9we7NV xaUbvazd1EouLWNofLeUOkf5eDJMiyov9AWDFy9MFhgwNvzVR5bsPcplxtaq10NAc4XT y1xAH8zM9bZlNNmZsfawCX0oUHdllST7BMsrXG6XhpJ8Gek9kFLAyYE9hSJhdYYwTc+x a5NtpVUtt8NZ+NAaQ7CHvj2em/lE89ASVhvT2YMbzEvWL6uW3gjDneub2v5tKUwbKBsW oZFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=Cmx7UC5ERbZvs6NltikBKO+6xKGttyQo1AEh/wBpODM=; b=vlecmkL7PbHKKi8R5erarspSWccLNKC4N8ThvRGTYRxOzW6FuNNwsDUuGj2J/Vkolz HEaGTZBUp6g9EE7jMH6pwgESQ9sSwJp1MOiVE3xHoSr9HUQpPNZT11Wq01ppsTF4s6gZ 9Gt0uMmcKXBzDjnqdN9R8197koPdFhhMljjkrvQGHOeK6AUlpqxb/JhFP8PQkkNg5+Ax 3Vrxk1iFrS40mTNCBUF4k8zrfbubzqELF2ddn/Wlv+/PurpyCEFQ6m90R+KAjP2G+i7a VT1iJpPEpVh1LgS0Se8BFXvxUZbPtO7afPWEoqfVwYDNj+n4a1U8GJaILXuAWEP6sLfN pxBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=mWnNl9es; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lb15-20020a17090b4a4f00b0020d309db15csi5112425pjb.0.2022.10.09.21.16.50; Sun, 09 Oct 2022 21:17:03 -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; dkim=pass header.i=@linux.dev header.s=key1 header.b=mWnNl9es; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230461AbiJJEKg (ORCPT + 99 others); Mon, 10 Oct 2022 00:10:36 -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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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 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 > >