diff mbox series

[v4,05/12] app/test: exclude ENOTSUP as failure

Message ID 1634182214-24540-6-git-send-email-jizh@linux.microsoft.com (mailing list archive)
State Superseded
Headers show
Series app/test: enable subset of tests on Windows | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Jie Zhou Oct. 14, 2021, 3:30 a.m. UTC
Check rte_errno to exclude ENOTSUP as failures in test_memory.c

Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test/test_memory.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/app/test/test_memory.c b/app/test/test_memory.c
index dbf6871e71..379b0f99ca 100644
--- a/app/test/test_memory.c
+++ b/app/test/test_memory.c
@@ -10,6 +10,7 @@ 
 #include <rte_memory.h>
 #include <rte_common.h>
 #include <rte_memzone.h>
+#include <rte_errno.h>
 
 #include "test.h"
 
@@ -63,7 +64,7 @@  check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
 	/* we're able to get memseg fd - try getting its offset */
 	ret = rte_memseg_get_fd_offset_thread_unsafe(ms, &offset);
 	if (ret < 0) {
-		if (errno == ENOTSUP)
+		if (rte_errno == ENOTSUP)
 			return 1;
 		return -1;
 	}