All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] block: filter filename when testing encrypted images
@ 2015-05-20 11:45 Daniel P. Berrange
  2015-05-20 14:08 ` Eric Blake
  2015-05-20 15:05 ` Kevin Wolf
  0 siblings, 2 replies; 4+ messages in thread
From: Daniel P. Berrange @ 2015-05-20 11:45 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf

qemu-io prints a warning message

 "Disk image '/home/berrange/src/virt/qemu/tests/qemu-iotests/scratch/t.qcow2' is encrypted."

when opening an encrypted image, which was mistakenly included
in the expected output for test 131. Add a filter which strips
this filename from the output data.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 tests/qemu-iotests/131.out       | 4 ----
 tests/qemu-iotests/common.filter | 3 ++-
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/tests/qemu-iotests/131.out b/tests/qemu-iotests/131.out
index 4eedb35..7141e4f 100644
--- a/tests/qemu-iotests/131.out
+++ b/tests/qemu-iotests/131.out
@@ -11,7 +11,6 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 encryption=on
 Encrypted images are deprecated
 Support for them will be removed in a future release.
 You can use 'qemu-img convert' to convert your image to an unencrypted one.
-Disk image '/home/berrange/src/virt/qemu/tests/qemu-iotests/scratch/t.qcow2' is encrypted.
 password:
 read 134217728/134217728 bytes at offset 0
 128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
@@ -20,7 +19,6 @@ read 134217728/134217728 bytes at offset 0
 Encrypted images are deprecated
 Support for them will be removed in a future release.
 You can use 'qemu-img convert' to convert your image to an unencrypted one.
-Disk image '/home/berrange/src/virt/qemu/tests/qemu-iotests/scratch/t.qcow2' is encrypted.
 password:
 wrote 134217728/134217728 bytes at offset 0
 128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
@@ -29,7 +27,6 @@ wrote 134217728/134217728 bytes at offset 0
 Encrypted images are deprecated
 Support for them will be removed in a future release.
 You can use 'qemu-img convert' to convert your image to an unencrypted one.
-Disk image '/home/berrange/src/virt/qemu/tests/qemu-iotests/scratch/t.qcow2' is encrypted.
 password:
 read 134217728/134217728 bytes at offset 0
 128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
@@ -38,7 +35,6 @@ read 134217728/134217728 bytes at offset 0
 Encrypted images are deprecated
 Support for them will be removed in a future release.
 You can use 'qemu-img convert' to convert your image to an unencrypted one.
-Disk image '/home/berrange/src/virt/qemu/tests/qemu-iotests/scratch/t.qcow2' is encrypted.
 password:
 Pattern verification failed at offset 0, 134217728 bytes
 read 134217728/134217728 bytes at offset 0
diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter
index 012a812..6ebef4c 100644
--- a/tests/qemu-iotests/common.filter
+++ b/tests/qemu-iotests/common.filter
@@ -151,7 +151,8 @@ _filter_qemu_io()
 {
     _filter_win32 | sed -e "s/[0-9]* ops\; [0-9/:. sec]* ([0-9/.inf]* [EPTGMKiBbytes]*\/sec and [0-9/.inf]* ops\/sec)/X ops\; XX:XX:XX.X (XXX YYY\/sec and XXX ops\/sec)/" \
         -e "s/: line [0-9][0-9]*:  *[0-9][0-9]*\( Aborted\| Killed\)/:\1/" \
-        -e "s/qemu-io> //g"
+        -e "s/qemu-io> //g" \
+        -e "/Disk image '.*' is encrypted\./d"
 }
 
 # replace occurrences of QEMU_PROG with "qemu"
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] block: filter filename when testing encrypted images
  2015-05-20 11:45 [Qemu-devel] [PATCH] block: filter filename when testing encrypted images Daniel P. Berrange
@ 2015-05-20 14:08 ` Eric Blake
  2015-05-20 15:05 ` Kevin Wolf
  1 sibling, 0 replies; 4+ messages in thread
From: Eric Blake @ 2015-05-20 14:08 UTC (permalink / raw)
  To: Daniel P. Berrange, qemu-devel; +Cc: Kevin Wolf

[-- Attachment #1: Type: text/plain, Size: 735 bytes --]

On 05/20/2015 05:45 AM, Daniel P. Berrange wrote:
> qemu-io prints a warning message
> 
>  "Disk image '/home/berrange/src/virt/qemu/tests/qemu-iotests/scratch/t.qcow2' is encrypted."
> 
> when opening an encrypted image, which was mistakenly included
> in the expected output for test 131. Add a filter which strips
> this filename from the output data.
> 
> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> ---
>  tests/qemu-iotests/131.out       | 4 ----
>  tests/qemu-iotests/common.filter | 3 ++-
>  2 files changed, 2 insertions(+), 5 deletions(-)

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] block: filter filename when testing encrypted images
  2015-05-20 11:45 [Qemu-devel] [PATCH] block: filter filename when testing encrypted images Daniel P. Berrange
  2015-05-20 14:08 ` Eric Blake
@ 2015-05-20 15:05 ` Kevin Wolf
  2015-05-20 15:13   ` Daniel P. Berrange
  1 sibling, 1 reply; 4+ messages in thread
From: Kevin Wolf @ 2015-05-20 15:05 UTC (permalink / raw)
  To: Daniel P. Berrange; +Cc: qemu-devel

Am 20.05.2015 um 13:45 hat Daniel P. Berrange geschrieben:
> qemu-io prints a warning message
> 
>  "Disk image '/home/berrange/src/virt/qemu/tests/qemu-iotests/scratch/t.qcow2' is encrypted."
> 
> when opening an encrypted image, which was mistakenly included
> in the expected output for test 131. Add a filter which strips
> this filename from the output data.
> 
> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> ---
>  tests/qemu-iotests/131.out       | 4 ----
>  tests/qemu-iotests/common.filter | 3 ++-
>  2 files changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/tests/qemu-iotests/131.out b/tests/qemu-iotests/131.out
> index 4eedb35..7141e4f 100644
> --- a/tests/qemu-iotests/131.out
> +++ b/tests/qemu-iotests/131.out
> @@ -11,7 +11,6 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 encryption=on
>  Encrypted images are deprecated
>  Support for them will be removed in a future release.
>  You can use 'qemu-img convert' to convert your image to an unencrypted one.
> -Disk image '/home/berrange/src/virt/qemu/tests/qemu-iotests/scratch/t.qcow2' is encrypted.
>  password:
>  read 134217728/134217728 bytes at offset 0
>  128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)

Usually we just apply _filter_testdir(), which leaves the message
around, but replaces the variable part with "TEST_DIR". I think that
would be better here, too, because it shows that qemu-io did indeed
recognise the image as encrypted.

If you send a v2, I'll squash that into the original, buggy commit
before sending a pull request.

Kevin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] block: filter filename when testing encrypted images
  2015-05-20 15:05 ` Kevin Wolf
@ 2015-05-20 15:13   ` Daniel P. Berrange
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel P. Berrange @ 2015-05-20 15:13 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: qemu-devel

On Wed, May 20, 2015 at 05:05:51PM +0200, Kevin Wolf wrote:
> Am 20.05.2015 um 13:45 hat Daniel P. Berrange geschrieben:
> > qemu-io prints a warning message
> > 
> >  "Disk image '/home/berrange/src/virt/qemu/tests/qemu-iotests/scratch/t.qcow2' is encrypted."
> > 
> > when opening an encrypted image, which was mistakenly included
> > in the expected output for test 131. Add a filter which strips
> > this filename from the output data.
> > 
> > Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> > ---
> >  tests/qemu-iotests/131.out       | 4 ----
> >  tests/qemu-iotests/common.filter | 3 ++-
> >  2 files changed, 2 insertions(+), 5 deletions(-)
> > 
> > diff --git a/tests/qemu-iotests/131.out b/tests/qemu-iotests/131.out
> > index 4eedb35..7141e4f 100644
> > --- a/tests/qemu-iotests/131.out
> > +++ b/tests/qemu-iotests/131.out
> > @@ -11,7 +11,6 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 encryption=on
> >  Encrypted images are deprecated
> >  Support for them will be removed in a future release.
> >  You can use 'qemu-img convert' to convert your image to an unencrypted one.
> > -Disk image '/home/berrange/src/virt/qemu/tests/qemu-iotests/scratch/t.qcow2' is encrypted.
> >  password:
> >  read 134217728/134217728 bytes at offset 0
> >  128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> 
> Usually we just apply _filter_testdir(), which leaves the message
> around, but replaces the variable part with "TEST_DIR". I think that
> would be better here, too, because it shows that qemu-io did indeed
> recognise the image as encrypted.
> 
> If you send a v2, I'll squash that into the original, buggy commit
> before sending a pull request.

Ok, will change that.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-05-20 15:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-20 11:45 [Qemu-devel] [PATCH] block: filter filename when testing encrypted images Daniel P. Berrange
2015-05-20 14:08 ` Eric Blake
2015-05-20 15:05 ` Kevin Wolf
2015-05-20 15:13   ` Daniel P. Berrange

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.