DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Chen, Jing D" <jing.d.chen@intel.com>
To: "Yang, Qiming" <qiming.yang@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Wu, Jingjing" <jingjing.wu@intel.com>
Subject: Re: [dpdk-dev] [PATCH v2] test: add delay time in test alarm
Date: Fri, 5 May 2017 06:28:56 +0000	[thread overview]
Message-ID: <4341B239C0EFF9468EE453F9E9F4604D3C6448ED@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1493950673-15953-1-git-send-email-qiming.yang@intel.com>

Hi, 
 
> diff --git a/test/test/test_alarm.c b/test/test/test_alarm.c index
> ecb2f6d..cbae1a0 100644
> --- a/test/test/test_alarm.c
> +++ b/test/test/test_alarm.c
> @@ -96,6 +96,7 @@ static int
>  test_multi_alarms(void)
>  {
>  	int rm_count = 0;
> +	int count = 0;
>  	cb_count.cnt = 0;
> 
>  	printf("Expect 6 callbacks in order...\n"); @@ -169,7 +170,10 @@
> test_multi_alarms(void)
>  		printf("Error, cancelling head-of-list leads to premature
> callback\n");
>  		return -1;
>  	}
> -	rte_delay_ms(10);
> +
> +	while (flag != 2 && count++ < 6)
> +		rte_delay_ms(10);
> +
>  	if (flag != 2) {
>  		printf("Error - expected callback not called\n");
>  		rte_eal_alarm_cancel(test_remove_in_callback, (void *)-1);
> @@ -212,7 +216,7 @@ test_alarm(void)
>  		printf("fail to set alarm callback\n");
>  		return -1;
>  	}
> -	while (flag == 0 && count ++ < 6)
> +	while (flag == 0 && count++ < 20)
>  		rte_delay_ms(RTE_TEST_CHECK_PERIOD);
> 

What's the criteria to delay 20* RTE_TEST_CHECK_PERIOD ms? Add more comments?

>  	if (flag == 0){
> --
> 2.7.4

Overall comment is to replace numeric with macro.

  reply	other threads:[~2017-05-05  6:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-21  6:03 [dpdk-dev] [PATCH] " Qiming Yang
2017-05-05  2:17 ` [dpdk-dev] [PATCH v2] " Qiming Yang
2017-05-05  6:28   ` Chen, Jing D [this message]
2017-05-16  3:15     ` Yang, Qiming
2017-06-20  3:24   ` [dpdk-dev] [PATCH v3] " Qiming Yang
2017-07-06  8:28     ` Chen, Jing D
2017-07-07  4:35       ` Yang, Qiming
2017-07-12  1:31         ` Chen, Jing D
2017-07-14  5:51           ` [dpdk-dev] FW: " Yang, Qiming
2017-07-14  9:36           ` [dpdk-dev] " Thomas Monjalon

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=4341B239C0EFF9468EE453F9E9F4604D3C6448ED@shsmsx102.ccr.corp.intel.com \
    --to=jing.d.chen@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=qiming.yang@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).