From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOU3l-0008BB-SP for qemu-devel@nongnu.org; Fri, 14 Mar 2014 11:30:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WOU3g-0001DA-Ul for qemu-devel@nongnu.org; Fri, 14 Mar 2014 11:30:09 -0400 Received: from mail-ee0-x234.google.com ([2a00:1450:4013:c00::234]:57586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOU3g-0001BY-OR for qemu-devel@nongnu.org; Fri, 14 Mar 2014 11:30:04 -0400 Received: by mail-ee0-f52.google.com with SMTP id e49so1486766eek.25 for ; Fri, 14 Mar 2014 08:30:03 -0700 (PDT) Date: Fri, 14 Mar 2014 16:30:00 +0100 From: Stefan Hajnoczi Message-ID: <20140314153000.GA23468@stefanha-thinkpad.redhat.com> References: <1393425020-24829-1-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1393425020-24829-1-git-send-email-stefanha@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 0/3] nbd: fix issues when connection breaks List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Paolo Bonzini , nick@bytemark.co.uk, qemu-devel@nongnu.org, bluewindow@h3c.com On Wed, Feb 26, 2014 at 03:30:17PM +0100, Stefan Hajnoczi wrote: > v2: > * Use qemu-iotests 083 test number to avoid conflicts [kwolf] > * Test class negotiation without export name [lupine] > * Test short replies from the server [lupine] > > The first patch ensures the nbd_receive_reply() fd handler is unregistered when > the connection to the server breaks. This avoids high CPU consumption and > flooding error messages. > > The second patch introduces an NBD server fault injection script. Using this > fake NBD server it is possible to exercise error handling code paths in the NBD > client. > > The third patch adds qemu-iotests test case 083 to verify qemu-io exits with an > error at each point where the connection can break. > > Stefan Hajnoczi (3): > nbd: close socket if connection breaks > tests: add nbd-fault-injector.py utility > qemu-iotests: add 083 NBD client disconnect tests > > block/nbd-client.c | 33 ++-- > tests/qemu-iotests/083 | 129 +++++++++++++++ > tests/qemu-iotests/083.out | 163 +++++++++++++++++++ > tests/qemu-iotests/group | 1 + > tests/qemu-iotests/nbd-fault-injector.py | 264 +++++++++++++++++++++++++++++++ > 5 files changed, 575 insertions(+), 15 deletions(-) > create mode 100755 tests/qemu-iotests/083 > create mode 100644 tests/qemu-iotests/083.out > create mode 100755 tests/qemu-iotests/nbd-fault-injector.py Applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan