public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* libgo patch committed: Another fix for killing sleep processes in testsuite
@ 2015-08-20 17:28 Ian Lance Taylor
  0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2015-08-20 17:28 UTC (permalink / raw)
  To: gcc-patches, gofrontend-dev

[-- Attachment #1: Type: text/plain, Size: 194 bytes --]

I committed this patch to libgo as another fix for killing the sleep
processes in the testsuite.  This avoids padding issues in the ps
output.  Ran libgo testsuite.  Committed to mainline.

Ian

[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1224 bytes --]

Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE	(revision 226899)
+++ gcc/go/gofrontend/MERGE	(working copy)
@@ -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.
Index: libgo/testsuite/gotest
===================================================================
--- libgo/testsuite/gotest	(revision 226846)
+++ libgo/testsuite/gotest	(working copy)
@@ -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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-08-20 17:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-20 17:28 libgo patch committed: Another fix for killing sleep processes in testsuite Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).