From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752910AbcEWSUb (ORCPT ); Mon, 23 May 2016 14:20:31 -0400 Received: from smtprelay0207.hostedemail.com ([216.40.44.207]:40563 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752124AbcEWSUa (ORCPT ); Mon, 23 May 2016 14:20:30 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::,RULES_HIT:41:69:355:379:541:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2895:3138:3139:3140:3141:3142:3353:3653:3865:3866:3867:3870:3872:3874:4250:4321:4605:5007:6261:7903:9121:10004:10400:10848:11233:11657:11658:11914:12043:12262:12266:12438:12517:12519:12555:12679:12740:13439:14181:14659:14721:21080:21324:21365:30054:30056:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:3,LUA_SUMMARY:none X-HE-Tag: truck87_5b4625b6b6a62 X-Filterd-Recvd-Size: 2927 Date: Mon, 23 May 2016 14:20:25 -0400 From: Steven Rostedt To: Linus Torvalds Cc: LKML , Ingo Molnar , Andrew Morton Subject: [GIT PULL] ftracetest: Use proper logic to find process PID Message-ID: <20160523142025.472fa261@gandalf.local.home> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linus, Reviewing the selftest I recently submitted, I realize that the second part of it uses my old hack to get the PID of the spawned background tasks, which doesn't work for all shells, instead of the common use of $!. Please pull the latest trace-v4.7-3 tree, which can be found at: git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git trace-v4.7-3 Tag SHA1: 773c674f8cf1e96253bef9889e5e26f0f3e8dcbb Head SHA1: 97f8827a8c7963756ae7d3ee898675b4667eca73 Steven Rostedt (Red Hat) (1): ftracetest: Use proper logic to find process PID ---- .../selftests/ftrace/test.d/instances/instance-event.tc | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) --------------------------- commit 97f8827a8c7963756ae7d3ee898675b4667eca73 Author: Steven Rostedt (Red Hat) Date: Mon May 23 10:04:46 2016 -0400 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 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