Date: Sat, 17 May 2014 04:49:29 +0000 (UTC) From: Peter Holm <pho@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r266298 - user/pho/stress2/misc Message-ID: <201405170449.s4H4nTk4093939@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405170449.s4H4nTk4093939>