DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ruifeng Wang <ruifeng.wang@arm.com>
Cc: dev@dpdk.org, i.maximets@samsung.com,
	honnappa.nagarahalli@arm.com, nd@arm.com,
	Ruifeng Wang <ruifeng.wang@arm.com>,
	stable@dpdk.org
Subject: [dpdk-dev] [PATCH v2] test/cycles: restore original delay function
Date: Mon, 27 Jul 2020 18:16:08 +0800	[thread overview]
Message-ID: <20200727101608.190809-1-ruifeng.wang@arm.com> (raw)
In-Reply-To: <20200424074356.193204-1-ruifeng.wang@arm.com>

test_delay_us_sleep registers sleep based delay for testing.
This changes the default delay function of testing environment.
It is not expected.

Restore defalut delay function after the test to fix the issue.

Fixes: a51639cc720a ("eal: add nanosleep based delay function")
Cc: stable@dpdk.org

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
---
v2:
Dropped other patches in the series that are not needed.

 app/test/test_cycles.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/app/test/test_cycles.c b/app/test/test_cycles.c
index c78e6a5b1..015a9290f 100644
--- a/app/test/test_cycles.c
+++ b/app/test/test_cycles.c
@@ -79,8 +79,14 @@ REGISTER_TEST_COMMAND(cycles_autotest, test_cycles);
 static int
 test_delay_us_sleep(void)
 {
+	int rv = 0;
+
 	rte_delay_us_callback_register(rte_delay_us_sleep);
-	return check_wait_one_second();
+	rv = check_wait_one_second();
+	/* restore original delay function */
+	rte_delay_us_callback_register(rte_delay_us_block);
+
+	return rv;
 }
 
 REGISTER_TEST_COMMAND(delay_us_sleep_autotest, test_delay_us_sleep);
-- 
2.17.1


  parent reply	other threads:[~2020-07-27 10:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-24  7:43 [dpdk-dev] [PATCH 0/4] arm64 CI stabilize Ruifeng Wang
2020-04-24  7:43 ` [dpdk-dev] [PATCH 1/4] test/cycles: restore original delay function Ruifeng Wang
2020-04-24  7:43 ` [dpdk-dev] [PATCH 2/4] test/cycles: increase threshold for containers on aarch64 Ruifeng Wang
2020-04-24  7:43 ` [dpdk-dev] [PATCH 3/4] ci: expose test time out argument Ruifeng Wang
2020-04-24  7:43 ` [dpdk-dev] [PATCH 4/4] ci: increase time out multiplier for containers on aarch64 Ruifeng Wang
2020-07-27 10:16 ` Ruifeng Wang [this message]
2020-07-27 10:21 ` [dpdk-dev] [PATCH v2] test/cycles: restore original delay function Ruifeng Wang
2020-07-27 12:21   ` David Marchand

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=20200727101608.190809-1-ruifeng.wang@arm.com \
    --to=ruifeng.wang@arm.com \
    --cc=dev@dpdk.org \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=i.maximets@samsung.com \
    --cc=nd@arm.com \
    --cc=stable@dpdk.org \
    /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).