From nobody Tue Apr 15 06:11:10 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1583504855; cv=none; d=zohomail.com; s=zohoarc; b=Vv+QHxIBFGp0WKoYwTyNj5wWNG1XDsyyRrEZIp8x/0URZSnfMSINiA/F2P81QyohScVv/QBG4QUc1bzkWwgfMreParq3AsHkeiU/IdsRmjmFEucLltbN1jJvGI2KuhXF8IrdzOWg3tl+qmY2svCLm9f7uVJVPHAzojcxd5bE5cA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583504855; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ZvHkvVd+7sDC+hYczEiqu5wvxhfUX/wUGDE/sBpPNn4=; b=fpDj40Zg13VVf+WYrRH6jLlEgM9ojCJH35fh9pnfaYEYfSme3CUPiDI32iiKTMaD8ig33LVG3yhcuPNAaMrhIQ3ARIJWLucHLJC+VDgbeNY0dXq1bJPHL1ZGRBbaFgNDGeSKFs1Z0JVeR+ZzRs7MjeW+B7Ei2xn80dhF+3yrIj8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1583504855671786.8313835939515; Fri, 6 Mar 2020 06:27:35 -0800 (PST) Received: from localhost ([::1]:37548 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jADws-0007Ln-7y for importer@patchew.org; Fri, 06 Mar 2020 09:27:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:32808) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jADtK-0003n9-4u for qemu-devel@nongnu.org; Fri, 06 Mar 2020 09:23:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jADtI-0002Qq-WA for qemu-devel@nongnu.org; Fri, 06 Mar 2020 09:23:54 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:49415 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jADtI-0002K0-SF for qemu-devel@nongnu.org; Fri, 06 Mar 2020 09:23:52 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-108-tRUanmDlPJa04cFQjeqajg-1; Fri, 06 Mar 2020 09:23:48 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3E8CD800D5B; Fri, 6 Mar 2020 14:23:47 +0000 (UTC) Received: from localhost (unknown [10.36.118.109]) by smtp.corp.redhat.com (Postfix) with ESMTP id 41C68909FB; Fri, 6 Mar 2020 14:23:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583504632; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZvHkvVd+7sDC+hYczEiqu5wvxhfUX/wUGDE/sBpPNn4=; b=isfcE1QF1hwNvgHnXsh5eaCQ9/JzOPRPWQPFvHKh9F9QrE9ybp42hRG+5YyH1QIYdA8K/q busk+Q1NEAJ8hvpmTF+U0oJhxtoffe0Tc8gHSUIp7pNPF9EEtvZdXliTUuAIbKNiUmOeoJ T3TX6PrulXekHLv8ysnl7TG5ol3x1TM= X-MC-Unique: tRUanmDlPJa04cFQjeqajg-1 From: Stefan Hajnoczi To: qemu-devel@nongnu.org Subject: [PULL 3/3] tests: Fix a bug with count variables Date: Fri, 6 Mar 2020 14:23:18 +0000 Message-Id: <20200306142318.1435372-4-stefanha@redhat.com> In-Reply-To: <20200306142318.1435372-1-stefanha@redhat.com> References: <20200306142318.1435372-1-stefanha@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Peter Maydell , Thomas Huth , Tianjia Zhang , qemu-block@nongnu.org, Alexander Bulekov , Bandan Das , Stefan Hajnoczi , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Tianjia Zhang The counting code here should use the local variable n_nodes_local. Otherwise, the variable n_nodes is counting incorrectly, causing the counting logic of the code to be wrong. Signed-off-by: Tianjia Zhang Signed-off-by: Stefan Hajnoczi Link: https://lore.kernel.org/r/20200207115433.118254-1-tianjia.zhang@linux= .alibaba.com Message-Id: <20200207115433.118254-1-tianjia.zhang@linux.alibaba.com> --- tests/test-rcu-list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-rcu-list.c b/tests/test-rcu-list.c index 1442c0c982..92be51ec50 100644 --- a/tests/test-rcu-list.c +++ b/tests/test-rcu-list.c @@ -235,7 +235,7 @@ static void *rcu_q_updater(void *arg) j++; if (target_el =3D=3D j) { struct list_element *new_el =3D g_new(struct list_element,= 1); - n_nodes +=3D n_nodes_local; + n_nodes_local++; TEST_LIST_INSERT_AFTER_RCU(el, new_el, entry); break; } --=20 2.24.1