DPDK patches and discussions
 help / color / mirror / Atom feed
From: Igor Ryzhov <iryzhov@nfware.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com
Subject: [dpdk-dev] [PATCH v6 3/3] app/test: fix return value of test_kni_link_change
Date: Mon, 30 Aug 2021 17:27:31 +0300	[thread overview]
Message-ID: <20210830142731.32524-3-iryzhov@nfware.com> (raw)
In-Reply-To: <20210830142731.32524-1-iryzhov@nfware.com>

If the child process returns -1, WEXITSTATUS converts to 255 because it
takes only 8 least significant bits. As a result, the test is not
considered failed when it should.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
---
 app/test/test_kni.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_kni.c b/app/test/test_kni.c
index 0df028696f36..70c81f4af0f4 100644
--- a/app/test/test_kni.c
+++ b/app/test/test_kni.c
@@ -214,7 +214,7 @@ test_kni_link_change(void)
 			p_ret = waitpid(pid, &status, WNOHANG);
 			if (p_ret != 0) {
 				if (WIFEXITED(status))
-					return WEXITSTATUS(status);
+					return WEXITSTATUS(status) ? -1 : 0;
 				return -1;
 			}
 			rte_delay_ms(10);
-- 
2.33.0


  parent reply	other threads:[~2021-08-30 14:27 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-24 19:25 [dpdk-dev] [PATCH] kni: rework rte_kni_update_link using ioctl Igor Ryzhov
2019-09-24 19:33 ` [dpdk-dev] [PATCH v2] " Igor Ryzhov
2019-09-24 20:37   ` Aaron Conole
2019-09-25  9:00     ` Igor Ryzhov
2019-09-25  9:36   ` [dpdk-dev] [PATCH v3] " Igor Ryzhov
2019-10-14 16:10     ` Ferruh Yigit
2019-10-14 16:17       ` Ferruh Yigit
2019-10-14 19:01         ` Dan Gora
2019-10-14 20:55           ` Dan Gora
2019-10-27 20:16             ` Igor Ryzhov
2021-06-28 12:55               ` Ferruh Yigit
2021-06-28 13:16                 ` Igor Ryzhov
2021-07-04 16:06   ` [dpdk-dev] [PATCH v4 1/2] " Igor Ryzhov
2021-07-04 16:06     ` [dpdk-dev] [PATCH v4 2/2] kni: implement basic get_link_ksettings callback Igor Ryzhov
2021-07-05 11:58     ` [dpdk-dev] [PATCH v4 1/2] kni: rework rte_kni_update_link using ioctl Ferruh Yigit
2021-07-06  9:14       ` Igor Ryzhov
2021-08-26 15:19     ` [dpdk-dev] [PATCH v5 1/3] " Igor Ryzhov
2021-08-26 15:19       ` [dpdk-dev] [PATCH v5 2/3] kni: implement basic get_link_ksettings callback Igor Ryzhov
2021-08-26 15:19       ` [dpdk-dev] [PATCH v5 3/3] app/test: fix return value of test_kni_link_change Igor Ryzhov
2021-08-26 17:15       ` [dpdk-dev] [PATCH v5 1/3] kni: rework rte_kni_update_link using ioctl Stephen Hemminger
2021-08-26 17:46         ` Igor Ryzhov
2021-08-26 18:06           ` Stephen Hemminger
2021-08-30 18:05             ` Igor Ryzhov
2021-08-30 14:27       ` [dpdk-dev] [PATCH v6 " Igor Ryzhov
2021-08-30 14:27         ` [dpdk-dev] [PATCH v6 2/3] kni: implement basic get_link_ksettings callback Igor Ryzhov
2021-08-30 14:27         ` Igor Ryzhov [this message]
2023-06-29 17:05         ` [dpdk-dev] [PATCH v6 1/3] kni: rework rte_kni_update_link using ioctl Stephen Hemminger

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=20210830142731.32524-3-iryzhov@nfware.com \
    --to=iryzhov@nfware.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    /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).