[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <548927B1.2010502@hitachi.com>
Date: Thu, 11 Dec 2014 14:12:17 +0900
From: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
To: Namhyung Kim <namhyung@...nel.org>
Cc: Michael Ellerman <mpe@...erman.id.au>,
Steven Rostedt <rostedt@...dmis.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: Re: [PATCH] ftracetest: Replace usleep with sleep 0.000001
Hi,
(2014/12/10 17:19), Namhyung Kim wrote:
> Hi Michael,
>
> On Wed, Dec 10, 2014 at 1:38 PM, Michael Ellerman <mpe@...erman.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@...achi.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists