patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Ruifeng Wang <ruifeng.wang@arm.com>
To: aconole@redhat.com, maicolgabriel@hotmail.com
Cc: dev@dpdk.org, gavin.hu@arm.com, honnappa.nagarahalli@arm.com,
	juraj.linkes@pantheon.tech, nd@arm.com,
	Ruifeng Wang <ruifeng.wang@arm.com>,
	stable@dpdk.org
Subject: [dpdk-stable] [PATCH 1/4] test/cycles: restore original delay function
Date: Fri, 24 Apr 2020 15:43:53 +0800	[thread overview]
Message-ID: <20200424074356.193204-2-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.
The change of default delay function is not expected.

Restore defalut delay function 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>
---
 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


       reply	other threads:[~2020-04-24  7:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200424074356.193204-1-ruifeng.wang@arm.com>
2020-04-24  7:43 ` Ruifeng Wang [this message]
2020-07-27 10:16 ` [dpdk-stable] [PATCH v2] " Ruifeng Wang
2020-07-27 10:21 ` Ruifeng Wang
2020-07-27 12:21   ` [dpdk-stable] [dpdk-dev] " 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=20200424074356.193204-2-ruifeng.wang@arm.com \
    --to=ruifeng.wang@arm.com \
    --cc=aconole@redhat.com \
    --cc=dev@dpdk.org \
    --cc=gavin.hu@arm.com \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=juraj.linkes@pantheon.tech \
    --cc=maicolgabriel@hotmail.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).