All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Shuah Khan <shuahkh@osg.samsung.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Dave Jones <davej@codemonkey.org.uk>,
	Luis Henriques <luis.henriques@canonical.com>
Subject: Re: [PATCH] ftracetest: Do not use usleep
Date: Mon, 30 Mar 2015 17:15:11 -0400	[thread overview]
Message-ID: <20150330171511.5722493b@gandalf.local.home> (raw)
In-Reply-To: <1427329943-16896-1-git-send-email-namhyung@kernel.org>

On Thu, 26 Mar 2015 09:32:23 +0900
Namhyung Kim <namhyung@kernel.org> 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. But as we use 'cat trace | grep | wc -l' to read the events,
> the command themselves already generate some events before reading the
> trace file so no need to call [u]sleep explicitly.

Note, opening "trace" via cat stops tracing. There is a possible race
where the cat will not produce events. My worry is that if the shell
implements its own "cat" command, it may not fork, and open the trace
file. Which would not have any events in it, and opening it will
disable the rest of the command from having events.

What about using:

 ping localhost -c 1

?

-- Steve

  parent reply	other threads:[~2015-03-30 21:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-26  0:32 [PATCH] ftracetest: Do not use usleep Namhyung Kim
2015-03-30 20:47 ` Shuah Khan
2015-03-30 21:15 ` Steven Rostedt [this message]
2015-03-31  0:48   ` Namhyung Kim
2015-03-31  1:04     ` Steven Rostedt
2015-03-31  1:08     ` Pádraig Brady
2015-03-31  1:29       ` Steven Rostedt

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=20150330171511.5722493b@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=davej@codemonkey.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luis.henriques@canonical.com \
    --cc=mpe@ellerman.id.au \
    --cc=namhyung@kernel.org \
    --cc=shuahkh@osg.samsung.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.