From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <jing.d.chen@intel.com>
Received: from mga07.intel.com (mga07.intel.com [134.134.136.100])
 by dpdk.org (Postfix) with ESMTP id EB1962C18
 for <dev@dpdk.org>; Fri,  5 May 2017 08:29:02 +0200 (CEST)
Received: from orsmga004.jf.intel.com ([10.7.209.38])
 by orsmga105.jf.intel.com with ESMTP; 04 May 2017 23:29:01 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.38,291,1491289200"; d="scan'208";a="83902518"
Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205])
 by orsmga004.jf.intel.com with ESMTP; 04 May 2017 23:29:01 -0700
Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by
 fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS)
 id 14.3.319.2; Thu, 4 May 2017 23:29:01 -0700
Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by
 fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS)
 id 14.3.319.2; Thu, 4 May 2017 23:29:00 -0700
Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.246]) by
 SHSMSX151.ccr.corp.intel.com ([169.254.3.224]) with mapi id 14.03.0319.002;
 Fri, 5 May 2017 14:28:57 +0800
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>
Thread-Topic: [PATCH v2] test: add delay time in test alarm
Thread-Index: AQHSxUc3BJ3Vi0Xv00eA4D6STSlNaqHlRpSQ
Date: Fri, 5 May 2017 06:28:56 +0000
Message-ID: <4341B239C0EFF9468EE453F9E9F4604D3C6448ED@shsmsx102.ccr.corp.intel.com>
References: <1490076224-26964-1-git-send-email-qiming.yang@intel.com>
 <1493950673-15953-1-git-send-email-qiming.yang@intel.com>
In-Reply-To: <1493950673-15953-1-git-send-email-qiming.yang@intel.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [10.239.127.40]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [dpdk-dev] [PATCH v2] test: add delay time in test alarm
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 05 May 2017 06:29:03 -0000

Hi,=20
=20
> 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 =3D 0;
> +	int count =3D 0;
>  	cb_count.cnt =3D 0;
>=20
>  	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 !=3D 2 && count++ < 6)
> +		rte_delay_ms(10);
> +
>  	if (flag !=3D 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 =3D=3D 0 && count ++ < 6)
> +	while (flag =3D=3D 0 && count++ < 20)
>  		rte_delay_ms(RTE_TEST_CHECK_PERIOD);
>=20

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

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

Overall comment is to replace numeric with macro.