DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Subject: [dpdk-dev] [PATCH] test/table: skip when not enough memory is available
Date: Fri,  5 Jul 2019 11:19:00 +0200	[thread overview]
Message-ID: <1562318340-30464-1-git-send-email-david.marchand@redhat.com> (raw)

Following empirical tries, this test wants at least 3300M of memory to
run.

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test/test_table.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/app/test/test_table.c b/app/test/test_table.c
index a4b0ed6..dca1b33 100644
--- a/app/test/test_table.c
+++ b/app/test/test_table.c
@@ -134,6 +134,13 @@ uint32_t pipeline_test_hash_cuckoo(const void *key,
 {
 	int status, ret;
 	unsigned i;
+	void *p;
+
+	/* empirical value, please refine when updating this test */
+	p = rte_malloc("enough_memory_for_test", (size_t)3300 << 20, 0);
+	if (!p)
+		return TEST_SKIPPED;
+	rte_free(p);
 
 	ret = TEST_SUCCESS;
 
-- 
1.8.3.1


             reply	other threads:[~2019-07-05  9:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-05  9:19 David Marchand [this message]
2019-07-05 17:54 ` Dumitrescu, Cristian
2019-07-05 20:47   ` 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=1562318340-30464-1-git-send-email-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=cristian.dumitrescu@intel.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).