DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>,
	anatoly.burakov@intel.com, Brandon Lo <blo@iol.unh.edu>
Subject: [dpdk-dev] [PATCH] app/test: fix memory autotests on FreeBSD
Date: Fri, 17 Sep 2021 16:09:17 +0100	[thread overview]
Message-ID: <20210917150917.90892-1-bruce.richardson@intel.com> (raw)

The memory autotests were failing on FreeBSD, due to an incorrect errno
variable being checked for ENOTSUP. The test checked "errno" while the
DPDK API sets "rte_errno". Changing to check the right variable makes
the test behave properly.

Fixes: c3e35a0966b8 ("test/mem: check segment fd API")
Cc: anatoly.burakov@intel.com

Reported-by: Brandon Lo <blo@iol.unh.edu>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 app/test/test_memory.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test/test_memory.c b/app/test/test_memory.c
index 7d5ae99bab..dbf6871e71 100644
--- a/app/test/test_memory.c
+++ b/app/test/test_memory.c
@@ -6,6 +6,7 @@
 #include <stdint.h>
 
 #include <rte_eal.h>
+#include <rte_errno.h>
 #include <rte_memory.h>
 #include <rte_common.h>
 #include <rte_memzone.h>
@@ -53,7 +54,7 @@ check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
 		/* ENOTSUP means segment is valid, but there is not support for
 		 * segment fd API (e.g. on FreeBSD).
 		 */
-		if (errno == ENOTSUP)
+		if (rte_errno == ENOTSUP)
 			return 1;
 		/* all other errors are treated as failures */
 		return -1;
-- 
2.32.0


             reply	other threads:[~2021-09-17 15:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-17 15:09 Bruce Richardson [this message]
2021-10-02 14:41 ` David Marchand

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=20210917150917.90892-1-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=blo@iol.unh.edu \
    --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).