]> git.baikalelectronics.ru Git - kernel.git/commit
ftracetest: Fix instance test to use proper shell command for pids
authorSteven Rostedt <rostedt@goodmis.org>
Fri, 11 Dec 2015 19:36:17 +0000 (14:36 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Fri, 19 Feb 2016 17:11:21 +0000 (12:11 -0500)
commit3492be571f69420b7cbe00e3a8d4c5a8c22a31cd
treec48c7dffe2277b2225f27f5fe6c2ddd71ea78b02
parentb41b6abe7592f4243a4a68d76f5aa9399e9ef311
ftracetest: Fix instance test to use proper shell command for pids

The ftracetest instance test used parsing of the "jobs" output to find the
pid of the subshell that is executed previously. But this is not portable to
all major shells that may run these tests. The proper way to get the pid of
the subshell is the shell command "$!". This will return the pid of the
previously executed command. Use that instead, otherwise the test does not
work in all environments.

Link: http://lkml.kernel.org/r/20151211143617.65f4d7a1@gandalf.local.home
Reported-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
tools/testing/selftests/ftrace/test.d/instances/instance.tc