DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Min Hu (Connor)" <humin29@huawei.com>
To: <dev@dpdk.org>
Cc: <ferruh.yigit@intel.com>, <ciara.power@intel.com>,
	<reshma.pattan@intel.com>
Subject: [dpdk-dev] [PATCH v2 2/2] test: fix missing check for thread creation
Date: Mon, 12 Apr 2021 08:32:20 +0800	[thread overview]
Message-ID: <1618187540-55614-3-git-send-email-humin29@huawei.com> (raw)
In-Reply-To: <1618187540-55614-1-git-send-email-humin29@huawei.com>

From: Chengwen Feng <fengchengwen@huawei.com>

There was a call for thread create function without result check.
Add result check and message print out after failure.

Fixes: 086eb64db39e ("test/pdump: add unit test for pdump library")
Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 app/test/process.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/app/test/process.h b/app/test/process.h
index 27f1b1c..9b6b85a 100644
--- a/app/test/process.h
+++ b/app/test/process.h
@@ -48,6 +48,7 @@ process_dup(const char *const argv[], int numargs, const char *env_value)
 #ifdef RTE_LIB_PDUMP
 #ifdef RTE_NET_RING
 	pthread_t thread;
+	int rc;
 #endif
 #endif
 
@@ -126,8 +127,11 @@ process_dup(const char *const argv[], int numargs, const char *env_value)
 	/* parent process does a wait */
 #ifdef RTE_LIB_PDUMP
 #ifdef RTE_NET_RING
-	if ((strcmp(env_value, "run_pdump_server_tests") == 0))
-		pthread_create(&thread, NULL, &send_pkts, NULL);
+	if ((strcmp(env_value, "run_pdump_server_tests") == 0)) {
+		rc = pthread_create(&thread, NULL, &send_pkts, NULL);
+		if (rc)
+			rte_panic("Cannot start send pkts thread\n");
+	}
 #endif
 #endif
 
-- 
2.7.4


  parent reply	other threads:[~2021-04-12  0:32 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-10 10:44 [dpdk-dev] [PATCH 0/2] " Min Hu (Connor)
2021-04-10 10:44 ` [dpdk-dev] [PATCH 1/2] telemetry: " Min Hu (Connor)
2021-04-10 10:44 ` [dpdk-dev] [PATCH 2/2] test: " Min Hu (Connor)
2021-04-12  0:32 ` [dpdk-dev] [PATCH v2 0/2] " Min Hu (Connor)
2021-04-12  0:32   ` [dpdk-dev] [PATCH v2 1/2] telemetry: " Min Hu (Connor)
2021-04-12  7:48     ` David Marchand
2021-04-15 11:53       ` Min Hu (Connor)
2021-04-12  0:32   ` Min Hu (Connor) [this message]
2021-04-15 11:50 ` [dpdk-dev] [PATCH v3 0/2] " Min Hu (Connor)
2021-04-15 11:50   ` [dpdk-dev] [PATCH v3 1/2] telemetry: " Min Hu (Connor)
2021-04-15 14:55     ` David Marchand
2021-04-16  8:21       ` Min Hu (Connor)
2021-04-15 16:11     ` Power, Ciara
2021-04-16  8:19       ` Min Hu (Connor)
2021-04-15 11:50   ` [dpdk-dev] [PATCH v3 2/2] test: " Min Hu (Connor)
2021-04-15 17:05     ` Pattan, Reshma
2021-04-16  8:21       ` Min Hu (Connor)
2021-04-16  8:34         ` Ferruh Yigit
2021-04-16  9:16           ` Min Hu (Connor)
2021-04-16  8:18 ` [dpdk-dev] [PATCH v4 0/2] " Min Hu (Connor)
2021-04-16  8:18   ` [dpdk-dev] [PATCH v4 1/2] telemetry: " Min Hu (Connor)
2021-04-19  8:49     ` Power, Ciara
2021-04-16  8:18   ` [dpdk-dev] [PATCH v4 2/2] test: " Min Hu (Connor)
2021-04-19  9:33     ` Pattan, Reshma
2021-04-21 14:32   ` [dpdk-dev] [PATCH v4 0/2] " Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1618187540-55614-3-git-send-email-humin29@huawei.com \
    --to=humin29@huawei.com \
    --cc=ciara.power@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=reshma.pattan@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).