From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id EA4DF3230 for ; Sun, 6 May 2018 08:37:43 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 9886B218EB; Sun, 6 May 2018 02:37:43 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 06 May 2018 02:37:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=u8yB6cbkVZuGkAdGz 6nqzWFvShV6KCDMqgn6MCwo0+4=; b=Vu3jrmGSfGqSv7/ireZsB4AtqgVO2sc5I 3CkpsCYqMQ1DxuMGg4g6ZffkoANR8jZtZfZ7IiCWjD7RRhAAhoBPzsJqAIm7i3nk kNF/KcL+isNpJMdAoLWzjPZ5+wwUu17VsyUV7jvz6mZHowzDJNhhx2Dyuee2x7jz KE302xbT6xqQzDs55MyDHkO585iOSMf8U8s5ZSXW2pcy9rhwwJFryRuhFXQmGH6t vdnueYipymOlmYHCq18Wn0SqRodXFETGfUKkp7pAGZzVXCjGaBCC/7l/ZQJeLGTO W+RFOviYlh1aJMSGt1Lk62Jqoj6E/yV0iEe3ng7Y6TVJVzNOWO5Ng== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=u8yB6cbkVZuGkAdGz6nqzWFvShV6KCDMqgn6MCwo0+4=; b=e10z6cAy 9gvG8b3NqhoiGKTi6EjkBsvnfbq7KLmIxDYLW/HBBpS7X88XG3HT/L6OVBZANGSW Zce1tyYE6KYSjELI4/Hm2RQP70rzklO+0fB0HEhJHuEJW9kPuZQxG0/yZXweYvXP xS3eS1JiF6yrRH/jOZedxT2Gz5mNyqBBH+pzrz/FJFFr7x5xgBtoiU8kUDJGzkhS K3N1r3Q9JWbYr07a2Drk9C92qAOLXlCN5jUiLYVLLuP+emwbGmmYOJfg4qnECy1Q tiIL4BZ9Muggl9BG7yx+AiDCowCmG7sz9w82Zkcbyb7Rb0RehYOys3ztEIJv5B3d IKnrQnTGvZt7KQ== X-ME-Sender: Received: from yuanhanliu-NB0.tencent.com (unknown [223.74.148.102]) by mail.messagingengine.com (Postfix) with ESMTPA id 33E5A10256; Sun, 6 May 2018 02:37:41 -0400 (EDT) From: Yuanhan Liu To: Andrew Rybchenko Cc: dpdk stable Date: Sun, 6 May 2018 14:36:24 +0800 Message-Id: <20180506063639.23196-11-yliu@fridaylinux.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180506063639.23196-1-yliu@fridaylinux.org> References: <20180506063639.23196-1-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'test/mempool: fix autotest retry' has been queued to LTS release 17.11.3 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 May 2018 06:37:44 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/09/18. So please shout if anyone has objections. Thanks. --yliu --- >>From cc8e68493a1266a746bfe21ea19eaaec0627a729 Mon Sep 17 00:00:00 2001 From: Andrew Rybchenko Date: Wed, 25 Apr 2018 18:00:37 +0100 Subject: [PATCH] test/mempool: fix autotest retry [ upstream commit 2d645858a93e21a41e84928d4fb869318c3639a6 ] Single producer / single consumer mempool handle is stored in static variable and the mempool allocated if stored value is NULL. If the mempool is freed, NULL should be restored to make sure that the mempool is allocated once again next time when the test is run. Fixes: 8ef772aee072 ("app/test: rework mempool test") Signed-off-by: Andrew Rybchenko --- test/test/test_mempool.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/test/test/test_mempool.c b/test/test/test_mempool.c index 37ead503b..56b0fd022 100644 --- a/test/test/test_mempool.c +++ b/test/test/test_mempool.c @@ -355,17 +355,17 @@ test_mempool_sp_sc(void) } if (rte_mempool_lookup("test_mempool_sp_sc") != mp_spsc) { printf("Cannot lookup mempool from its name\n"); - rte_mempool_free(mp_spsc); - RET_ERR(); + ret = -1; + goto err; } lcore_next = rte_get_next_lcore(lcore_id, 0, 1); if (lcore_next >= RTE_MAX_LCORE) { - rte_mempool_free(mp_spsc); - RET_ERR(); + ret = -1; + goto err; } if (rte_eal_lcore_role(lcore_next) != ROLE_RTE) { - rte_mempool_free(mp_spsc); - RET_ERR(); + ret = -1; + goto err; } rte_spinlock_init(&scsp_spinlock); memset(scsp_obj_table, 0, sizeof(scsp_obj_table)); @@ -376,7 +376,10 @@ test_mempool_sp_sc(void) if (rte_eal_wait_lcore(lcore_next) < 0) ret = -1; + +err: rte_mempool_free(mp_spsc); + mp_spsc = NULL; return ret; } -- 2.11.0