public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Alexey Kodanev <alexey.kodanev@oracle.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/1] network: portability: using tst_sleep instead of usleep
Date: Wed, 9 Nov 2016 14:43:02 +0300	[thread overview]
Message-ID: <58230BC6.8030608@oracle.com> (raw)
In-Reply-To: <20161108161351.16366-1-pvorel@suse.cz>

Hi,
On 11/08/2016 07:13 PM, Petr Vorel wrote:
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
>   testcases/network/dhcp/dhcp_lib.sh              | 4 ++--
>   testcases/network/tcp_cmds/ipneigh/ipneigh01.sh | 2 +-
>   2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/testcases/network/dhcp/dhcp_lib.sh b/testcases/network/dhcp/dhcp_lib.sh
> index 140619d..85f9b88 100755
> --- a/testcases/network/dhcp/dhcp_lib.sh
> +++ b/testcases/network/dhcp/dhcp_lib.sh
> @@ -26,12 +26,12 @@ stop_dhcp()
>   	while [ $count -le 10 ]; do
>   		pkill -x $dhcp_name
>   		[ "$(pgrep -x $dhcp_name)" ] || return 0
> -		usleep 100000
> +		tst_sleep 100ms
>   		count=$((count + 1))
>   	done
>   
>   	pkill -9 -x $dhcp_name
> -	usleep 100000
> +	tst_sleep 100ms
>   	[ "$(pgrep -x $dhcp_name)" ] && return 1 || return 0
>   }
>   
> diff --git a/testcases/network/tcp_cmds/ipneigh/ipneigh01.sh b/testcases/network/tcp_cmds/ipneigh/ipneigh01.sh
> index 736d149..31d6cc6 100755
> --- a/testcases/network/tcp_cmds/ipneigh/ipneigh01.sh
> +++ b/testcases/network/tcp_cmds/ipneigh/ipneigh01.sh
> @@ -52,7 +52,7 @@ do_test()
>   				ret=0
>   				break;
>   			fi
> -			usleep 100
> +			tst_sleep 100us

Patch applied. I've changed sleep time here to 'ms', it should have been 
"usleep 100000", so the patch is fixing it as well,
added comment about this in the patch.

Thanks,
Alexey

>   		done
>   
>   		[ "$ret" -ne 0 ] && \


      reply	other threads:[~2016-11-09 11:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-08 16:13 [LTP] [PATCH 1/1] network: portability: using tst_sleep instead of usleep Petr Vorel
2016-11-09 11:43 ` Alexey Kodanev [this message]

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=58230BC6.8030608@oracle.com \
    --to=alexey.kodanev@oracle.com \
    --cc=ltp@lists.linux.it \
    /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