qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] qtest: don't leak pid files and UNIX domain sockets
@ 2013-11-21 11:03 Stefan Hajnoczi
  2013-11-21 11:03 ` [Qemu-devel] [PATCH 1/2] qtest: unlink QEMU pid file after startup Stefan Hajnoczi
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Stefan Hajnoczi @ 2013-11-21 11:03 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann, Stefan Hajnoczi, Andreas Faerber

GLib uses abort(3) to exit failed test cases.  As a result, the pid file and
UNIX domain sockets for a running test are leaked upon failure.

Since abort(3) does not call atexit(3) handler functions, we could set up a
SIGABRT handler that performs cleanup.  But there are other conditions where
processes die, like SIGSEGV or SIGBUS.

Let's unlink pid files and UNIX domain sockets as soon as the QEMU process has
initialized and connections have been made.  This eliminates the possibility of
leaking these files.

Note that the actual QEMU process is orphaned when a test case fails.  This
series does not fix that problem.

Stefan Hajnoczi (2):
  qtest: unlink QEMU pid file after startup
  qtest: unlink UNIX domain sockets after connecting

 tests/libqtest.c | 45 +++++++++++++++++++++++----------------------
 1 file changed, 23 insertions(+), 22 deletions(-)

-- 
1.8.4.2

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2014-02-03 15:47 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-21 11:03 [Qemu-devel] [PATCH 0/2] qtest: don't leak pid files and UNIX domain sockets Stefan Hajnoczi
2013-11-21 11:03 ` [Qemu-devel] [PATCH 1/2] qtest: unlink QEMU pid file after startup Stefan Hajnoczi
2013-12-06 10:59   ` Markus Armbruster
2013-11-21 11:03 ` [Qemu-devel] [PATCH 2/2] qtest: unlink UNIX domain sockets after connecting Stefan Hajnoczi
2013-12-05 15:57 ` [Qemu-devel] [PATCH 0/2] qtest: don't leak pid files and UNIX domain sockets Stefan Hajnoczi
2013-12-06 11:07 ` Markus Armbruster
2014-01-31  0:07 ` Peter Maydell
2014-01-31 10:56   ` Stefan Hajnoczi
2014-02-03  9:00     ` Gerd Hoffmann
2014-02-03  9:54   ` Stefan Hajnoczi
2014-02-03 10:30     ` Peter Maydell
2014-02-03 15:22       ` Stefan Hajnoczi
2014-02-03 11:10     ` Andreas Färber
2014-02-03 11:24       ` Peter Maydell

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 NNTP newsgroup(s).