DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Christensen <drc@linux.vnet.ibm.com>
To: dev@dpdk.org
Cc: David Christensen <drc@linux.vnet.ibm.com>
Subject: [dpdk-dev] [PATCH v3 2/4] test: verify calloc succeeded for sum variable
Date: Wed,  8 May 2019 16:02:19 -0500	[thread overview]
Message-ID: <1557349339-25926-1-git-send-email-drc@linux.vnet.ibm.com> (raw)
Message-ID: <20190508210219.X7Nrn0wJcX4u7CljHC7WkO_zkAPzagcvBNVTFfo4AAU@z> (raw)

Code tested calloc failures for pt & lpt variables
but not for the sum variable. Add a test for calloc
failure of sum.

Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
---
v3:
* No changes
v2:
* Removed change to ITER_MAX
---
 app/test/test_barrier.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_barrier.c b/app/test/test_barrier.c
index c219d56..ae37b1e 100644
--- a/app/test/test_barrier.c
+++ b/app/test/test_barrier.c
@@ -202,7 +202,7 @@ struct lcore_plock_test {
 	printf("%s(iter=%u, utype=%u) started on %u lcores\n",
 		__func__, iter, utype, n);
 
-	if (pt == NULL || lpt == NULL) {
+	if (pt == NULL || lpt == NULL || sum == NULL) {
 		printf("%s: failed to allocate memory for %u lcores\n",
 			__func__, n);
 		free(pt);
-- 
1.8.3.1


             reply	other threads:[~2019-05-08 21:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-08 21:02 David Christensen [this message]
2019-05-08 21:02 ` David Christensen

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=1557349339-25926-1-git-send-email-drc@linux.vnet.ibm.com \
    --to=drc@linux.vnet.ibm.com \
    --cc=dev@dpdk.org \
    /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).