From owner-svn-src-user@FreeBSD.ORG Sat May 17 04:49:30 2014 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0C13D412; Sat, 17 May 2014 04:49:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF1E02D62; Sat, 17 May 2014 04:49:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4H4nTEl093940; Sat, 17 May 2014 04:49:29 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4H4nTk4093939; Sat, 17 May 2014 04:49:29 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201405170449.s4H4nTk4093939@svn.freebsd.org> From: Peter Holm Date: Sat, 17 May 2014 04:49:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r266298 - user/pho/stress2/misc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2014 04:49:30 -0000 Author: pho Date: Sat May 17 04:49:29 2014 New Revision: 266298 URL: http://svnweb.freebsd.org/changeset/base/266298 Log: Improve cleanup after test. Sponsored by: EMC / Isilon storage division Modified: user/pho/stress2/misc/signal.sh Modified: user/pho/stress2/misc/signal.sh ============================================================================== --- user/pho/stress2/misc/signal.sh Sat May 17 04:29:14 2014 (r266297) +++ user/pho/stress2/misc/signal.sh Sat May 17 04:49:29 2014 (r266298) @@ -193,7 +193,9 @@ cc -o tkill -Wall -Wextra tkill.c || exi rm -f waitthread.c tkill.c rm -f gdbfifo gdbout pstat /tmp/waitthread +ps | grep -v grep | grep waitthread | awk '{print $1}' | xargs kill mkfifo gdbfifo +trap "rm -f gdbfifo" 0 sleep 300 > gdbfifo & # Keep the fifo open fifopid=$! @@ -203,6 +205,7 @@ echo "run" > gdbfifo sleep .2 pid=`ps | grep -v grep | grep "waitthread 8" | sed 's/^ *//;s/ .*//'` +[ -z "$pid" ] && echo "Could not find pid" && exit 1 procstat -t $pid > pstat t1=`grep fifo pstat | awk '{print $2}'` @@ -216,8 +219,6 @@ echo "quit" > gdbfifo kill $fifopid -if grep -q "signal SIGINT" gdbout; then - rm -f gdbfifo gdbout pstat waitthread tkill /tmp/waitthread -else - echo FAIL -fi +grep -q "signal SIGINT" gdbout || echo FAIL +rm -f gdbfifo gdbout pstat waitthread tkill /tmp/waitthread +ps | grep -v grep | grep waitthread | awk '{print $1}' | xargs kill