lkml.org 
[lkml]   [2015]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2.1] ftracetest: Do not use usleep directly
On Thu, 02 Apr 2015 14:58:04 +0900
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> wrote:

> (2015/04/02 13:34), Namhyung Kim wrote:
> > The usleep is only provided on distros from Redhat so running ftracetest
> > on other distro resulted in failures due to the missing usleep.
> >
> > The reason of using [u]sleep in the test was to generate (scheduler)
> > events. It can be done various ways like this:
> >
> > yield() { ping localhost -c 1 || sleep .001 || usleep 1 || sleep 1; }
>
> Nice hack! :)

Yep, it was Pádraig Brady's idea.

>
> Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>

Acked-by: Steven Rostedt <rostedt@goodmis.org>

-- Steve

>
> >
> > Reported-by: Michael Ellerman <mpe@ellerman.id.au>
> > Reported-by: Dave Jones <davej@codemonkey.org.uk>
> > Reported-by: Luis Henriques <luis.henriques@canonical.com>
> > Based-on-patch-by: Pádraig Brady <P@draigBrady.com>
> > CC: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
> > Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> > ---


\
 
 \ /
  Last update: 2015-04-02 16:21    [W:0.294 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site