Received: from eggs.gnu.org ([2001:4830:134:3::10]:44747) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buxwV-0000De-NG for qemu-devel@nongnu.org; Fri, 14 Oct 2016 04:34:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1buxwQ-0005Lh-JO for qemu-devel@nongnu.org; Fri, 14 Oct 2016 04:34:15 -0400 References: <1475348164-8593-1-git-send-email-lvivier@redhat.com> <1475348164-8593-4-git-send-email-lvivier@redhat.com> <20161007183817.0185305e@bahia> <20161014101157.4e076cfa@bahia> From: Laurent Vivier Message-ID: <00bf89ba-5466-8dbf-e692-0b868a63875b@redhat.com> Date: Fri, 14 Oct 2016 10:34:05 +0200 MIME-Version: 1.0 In-Reply-To: <20161014101157.4e076cfa@bahia> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 3/5] tests: use qtest_pc_boot()/qtest_shutdown() in virtio tests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Greg Kurz Cc: dgibson@redhat.com, thuth@redhat.com, qemu-ppc@nongnu.org, qemu-devel@nongnu.org On 14/10/2016 10:11, Greg Kurz wrote: > On Fri, 7 Oct 2016 19:54:54 +0200 > Laurent Vivier wrote: > >> On 07/10/2016 18:38, Greg Kurz wrote: >>> On Sat, 1 Oct 2016 20:56:02 +0200 >>> Laurent Vivier wrote: >>> >>>> This patch replaces calls to qtest_start() and qtest_end() by >>>> calls to qtest_pc_boot() and qtest_shutdown(). >>>> >>>> This allows to initialize memory allocator and PCI interface >>>> functions. This will ease to enable virtio tests on other >>>> architectures by only adding a specific qtest_XXX_boot() (like >>>> qtest_spapr_boot()). >>>> >>>> Signed-off-by: Laurent Vivier >>>> Reviewed-by: Greg Kurz >>>> --- >>> >>> Oops I had missed it during review but I have a single remark for the 9p >>> test. >>> >>> My R-b stands anyway. >>> >>>> tests/virtio-9p-test.c | 51 +++++++--------- >>>> tests/virtio-blk-test.c | 150 ++++++++++++++++++++--------------------------- >>>> tests/virtio-net-test.c | 39 +++++------- >>>> tests/virtio-scsi-test.c | 67 +++++++++------------ >>>> 4 files changed, 129 insertions(+), 178 deletions(-) >>>> >>>> diff --git a/tests/virtio-9p-test.c b/tests/virtio-9p-test.c >>>> index e8b2196..7698014 100644 >>>> --- a/tests/virtio-9p-test.c >>>> +++ b/tests/virtio-9p-test.c >>>> @@ -10,62 +10,56 @@ >>>> #include "qemu/osdep.h" >>>> #include "libqtest.h" >>>> #include "qemu-common.h" >>>> -#include "libqos/pci-pc.h" >>>> +#include "libqos/libqos-pc.h" >>>> #include "libqos/virtio.h" >>>> #include "libqos/virtio-pci.h" >>>> -#include "libqos/malloc.h" >>>> -#include "libqos/malloc-pc.h" >>>> #include "standard-headers/linux/virtio_ids.h" >>>> #include "standard-headers/linux/virtio_pci.h" >>>> >>>> static const char mount_tag[] = "qtest"; >>>> static char *test_share; >>>> >>>> -static void qvirtio_9p_start(void) >>>> -{ >>>> - char *args; >>>> >>>> +static QOSState *qvirtio_9p_start(void) >>>> +{ >>>> test_share = g_strdup("/tmp/qtest.XXXXXX"); >>>> g_assert_nonnull(mkdtemp(test_share)); >>>> + const char *cmd = "-fsdev local,id=fsdev0,security_model=none,path=%s " >>>> + "-device virtio-9p-pci,fsdev=fsdev0,mount_tag=%s"; >>>> >>> >>> Even if C99 supports declarations within the code, I prefer the old school way >>> of declaring variables followed by an empty line, at the top. >> >> Yes, you're right, I prefer too... >> >> I will resend the series next week. >> >> Thanks, >> Laurent >> >> > > Hi Laurent, Hi Greg, > > Do you plan to repost soon ? I ask because I have some patches to add > functional testing to virtio-9p-test, that will likely conflict with > this series. I'm going to repost it this morning. Laurent