From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
Andreas Faerber <afaerber@suse.de>,
Anthony Liguori <aliguori@amazon.com>
Subject: [Qemu-devel] [PULL 0/2] qtest: don't leak pid files and UNIX domain sockets
Date: Mon, 3 Feb 2014 16:20:12 +0100 [thread overview]
Message-ID: <1391440814-22229-1-git-send-email-stefanha@redhat.com> (raw)
This pull request has been rebased onto qemu.git/master and retested.
The series fixes init_socket() failures when reused PIDs cause temporary file
name collisions.
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.5.3
next reply other threads:[~2014-02-03 15:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-03 15:20 Stefan Hajnoczi [this message]
2014-02-03 15:20 ` [Qemu-devel] [PULL 1/2] qtest: unlink QEMU pid file after startup Stefan Hajnoczi
2014-02-03 15:20 ` [Qemu-devel] [PULL 2/2] qtest: unlink UNIX domain sockets after connecting Stefan Hajnoczi
2014-02-03 16:01 ` [Qemu-devel] [PULL 0/2] qtest: don't leak pid files and UNIX domain sockets Peter Maydell
2014-02-04 8:31 ` Stefan Hajnoczi
2014-02-07 16:41 ` Peter Maydell
2014-02-09 11:40 ` Andreas Färber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1391440814-22229-1-git-send-email-stefanha@redhat.com \
--to=stefanha@redhat.com \
--cc=afaerber@suse.de \
--cc=aliguori@amazon.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).