summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/ftrace
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2016-05-23 10:04:46 -0400
committerSteven Rostedt <rostedt@goodmis.org>2016-05-23 10:04:46 -0400
commit97f8827a8c7963756ae7d3ee898675b4667eca73 (patch)
tree98e263b36b4bef68ef015a44850982566a642236 /tools/testing/selftests/ftrace
parent8329e818f14926a6040df86b2668568bde342ebf (diff)
ftracetest: Use proper logic to find process PID
Half of the test in instance-event.tc was updated to use $! to find the PID of the previous background process that was launched, but the second part of the test still used the parsing of "jobs", which does not work on all shells like $! does. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'tools/testing/selftests/ftrace')
-rw-r--r--tools/testing/selftests/ftrace/test.d/instances/instance-event.tc15
1 files changed, 5 insertions, 10 deletions
diff --git a/tools/testing/selftests/ftrace/test.d/instances/instance-event.tc b/tools/testing/selftests/ftrace/test.d/instances/instance-event.tc
index 5f2abd03f16b..4c5a061a5b4e 100644
--- a/tools/testing/selftests/ftrace/test.d/instances/instance-event.tc
+++ b/tools/testing/selftests/ftrace/test.d/instances/instance-event.tc
@@ -92,28 +92,23 @@ instance_slam() {
}
instance_slam &
-x=`jobs -l`
-p1=`echo $x | cut -d' ' -f2`
+p1=$!
echo $p1
instance_slam &
-x=`jobs -l | tail -1`
-p2=`echo $x | cut -d' ' -f2`
+p2=$!
echo $p2
instance_slam &
-x=`jobs -l | tail -1`
-p3=`echo $x | cut -d' ' -f2`
+p3=$!
echo $p3
instance_slam &
-x=`jobs -l | tail -1`
-p4=`echo $x | cut -d' ' -f2`
+p4=$!
echo $p4
instance_slam &
-x=`jobs -l | tail -1`
-p5=`echo $x | cut -d' ' -f2`
+p5=$!
echo $p5
ls -lR >/dev/null