DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/test: fix memory autotests on FreeBSD
@ 2021-09-17 15:09 Bruce Richardson
  2021-10-02 14:41 ` David Marchand
  0 siblings, 1 reply; 2+ messages in thread
From: Bruce Richardson @ 2021-09-17 15:09 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, anatoly.burakov, Brandon Lo

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] app/test: fix memory autotests on FreeBSD
  2021-09-17 15:09 [dpdk-dev] [PATCH] app/test: fix memory autotests on FreeBSD Bruce Richardson
@ 2021-10-02 14:41 ` David Marchand
  0 siblings, 0 replies; 2+ messages in thread
From: David Marchand @ 2021-10-02 14:41 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, Burakov, Anatoly, Brandon Lo

On Fri, Sep 17, 2021 at 5:09 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> 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")
>
> Reported-by: Brandon Lo <blo@iol.unh.edu>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>

Applied, thanks.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-02 14:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-17 15:09 [dpdk-dev] [PATCH] app/test: fix memory autotests on FreeBSD Bruce Richardson
2021-10-02 14:41 ` David Marchand

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).