lkml.org 
[lkml]   [2015]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [for-next][PATCH 3/7] ftracetest: Add instance create and delete test
On Wed, 09 Dec 2015 16:09:38 +1100
Michael Ellerman <mpe@ellerman.id.au> wrote:

> I suspect because my /bin/sh is dash?
>
> # /bin/dash
> # kill -1
> /bin/dash: 1: kill: Usage: kill [-s sigspec | -signum | -sigspec] [pid | job]... or
> kill -l [exitstatus]
>

I did some digging and found a better way to do this. Does the belowe
patch fix things for you?

-- Steve


diff --git a/tools/testing/selftests/ftrace/test.d/instances/instance.tc b/tools/testing/selftests/ftrace/test.d/instances/instance.tc
index 773e276ff90b..1e1abe0ad354 100644
--- a/tools/testing/selftests/ftrace/test.d/instances/instance.tc
+++ b/tools/testing/selftests/ftrace/test.d/instances/instance.tc
@@ -39,28 +39,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

\
 
 \ /
  Last update: 2015-12-11 20:41    [W:0.065 / U:3.784 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site