This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit+7.6] testsuite: Add more valgrind kills on cleanup


Hi,

I have already checked in a similar stale valgrind cleanup:
	[patch] testsuite: valgrind-infcall.exp: explicit kill
	http://sourceware.org/ml/gdb-patches/2013-02/msg00459.html
	Message-ID: <20130218154552.GA16416@host2.jankratochvil.net>

I have found today that it still does not solve everything, the missed case(s)
are patched below.

Checked in:
	http://sourceware.org/ml/gdb-cvs/2013-03/msg00156.html
and also for 7.6 as this is a very safe patch:
	http://sourceware.org/ml/gdb-cvs/2013-03/msg00157.html

As Tom asked off-list before this case was not caught by 'orphanripper'
	http://pkgs.fedoraproject.org/cgit/gdb.git/tree/gdb-orphanripper.c
present in Fedora GDB as this tool got stale waiting on fd EOF with stuck
valgrind had this fd open for writing.  This was exactly the reason why
I wrote 'orphanripper' and its SIGCHLD handling should have caught that, I do
not yet understand why 'orphanripper' failed in this case.


Jan


http://sourceware.org/ml/gdb-cvs/2013-03/msg00156.html

--- src/gdb/testsuite/ChangeLog	2013/03/15 17:10:43	1.3588
+++ src/gdb/testsuite/ChangeLog	2013/03/17 20:37:30	1.3589
@@ -1,3 +1,10 @@
+2013-03-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.base/valgrind-infcall.exp
+	(continue #$continue_count) <remote connection closed>
+	(continue #$continue_count) <valgrind vgdb has terminated>: Add kill of
+	$valgrind_pid.
+
 2013-03-15  Tom Tromey  <tromey@redhat.com>
 
 	* gdb.cp/overload.cc (intintfunc): New.
--- src/gdb/testsuite/gdb.base/valgrind-infcall.exp	2013/02/27 18:46:52	1.7
+++ src/gdb/testsuite/gdb.base/valgrind-infcall.exp	2013/03/17 20:37:32	1.8
@@ -101,10 +101,14 @@
 	}
 	-re "Remote connection closed.*\r\n$gdb_prompt $" {
 	    fail "$test (remote connection closed)"
+	    # Only if valgrind got stuck.
+	    remote_exec host "kill -9 ${valgrind_pid}"
 	    return -1
 	}
 	-re "The program is not being run\\.\r\n$gdb_prompt $" {
 	    fail "$test (valgrind vgdb has terminated)"
+	    # Only if valgrind got stuck.
+	    remote_exec host "kill -9 ${valgrind_pid}"
 	    return -1
 	}
 	-re "\r\n$gdb_prompt $" {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]