aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2015-08-20 17:10:45 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2015-08-20 17:10:45 +0000
commitf999c862ec256fe170b3dac777b7f34df250c35a (patch)
tree3cb896116e0cb0ae2c812edd1574d6e976c35015
parent6992707b2a12c2323206c14f8c3983822d26c27c (diff)
downloadgcc-f999c862ec256fe170b3dac777b7f34df250c35a.zip
gcc-f999c862ec256fe170b3dac777b7f34df250c35a.tar.gz
gcc-f999c862ec256fe170b3dac777b7f34df250c35a.tar.bz2
libgo/testsuite: another fix for killing the sleep process
Avoid ps padding issues. Make sure we locate and kill just the sleep process. Reviewed-on: https://go-review.googlesource.com/13634 From-SVN: r227037
-rw-r--r--gcc/go/gofrontend/MERGE2
-rwxr-xr-xlibgo/testsuite/gotest9
2 files changed, 7 insertions, 4 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index 10f8b04..b2f305b 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-448d30b696461a39870d1b8beb1195e411300bfd
+ec34cfb0b148ff461df12c8f5270a06e2f438b7c
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
diff --git a/libgo/testsuite/gotest b/libgo/testsuite/gotest
index b2ee3ec..79097b8 100755
--- a/libgo/testsuite/gotest
+++ b/libgo/testsuite/gotest
@@ -504,6 +504,7 @@ xno)
fi
${GL} *.o ${GOLIBS}
+ set +e
if test "$bench" = ""; then
if test "$trace" = "true"; then
echo ./a.out -test.short -test.timeout=${timeout}s "$@"
@@ -518,9 +519,11 @@ xno)
wait $pid
status=$?
if ! test -f gotest-timeout; then
- out=`ps -o pid,ppid | grep " $alarmpid" | cut -f1 -d" "`
- if test "x$out" != "x"; then
- kill -9 $out
+ sleeppid=`ps -o pid,ppid,cmd | grep " $alarmpid " | grep sleep | sed -e 's/ *\([0-9]*\) .*$/\1/'`
+ kill $alarmpid
+ wait $alarmpid
+ if test "$sleeppid" != ""; then
+ kill $sleeppid
fi
fi
else