From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:60040) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RhiXm-00089B-Q2 for qemu-devel@nongnu.org; Mon, 02 Jan 2012 09:07:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RhiXl-00059z-QD for qemu-devel@nongnu.org; Mon, 02 Jan 2012 09:07:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:3938) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RhiXl-00059o-Jm for qemu-devel@nongnu.org; Mon, 02 Jan 2012 09:07:17 -0500 Message-ID: <4F01BA0C.2070305@redhat.com> Date: Mon, 02 Jan 2012 15:07:08 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <4EEF70B4.3070109@us.ibm.com> <4EF73EF5.8050606@redhat.com> <4EF88EC0.8020301@codemonkey.ws> <4EF8FC88.70809@redhat.com> <4EFA4829.4000207@redhat.com> <4EFA80EA.3050405@codemonkey.ws> <4EFAA2A2.4000107@redhat.com> <4EFB2764.7040006@codemonkey.ws> <4EFB2F36.2090408@redhat.com> <4EFB35AB.6040003@redhat.com> <4EFB4757.4020504@codemonkey.ws> <4EFB5138.5020502@redhat.com> <4EFC916E.4070902@codemonkey.ws> <4EFC9706.4090500@redhat.com> <4EFCB274.5020102@codemonkey.ws> In-Reply-To: <4EFCB274.5020102@codemonkey.ws> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [ANNOUNCE] qemu-test: a set of tests scripts for QEMU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: "lmr@redhat.com" , Peter Maydell , Stefan Hajnoczi , cleber@redhat.com, dlaor@redhat.com, qemu-devel , Avi Kivity , Cleber Rosa , Gerd Hoffmann On 12/29/2011 07:33 PM, Anthony Liguori wrote: > > FWIW, I expect virtio-scsi to be the first guinea pig here... I believe > Stefan has already started looking at writing some qtest based tests for > virtio-scsi. I'm curious, because a SCSI HBA makes it as hard as it can be to write unit tests. Pretty much everything you do will test the interactions between the SCSI devices and the block layer, more than the HBA itself. This is especially for such a simple HBA; unit testing is much more "interesting" for something like the LSI device. So, to test the HBA you need write either a mock SCSI device, or a mock block device. (I hate mocks). Now that the client is asynchronous, NBD is a pretty effective way to write a mock block device, though not the simplest. Paolo