From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
Steven Rostedt <rostedt@goodmis.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Re: [PATCH] ftracetest: Replace usleep with sleep 0.000001
Date: Thu, 11 Dec 2014 14:12:17 +0900 [thread overview]
Message-ID: <548927B1.2010502@hitachi.com> (raw)
In-Reply-To: <CAM9d7cgY6t7_XB+SryQft_BA0zbtcKN1ZrfQ-qONtb-SkB89Jw@mail.gmail.com>
Hi,
(2014/12/10 17:19), Namhyung Kim wrote:
> Hi Michael,
>
> On Wed, Dec 10, 2014 at 1:38 PM, Michael Ellerman <mpe@ellerman.id.au> wrote:
>> usleep is a Fedoraism, it's not generally available on Debian based
>> systems AFAICS.
>>
>> GNU sleep accepts a floating point argument, so use that instead.
>
> I tested it on busybox not Debian, sorry. But it seems busybox's
> sleep doesn't support floating point argument..
>
> / # ls -l `which sleep`
> lrwxrwxrwx 1 root rooot 7 May 22 2014 /bin/sleep -> busybox
>
> / # sleep 0.1
> sleep: invalid number '0.1'
I also have same result. Basically, ftracetest should be able to run on busybox.
So, I think we'd better check whether usleep is available, and if not, fallback
to sleep like as below.
if which usleep &> /dev/null; then
usleep 1
else
sleep 0.000001
fi
Thank you,
--
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Research Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com
next prev parent reply other threads:[~2014-12-11 5:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-10 4:38 [PATCH] ftracetest: Replace usleep with sleep 0.000001 Michael Ellerman
2014-12-10 8:19 ` Namhyung Kim
2014-12-11 5:12 ` Masami Hiramatsu [this message]
2014-12-11 23:39 ` Michael Ellerman
2014-12-20 20:42 ` Pavel Machek
2014-12-20 22:07 ` Steven Rostedt
2014-12-23 4:21 ` Namhyung Kim
2014-12-23 7:08 ` Michael Ellerman
2014-12-24 1:00 ` Masami Hiramatsu
2014-12-25 23:17 ` Pavel Machek
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=548927B1.2010502@hitachi.com \
--to=masami.hiramatsu.pt@hitachi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mpe@ellerman.id.au \
--cc=namhyung@kernel.org \
--cc=rostedt@goodmis.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