Message ID | 1635216361-23641-5-git-send-email-jizh@linux.microsoft.com (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | Thomas Monjalon |
Headers | show |
Series | app/test: enable subset of tests on Windows | expand |
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
2021-10-25 19:45 (UTC-0700), Jie Zhou: > 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 --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; > } The commit title and message contradict what is inside. ENOTSUP was excluded previously, but errno was checked instead of rte_errno. It should be stated what was wrong and how it is fixed (with a Fixes tag).
On Wed, Nov 24, 2021 at 01:02:10AM +0300, Dmitry Kozlyuk wrote: > 2021-10-25 19:45 (UTC-0700), Jie Zhou: > > 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 --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; > > } > > The commit title and message contradict what is inside. > ENOTSUP was excluded previously, but errno was checked instead of rte_errno. > It should be stated what was wrong and how it is fixed (with a Fixes tag). Will add the Fixes info and revise the title and message.
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; }
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(-)