All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2] block: filter filename when testing encrypted images
@ 2015-05-20 15:52 Daniel P. Berrange
  2015-05-20 16:04 ` Eric Blake
  2015-05-20 16:35 ` Kevin Wolf
  0 siblings, 2 replies; 3+ messages in thread
From: Daniel P. Berrange @ 2015-05-20 15:52 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 _filter_testdir into
the command pipeline to strip the local path.

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

diff --git a/tests/qemu-iotests/131 b/tests/qemu-iotests/131
index f44b0a0..c45b165 100755
--- a/tests/qemu-iotests/131
+++ b/tests/qemu-iotests/131
@@ -48,19 +48,19 @@ IMGOPTS="encryption=on" _make_test_img $size
 
 echo
 echo "== reading whole image =="
-echo "astrochicken" | $QEMU_IO -c "read 0 $size" "$TEST_IMG" | _filter_qemu_io
+echo "astrochicken" | $QEMU_IO -c "read 0 $size" "$TEST_IMG" | _filter_qemu_io | _filter_testdir
 
 echo
 echo "== rewriting whole image =="
-echo "astrochicken" | $QEMU_IO -c "write -P 0xa 0 $size" "$TEST_IMG" | _filter_qemu_io
+echo "astrochicken" | $QEMU_IO -c "write -P 0xa 0 $size" "$TEST_IMG" | _filter_qemu_io | _filter_testdir
 
 echo
 echo "== verify pattern =="
-echo "astrochicken" | $QEMU_IO -c "read -P 0xa 0 $size" "$TEST_IMG" | _filter_qemu_io
+echo "astrochicken" | $QEMU_IO -c "read -P 0xa 0 $size" "$TEST_IMG" | _filter_qemu_io | _filter_testdir
 
 echo
 echo "== verify pattern failure with wrong password =="
-echo "platypus" | $QEMU_IO -c "read -P 0xa 0 $size" "$TEST_IMG" | _filter_qemu_io
+echo "platypus" | $QEMU_IO -c "read -P 0xa 0 $size" "$TEST_IMG" | _filter_qemu_io | _filter_testdir
 
 
 # success, all done
diff --git a/tests/qemu-iotests/131.out b/tests/qemu-iotests/131.out
index 4eedb35..def75ea 100644
--- a/tests/qemu-iotests/131.out
+++ b/tests/qemu-iotests/131.out
@@ -11,7 +11,7 @@ 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.
+Disk image 'TEST_DIR/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 +20,7 @@ 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.
+Disk image 'TEST_DIR/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 +29,7 @@ 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.
+Disk image 'TEST_DIR/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 +38,7 @@ 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.
+Disk image 'TEST_DIR/t.qcow2' is encrypted.
 password:
 Pattern verification failed at offset 0, 134217728 bytes
 read 134217728/134217728 bytes at offset 0
-- 
2.1.0

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

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

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

On 05/20/2015 09:52 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 _filter_testdir into
> the command pipeline to strip the local path.
> 
> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> ---
>  tests/qemu-iotests/131     | 8 ++++----
>  tests/qemu-iotests/131.out | 8 ++++----
>  2 files changed, 8 insertions(+), 8 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] 3+ messages in thread

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

Am 20.05.2015 um 17:52 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 _filter_testdir into
> the command pipeline to strip the local path.
> 
> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>

Thanks, squashed into the commit adding that test case.

Kevin

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

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

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

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.