[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/2] tests: Fix possible deadlock in qtest initi
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH 0/2] tests: Fix possible deadlock in qtest initialization |
Date: |
Mon, 10 Mar 2014 16:02:59 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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.
Stefan