diff mbox series

[v5,02/12] eal/windows: return ENOTSUP for not supported API

Message ID 1634187170-3986-3-git-send-email-jizh@linux.microsoft.com (mailing list archive)
State Superseded
Delegated to: Thomas Monjalon
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, 4:52 a.m. UTC
UT memory_autotest on Windows has 2 failed cases on eal APIs
eal_memalloc_get_seg_fd and eal_memalloc_get_seg_fd_offset. These 2
APIs are not supported on Windows yet. Should return ENOTSUP such that
in test_memory.c these 2 ENOTSUP cases will not be marked as failures,
same as other ENOTSUP cases.

Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 lib/eal/windows/eal_memalloc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/lib/eal/windows/eal_memalloc.c b/lib/eal/windows/eal_memalloc.c
index 4459d59b1a..fffdd5b976 100644
--- a/lib/eal/windows/eal_memalloc.c
+++ b/lib/eal/windows/eal_memalloc.c
@@ -17,7 +17,7 @@  eal_memalloc_get_seg_fd(int list_idx, int seg_idx)
 	RTE_SET_USED(list_idx);
 	RTE_SET_USED(seg_idx);
 	EAL_LOG_NOT_IMPLEMENTED();
-	return -1;
+	return -ENOTSUP;
 }
 
 int
@@ -28,7 +28,7 @@  eal_memalloc_get_seg_fd_offset(int list_idx, int seg_idx, size_t *offset)
 	RTE_SET_USED(seg_idx);
 	RTE_SET_USED(offset);
 	EAL_LOG_NOT_IMPLEMENTED();
-	return -1;
+	return -ENOTSUP;
 }
 
 static int
@@ -433,7 +433,7 @@  eal_memalloc_sync_with_primary(void)
 {
 	/* No multi-process support. */
 	EAL_LOG_NOT_IMPLEMENTED();
-	return -1;
+	return -ENOTSUP;
 }
 
 int