From: Marcel Apfelbaum <marcel.a@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: armbru@redhat.com, aliguori@amazon.com, afaerber@suse.de,
stefanha@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 0/2] tests: Fix possible deadlock in qtest initialization
Date: Mon, 10 Mar 2014 17:21:17 +0200 [thread overview]
Message-ID: <1394464877.3981.21.camel@localhost.localdomain> (raw)
In-Reply-To: <20140310150259.GB32400@stefanha-thinkpad.redhat.com>
On Mon, 2014-03-10 at 16:02 +0100, Stefan Hajnoczi wrote:
> On Mon, Mar 10, 2014 at 02:12:12PM +0200, Marcel Apfelbaum wrote:
> > 'socket_accept' waits for Qemu to init its unix socket.
> > If Qemu encounters an error during command line parsing,
> > it can exit before initializing the communication channel.
> > It gets worse as the make check-qtest-* gets stuck without
> > notifying which test exactly has problems, so debugging can
> > be a challenge.
> >
> > The solution has two parts:
> > - Use a timeout for the socket.
> > - Expose a qtest_state_valid that checks that the connections
> > with Qemu are OK.
>
> See below why I think qtest_state_valid() is unnecessary as a libqtest.h
> API.
>
> > Asserting qtest_state_valid in each test after qtest_init
> > is a must, as we need to trace which test failed.
>
> Inability to tell which qtest failed is a Makefile problem. The
> solution is not to move all asserts to the outer-most level just so the
> error message includes the test name.
>
> Either we need to invoke gtester separately for each test - that way the
> Makefile can print "TEST <name>" for each binary. Or maybe gtester has
> options for formatting output better.
Hi Stefan,
Thanks for the review.
I am more concerned of PATCH 1/2, because it is a blocker for another series I am working on.
I can resend only the first one which adds socket timeout and leaves the original assert.
Would you be OK with this?
Now regarding the issue you brought up (less important):
- Tweaking the Makefile to run each qtest separately and not all tests per arch
is a viable solution, however I am not familiar with the makefile magic and
it will take me a lot of time to get into it.
- I am not sure how gtester formatting options can helps us here, because
we *will* get an assert (after the first patch), but it would be in the qtestlib
which is not the desired place. (it is not a qtestlib bug)
Thanks,
Marcel
>
> Stefan
>
next prev parent reply other threads:[~2014-03-10 15:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-10 12:12 [Qemu-devel] [PATCH 0/2] tests: Fix possible deadlock in qtest initialization Marcel Apfelbaum
2014-03-10 12:12 ` [Qemu-devel] [PATCH 1/2] tests/libqtest: " Marcel Apfelbaum
2014-03-10 19:02 ` Stefan Hajnoczi
2014-03-12 9:42 ` Markus Armbruster
2014-03-12 9:54 ` Marcel Apfelbaum
2014-03-10 12:12 ` [Qemu-devel] [PATCH 2/2] tests: check that qtest state is valid before starting the test Marcel Apfelbaum
2014-03-10 15:02 ` [Qemu-devel] [PATCH 0/2] tests: Fix possible deadlock in qtest initialization Stefan Hajnoczi
2014-03-10 15:21 ` Marcel Apfelbaum [this message]
2014-03-10 19:13 ` Stefan Hajnoczi
2014-03-11 10:11 ` Marcel Apfelbaum
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=1394464877.3981.21.camel@localhost.localdomain \
--to=marcel.a@redhat.com \
--cc=afaerber@suse.de \
--cc=aliguori@amazon.com \
--cc=armbru@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=stefanha@redhat.com \
/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).