[Qemu-devel] [PATCH v2 3/3] docker: Add test-block

Fam Zheng posted 3 patches 8 years, 2 months ago
There is a newer version of this series
[Qemu-devel] [PATCH v2 3/3] docker: Add test-block
Posted by Fam Zheng 8 years, 2 months ago
Signed-off-by: Fam Zheng <famz@redhat.com>
---
 tests/docker/test-block | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100755 tests/docker/test-block

diff --git a/tests/docker/test-block b/tests/docker/test-block
new file mode 100755
index 0000000000..20ef70538f
--- /dev/null
+++ b/tests/docker/test-block
@@ -0,0 +1,21 @@
+#!/bin/bash -e
+#
+# Run block test cases
+#
+# Copyright (c) 2017 Red Hat Inc.
+#
+# Authors:
+#  Fam Zheng <famz@redhat.com>
+#
+# This work is licensed under the terms of the GNU GPL, version 2
+# or (at your option) any later version. See the COPYING file in
+# the top-level directory.
+
+. common.rc
+
+cd "$BUILD_DIR"
+
+build_qemu --target-list=x86_64-softmmu
+cd tests/qemu-iotests
+./check -raw
+./check -qcow2
-- 
2.13.5


Re: [Qemu-devel] [PATCH v2 3/3] docker: Add test-block
Posted by Eric Blake 8 years, 2 months ago
On 08/31/2017 06:22 AM, Fam Zheng wrote:
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
>  tests/docker/test-block | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
>  create mode 100755 tests/docker/test-block


> +cd "$BUILD_DIR"
> +
> +build_qemu --target-list=x86_64-softmmu
> +cd tests/qemu-iotests
> +./check -raw
> +./check -qcow2

Should we also run ./check -nbd?

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Re: [Qemu-devel] [PATCH v2 3/3] docker: Add test-block
Posted by Kashyap Chamarthy 8 years, 2 months ago
On Thu, Aug 31, 2017 at 11:06:55AM -0500, Eric Blake wrote:
> On 08/31/2017 06:22 AM, Fam Zheng wrote:
> > Signed-off-by: Fam Zheng <famz@redhat.com>
> > ---
> >  tests/docker/test-block | 21 +++++++++++++++++++++
> >  1 file changed, 21 insertions(+)
> >  create mode 100755 tests/docker/test-block
> 
> 
> > +cd "$BUILD_DIR"
> > +
> > +build_qemu --target-list=x86_64-softmmu
> > +cd tests/qemu-iotests
> > +./check -raw
> > +./check -qcow2
> 
> Should we also run ./check -nbd?

FWIW, yes, if it's not too onerous.  Not least because many of the
NBD-using block layer features are important storage virtualization
features for management layers.

-- 
/kashyap

Re: [Qemu-devel] [PATCH v2 3/3] docker: Add test-block
Posted by Fam Zheng 8 years, 2 months ago
On Thu, 08/31 11:06, Eric Blake wrote:
> On 08/31/2017 06:22 AM, Fam Zheng wrote:
> > Signed-off-by: Fam Zheng <famz@redhat.com>
> > ---
> >  tests/docker/test-block | 21 +++++++++++++++++++++
> >  1 file changed, 21 insertions(+)
> >  create mode 100755 tests/docker/test-block
> 
> 
> > +cd "$BUILD_DIR"
> > +
> > +build_qemu --target-list=x86_64-softmmu
> > +cd tests/qemu-iotests
> > +./check -raw
> > +./check -qcow2
> 
> Should we also run ./check -nbd?

Yes, I can add it, and -g quick to all formats, so that the whole test is not
lagged too badly, and that writing "quick" tests is encouraged in some degree.

Fam

Re: [Qemu-devel] [PATCH v2 3/3] docker: Add test-block
Posted by Daniel P. Berrange 8 years, 2 months ago
On Fri, Sep 01, 2017 at 05:55:52PM +0800, Fam Zheng wrote:
> On Thu, 08/31 11:06, Eric Blake wrote:
> > On 08/31/2017 06:22 AM, Fam Zheng wrote:
> > > Signed-off-by: Fam Zheng <famz@redhat.com>
> > > ---
> > >  tests/docker/test-block | 21 +++++++++++++++++++++
> > >  1 file changed, 21 insertions(+)
> > >  create mode 100755 tests/docker/test-block
> > 
> > 
> > > +cd "$BUILD_DIR"
> > > +
> > > +build_qemu --target-list=x86_64-softmmu
> > > +cd tests/qemu-iotests
> > > +./check -raw
> > > +./check -qcow2
> > 
> > Should we also run ./check -nbd?
> 
> Yes, I can add it, and -g quick to all formats, so that the whole test is not
> lagged too badly, and that writing "quick" tests is encouraged in some degree.

If you also add a "daily" test, you could make the daily one run all tests,
while the per-commit one just uses 'quick'.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

Re: [Qemu-devel] [PATCH v2 3/3] docker: Add test-block
Posted by Daniel P. Berrange 8 years, 2 months ago
On Thu, Aug 31, 2017 at 07:22:10PM +0800, Fam Zheng wrote:
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
>  tests/docker/test-block | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
>  create mode 100755 tests/docker/test-block
> 
> diff --git a/tests/docker/test-block b/tests/docker/test-block
> new file mode 100755
> index 0000000000..20ef70538f
> --- /dev/null
> +++ b/tests/docker/test-block
> @@ -0,0 +1,21 @@
> +#!/bin/bash -e
> +#
> +# Run block test cases
> +#
> +# Copyright (c) 2017 Red Hat Inc.
> +#
> +# Authors:
> +#  Fam Zheng <famz@redhat.com>
> +#
> +# This work is licensed under the terms of the GNU GPL, version 2
> +# or (at your option) any later version. See the COPYING file in
> +# the top-level directory.
> +
> +. common.rc
> +
> +cd "$BUILD_DIR"
> +
> +build_qemu --target-list=x86_64-softmmu
> +cd tests/qemu-iotests
> +./check -raw
> +./check -qcow2

Could you add  'check -luks' - it should be passing already with git
master.  Ideally it wants password-less sudo enabled, but will skip
the appropriate test if that's not there.

'qcow' (v1) was also passing last time I checked, though it is
waaaaaay slow to run compared to qcow2, so I'd understand if you
were reluctant to turn that on due to speed

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

Re: [Qemu-devel] [PATCH v2 3/3] docker: Add test-block
Posted by Eric Blake 8 years, 2 months ago
On 08/31/2017 11:18 AM, Daniel P. Berrange wrote:
> 
> 'qcow' (v1) was also passing last time I checked, though it is
> waaaaaay slow to run compared to qcow2, so I'd understand if you
> were reluctant to turn that on due to speed

Even './check -qcow -g quick' might be nicer than nothing, but that is
also slooooooow

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Re: [Qemu-devel] [PATCH v2 3/3] docker: Add test-block
Posted by Philippe Mathieu-Daudé 8 years, 2 months ago
On 08/31/2017 01:21 PM, Eric Blake wrote:
> On 08/31/2017 11:18 AM, Daniel P. Berrange wrote:
>>
>> 'qcow' (v1) was also passing last time I checked, though it is
>> waaaaaay slow to run compared to qcow2, so I'd understand if you
>> were reluctant to turn that on due to speed
> 
> Even './check -qcow -g quick' might be nicer than nothing, but that is
> also slooooooow

What about having a daily job running it on /master? Better than running 
it once before each release :)

Re: [Qemu-devel] [PATCH v2 3/3] docker: Add test-block
Posted by Fam Zheng 8 years, 2 months ago
On Thu, 08/31 13:36, Philippe Mathieu-Daudé wrote:
> On 08/31/2017 01:21 PM, Eric Blake wrote:
> > On 08/31/2017 11:18 AM, Daniel P. Berrange wrote:
> > > 
> > > 'qcow' (v1) was also passing last time I checked, though it is
> > > waaaaaay slow to run compared to qcow2, so I'd understand if you
> > > were reluctant to turn that on due to speed
> > 
> > Even './check -qcow -g quick' might be nicer than nothing, but that is
> > also slooooooow
> 
> What about having a daily job running it on /master? Better than running it
> once before each release :)
> 

Can Shippable or Travis cover that?

Fam

Re: [Qemu-devel] [PATCH v2 3/3] docker: Add test-block
Posted by Fam Zheng 8 years, 2 months ago
On Thu, 08/31 17:18, Daniel P. Berrange wrote:
> Could you add  'check -luks' - it should be passing already with git
> master.  Ideally it wants password-less sudo enabled, but will skip
> the appropriate test if that's not there.

I have this failure:

192         - output mismatch (see 192.out.bad)
--- /home/fam/work/qemu/tests/qemu-iotests/192.out      2017-08-31 15:12:00.044744485 +0800
+++ 192.out.bad 2017-09-01 16:21:34.908390978 +0800
@@ -1,7 +1,4 @@
 QA output created by 192
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
-QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) nbd_server_start unix:TEST_DIR/nbd
-(qemu) nbd_server_add -w drive0
-(qemu) q
+QEMU_PROG: -drive format=luks,file=driver=luks,key-secret=keysec0,file.filename=TEST_DIR/t.luks,if=ide,id=drive0: Can't specify 'file' and 'filename' options at the same time
 *** done
Failures: 192
Failed 1 of 1 tests

Fam

Re: [Qemu-devel] [PATCH v2 3/3] docker: Add test-block
Posted by Daniel P. Berrange 8 years, 2 months ago
On Fri, Sep 01, 2017 at 04:22:13PM +0800, Fam Zheng wrote:
> On Thu, 08/31 17:18, Daniel P. Berrange wrote:
> > Could you add  'check -luks' - it should be passing already with git
> > master.  Ideally it wants password-less sudo enabled, but will skip
> > the appropriate test if that's not there.
> 
> I have this failure:

urgh, someone broke it already :-( that's why we need to run tests
automatically :-) I'll see about a fix


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|