* [dpdk-dev] [PATCH v3 2/4] test: verify calloc succeeded for sum variable
@ 2019-05-08 21:02 David Christensen
2019-05-08 21:02 ` David Christensen
0 siblings, 1 reply; 2+ messages in thread
From: David Christensen @ 2019-05-08 21:02 UTC (permalink / raw)
To: dev; +Cc: David Christensen
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [dpdk-dev] [PATCH v3 2/4] test: verify calloc succeeded for sum variable
2019-05-08 21:02 [dpdk-dev] [PATCH v3 2/4] test: verify calloc succeeded for sum variable David Christensen
@ 2019-05-08 21:02 ` David Christensen
0 siblings, 0 replies; 2+ messages in thread
From: David Christensen @ 2019-05-08 21:02 UTC (permalink / raw)
To: dev; +Cc: David Christensen
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-08 21:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-08 21:02 [dpdk-dev] [PATCH v3 2/4] test: verify calloc succeeded for sum variable David Christensen
2019-05-08 21:02 ` David Christensen
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).