From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C360CA0C4C; Thu, 2 Sep 2021 19:41:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8E4334003E; Thu, 2 Sep 2021 19:41:16 +0200 (CEST) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by mails.dpdk.org (Postfix) with ESMTP id E8CCA4003C; Thu, 2 Sep 2021 19:41:14 +0200 (CEST) Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 182HYGXY156784; Thu, 2 Sep 2021 13:41:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=OL4oHrOGUtaNOsDy4bgZXmebQrm8v+amc8VQO7XFD3M=; b=YJwhTHPs+G+8KflX6K4MGbsZgBtmJk+0jhAbLA87yk4sx6fDj6iXazPpMH30/83pEM8n sDwZFUOLKxLHx4ieb+H9dVToZ+4VAF4G/41FXgZDaaw1qaEpyK8kjY73ZM/Zvx0Cg4PY fgc9YFVYcyPY6vZ5nCGIZsiZ/SKPuCVwzlb6sm+EiYh6xM9griXUSPvOoIF5HAAnvPuu rakYTMm8F6Zc14L2pkyUIhACjlKEfSaWYOoWHmVFu96nqUlq3Ho/O0PA4ihE5qEF/F1B AcjVQR3wvsJlAWfzr9zEjljr8e2UnaXx+GBS1PFvNDGMI/BERPjVGnsJ5tYsUzLwewW1 Hw== Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0b-001b2d01.pphosted.com with ESMTP id 3au2mg28qw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 02 Sep 2021 13:41:11 -0400 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 182HQqBJ022432; Thu, 2 Sep 2021 17:41:10 GMT Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by ppma03dal.us.ibm.com with ESMTP id 3atdxcfdt7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 02 Sep 2021 17:41:10 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 182Hf9bo23396774 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 2 Sep 2021 17:41:09 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8065978072; Thu, 2 Sep 2021 17:41:09 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E309778079; Thu, 2 Sep 2021 17:41:08 +0000 (GMT) Received: from localhost.localdomain (unknown [9.114.224.51]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 2 Sep 2021 17:41:08 +0000 (GMT) From: David Christensen To: dev@dpdk.org Cc: phil.yang@arm.com, stable@dpdk.org, David Christensen Date: Thu, 2 Sep 2021 10:41:04 -0700 Message-Id: <20210902174104.3181444-1-drc@linux.vnet.ibm.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: uS5YIQn2lZA_1QDUdR8QT94Tgw6JmT8d X-Proofpoint-ORIG-GUID: uS5YIQn2lZA_1QDUdR8QT94Tgw6JmT8d X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-09-02_04:2021-09-02, 2021-09-02 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 malwarescore=0 lowpriorityscore=0 phishscore=0 priorityscore=1501 spamscore=0 clxscore=1011 bulkscore=0 mlxscore=0 mlxlogscore=784 adultscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2108310000 definitions=main-2109020101 Subject: [dpdk-dev] [PATCH] test/atomic: fix false failures for 128-bit atomic compare exchange test X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" When checking the results of the rte_atomic128_cmp_exchange() function, current code compares the values of a uint32_t and a uint64_t variable. If the number of lcores used by the test is large, or the value of the iteration count N is increased, the variable size mimatch can cause a false test failure. Modify the comparison to compare uint64_t values. Fixes: fa3253c534b1 ("test/atomic: add 128-bit atomic compare exchange test") Cc: phil.yang@arm.com Signed-off-by: David Christensen --- app/test/test_atomic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test/test_atomic.c b/app/test/test_atomic.c index f10f555af8..ce0c259bd7 100644 --- a/app/test/test_atomic.c +++ b/app/test/test_atomic.c @@ -591,7 +591,7 @@ test_atomic(void) rte_atomic32_clear(&synchro); iterations = count128.val[0] - count128.val[1]; - if (iterations != 4*N*(rte_lcore_count()-1)) { + if (iterations != (uint64_t)4*N*(rte_lcore_count()-1)) { printf("128-bit compare and swap failed\n"); return -1; } -- 2.27.0