]> git.baikalelectronics.ru Git - kernel.git/commit
ftracetest: Take the first debugfs mount found
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Fri, 31 Oct 2014 22:02:05 +0000 (18:02 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Mon, 3 Nov 2014 18:42:49 +0000 (13:42 -0500)
commitbd9c979b5902657be926a1b086c849f3c7c1522e
treee679714789ebae73bc88f3c7a8a45e15521309d8
parent5d42002681e964b29dfc221c48e39b277e4c67fd
ftracetest: Take the first debugfs mount found

Running ftracetests on a box that mounted debugfs in two locations
made the ftracetests fail. This is because the tests uses a grep
of debugfs from the /proc/mounts file to find the debugfs mount
point, and then appends "/tracing" to that string to get the tracing
directory.

If the debugfs directory is mounted twice, then that grep will return
two answers and appending "/tracing" to a string with two lines will
not work.

Use "head -1" to only take the first mount point found.

Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
tools/testing/selftests/ftrace/ftracetest