[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 06/11] qemu-iotests: filter QEMU_PROG in 051.out
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PATCH 06/11] qemu-iotests: filter QEMU_PROG in 051.out |
Date: |
Fri, 26 Apr 2013 13:44:31 +0200 |
Filter the name of the QEMU executable so the output can be diffed no
matter what QEMU_PROG is (e.g. qemu-system-x86_64).
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
tests/qemu-iotests/051 | 2 +-
tests/qemu-iotests/051.out | 72 ++++++++++++++++++++--------------------
tests/qemu-iotests/common.filter | 6 ++++
3 files changed, 43 insertions(+), 37 deletions(-)
diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051
index 17a1d92..8b51de3 100755
--- a/tests/qemu-iotests/051
+++ b/tests/qemu-iotests/051
@@ -51,7 +51,7 @@ function do_run_qemu()
function run_qemu()
{
- do_run_qemu "$@" 2>&1 | _filter_testdir
+ do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qemu
}
size=128M
diff --git a/tests/qemu-iotests/051.out b/tests/qemu-iotests/051.out
index c206186..48456d5 100644
--- a/tests/qemu-iotests/051.out
+++ b/tests/qemu-iotests/051.out
@@ -4,20 +4,20 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
=== Unknown option ===
Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=
-qemu: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=: Block format
'qcow2' used by device 'ide0-hd0' doesn't support the option 'unknown_opt'
-qemu: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=: could not open
disk image TEST_DIR/t.qcow2: Invalid argument
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=: Block
format 'qcow2' used by device 'ide0-hd0' doesn't support the option
'unknown_opt'
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=: could not
open disk image TEST_DIR/t.qcow2: Invalid argument
Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=on
-qemu: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=on: Block format
'qcow2' used by device 'ide0-hd0' doesn't support the option 'unknown_opt'
-qemu: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=on: could not open
disk image TEST_DIR/t.qcow2: Invalid argument
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=on: Block
format 'qcow2' used by device 'ide0-hd0' doesn't support the option
'unknown_opt'
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=on: could not
open disk image TEST_DIR/t.qcow2: Invalid argument
Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=1234
-qemu: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=1234: Block format
'qcow2' used by device 'ide0-hd0' doesn't support the option 'unknown_opt'
-qemu: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=1234: could not
open disk image TEST_DIR/t.qcow2: Invalid argument
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=1234: Block
format 'qcow2' used by device 'ide0-hd0' doesn't support the option
'unknown_opt'
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=1234: could
not open disk image TEST_DIR/t.qcow2: Invalid argument
Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=foo
-qemu: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=foo: Block format
'qcow2' used by device 'ide0-hd0' doesn't support the option 'unknown_opt'
-qemu: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=foo: could not
open disk image TEST_DIR/t.qcow2: Invalid argument
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=foo: Block
format 'qcow2' used by device 'ide0-hd0' doesn't support the option
'unknown_opt'
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=foo: could
not open disk image TEST_DIR/t.qcow2: Invalid argument
=== Enable and disable lazy refcounting on the command line, plus some invalid
values ===
@@ -29,24 +29,24 @@ Testing: -drive
file=TEST_DIR/t.qcow2,format=qcow2,lazy_refcounts=off
q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy_refcounts=
-qemu: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy_refcounts=: Parameter
'lazy_refcounts' expects 'on' or 'off'
-qemu: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy_refcounts=: could not
open disk image TEST_DIR/t.qcow2: Invalid argument
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy_refcounts=:
Parameter 'lazy_refcounts' expects 'on' or 'off'
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy_refcounts=: could
not open disk image TEST_DIR/t.qcow2: Invalid argument
Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy_refcounts=42
-qemu: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy_refcounts=42: Parameter
'lazy_refcounts' expects 'on' or 'off'
-qemu: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy_refcounts=42: could not
open disk image TEST_DIR/t.qcow2: Invalid argument
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy_refcounts=42:
Parameter 'lazy_refcounts' expects 'on' or 'off'
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy_refcounts=42: could
not open disk image TEST_DIR/t.qcow2: Invalid argument
Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy_refcounts=foo
-qemu: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy_refcounts=foo: Parameter
'lazy_refcounts' expects 'on' or 'off'
-qemu: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy_refcounts=foo: could not
open disk image TEST_DIR/t.qcow2: Invalid argument
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy_refcounts=foo:
Parameter 'lazy_refcounts' expects 'on' or 'off'
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy_refcounts=foo: could
not open disk image TEST_DIR/t.qcow2: Invalid argument
=== With version 2 images enabling lazy refcounts must fail ===
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy_refcounts=on
-qemu: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy_refcounts=on: Lazy
refcounts require a qcow2 image with at least qemu 1.1 compatibility level
-qemu: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy_refcounts=on: could not
open disk image TEST_DIR/t.qcow2: Invalid argument
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy_refcounts=on: Lazy
refcounts require a qcow2 image with at least qemu 1.1 compatibility level
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy_refcounts=on: could
not open disk image TEST_DIR/t.qcow2: Invalid argument
Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy_refcounts=off
q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
@@ -64,16 +64,16 @@ Testing: -drive if=scsi,media=cdrom
q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
Testing: -drive if=ide
-qemu: Device needs media, but drive is empty
-qemu: Initialization of device ide-hd failed
+QEMU_PROG: Device needs media, but drive is empty
+QEMU_PROG: Initialization of device ide-hd failed
Testing: -drive if=virtio
-qemu: -drive if=virtio: Device needs media, but drive is empty
-qemu: -drive if=virtio: Device 'virtio-blk-pci' could not be initialized
+QEMU_PROG: -drive if=virtio: Device needs media, but drive is empty
+QEMU_PROG: -drive if=virtio: Device 'virtio-blk-pci' could not be initialized
Testing: -drive if=scsi
-qemu: -drive if=scsi: Device needs media, but drive is empty
-qemu: Initialization of device lsi53c895a failed
+QEMU_PROG: -drive if=scsi: Device needs media, but drive is empty
+QEMU_PROG: Initialization of device lsi53c895a failed
Testing: -drive if=none,id=disk -device ide-cd,drive=disk
q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
@@ -82,20 +82,20 @@ Testing: -drive if=none,id=disk -device lsi53c895a -device
scsi-cd,drive=disk
q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
Testing: -drive if=none,id=disk -device ide-drive,drive=disk
-qemu: -device ide-drive,drive=disk: Device needs media, but drive is empty
-qemu: -device ide-drive,drive=disk: Device 'ide-drive' could not be initialized
+QEMU_PROG: -device ide-drive,drive=disk: Device needs media, but drive is empty
+QEMU_PROG: -device ide-drive,drive=disk: Device 'ide-drive' could not be
initialized
Testing: -drive if=none,id=disk -device ide-hd,drive=disk
-qemu: -device ide-hd,drive=disk: Device needs media, but drive is empty
-qemu: -device ide-hd,drive=disk: Device 'ide-hd' could not be initialized
+QEMU_PROG: -device ide-hd,drive=disk: Device needs media, but drive is empty
+QEMU_PROG: -device ide-hd,drive=disk: Device 'ide-hd' could not be initialized
Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-disk,drive=disk
-qemu: -device scsi-disk,drive=disk: Device needs media, but drive is empty
-qemu: -device scsi-disk,drive=disk: Device 'scsi-disk' could not be initialized
+QEMU_PROG: -device scsi-disk,drive=disk: Device needs media, but drive is empty
+QEMU_PROG: -device scsi-disk,drive=disk: Device 'scsi-disk' could not be
initialized
Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-hd,drive=disk
-qemu: -device scsi-hd,drive=disk: Device needs media, but drive is empty
-qemu: -device scsi-hd,drive=disk: Device 'scsi-hd' could not be initialized
+QEMU_PROG: -device scsi-hd,drive=disk: Device needs media, but drive is empty
+QEMU_PROG: -device scsi-hd,drive=disk: Device 'scsi-hd' could not be
initialized
=== Read-only ===
@@ -110,7 +110,7 @@ Testing: -drive
file=TEST_DIR/t.qcow2,if=scsi,media=cdrom,readonly=on
q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
Testing: -drive file=TEST_DIR/t.qcow2,if=ide,readonly=on
-qemu: -drive file=TEST_DIR/t.qcow2,if=ide,readonly=on: readonly not supported
by this bus type
+QEMU_PROG: -drive file=TEST_DIR/t.qcow2,if=ide,readonly=on: readonly not
supported by this bus type
Testing: -drive file=TEST_DIR/t.qcow2,if=virtio,readonly=on
q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
@@ -125,12 +125,12 @@ Testing: -drive
file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device lsi53c
q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device
ide-drive,drive=disk
-qemu: -device ide-drive,drive=disk: Can't use a read-only drive
-qemu: -device ide-drive,drive=disk: Device 'ide-drive' could not be initialized
+QEMU_PROG: -device ide-drive,drive=disk: Can't use a read-only drive
+QEMU_PROG: -device ide-drive,drive=disk: Device 'ide-drive' could not be
initialized
Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device
ide-hd,drive=disk
-qemu: -device ide-hd,drive=disk: Can't use a read-only drive
-qemu: -device ide-hd,drive=disk: Device 'ide-hd' could not be initialized
+QEMU_PROG: -device ide-hd,drive=disk: Can't use a read-only drive
+QEMU_PROG: -device ide-hd,drive=disk: Device 'ide-hd' could not be initialized
Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device
lsi53c895a -device scsi-disk,drive=disk
q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
@@ -157,6 +157,6 @@ Testing: -drive media=cdrom,cache=unsafe
q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
Testing: -drive media=cdrom,cache=invalid_value
-qemu: -drive media=cdrom,cache=invalid_value: invalid cache option
+QEMU_PROG: -drive media=cdrom,cache=invalid_value: invalid cache option
*** done
diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter
index fa26b62..bc5f250 100644
--- a/tests/qemu-iotests/common.filter
+++ b/tests/qemu-iotests/common.filter
@@ -152,5 +152,11 @@ _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)/"
}
+# replace occurrences of QEMU_PROG with "qemu"
+_filter_qemu()
+{
+ sed -e "s#$(basename $QEMU_PROG)#QEMU_PROG#g"
+}
+
# make sure this script returns success
/bin/true
--
1.8.1.4
- [Qemu-devel] [PATCH 01/11] block/ssh: Require libssh2 >= 1.2.8., (continued)
- [Qemu-devel] [PATCH 01/11] block/ssh: Require libssh2 >= 1.2.8., Stefan Hajnoczi, 2013/04/26
- [Qemu-devel] [PATCH 02/11] savevm: Implement block_writev_buffer(), Stefan Hajnoczi, 2013/04/26
- [Qemu-devel] [PATCH 03/11] block: Introduce bdrv_pwritev() for qcow2_save_vmstate, Stefan Hajnoczi, 2013/04/26
- [Qemu-devel] [PATCH 02/11] sheepdog: add discard/trim support for sheepdog, Stefan Hajnoczi, 2013/04/26
- [Qemu-devel] [PATCH 03/11] sheepdog: use BDRV_SECTOR_SIZE, Stefan Hajnoczi, 2013/04/26
- [Qemu-devel] [PATCH 04/11] qemu-iotests: A few more bdrv_pread/pwrite tests, Stefan Hajnoczi, 2013/04/26
- [Qemu-devel] [PATCH 04/11] sheepdog: implement .bdrv_co_is_allocated(), Stefan Hajnoczi, 2013/04/26
- [Qemu-devel] [PATCH 05/11] block: Disable driver-specific options for 1.5, Stefan Hajnoczi, 2013/04/26
- [Qemu-devel] [PATCH 05/11] qemu-iotests: Add test for -drive options, Stefan Hajnoczi, 2013/04/26
- [Qemu-devel] [PATCH 06/11] rbd: Fix use after free in rbd_open(), Stefan Hajnoczi, 2013/04/26
- [Qemu-devel] [PATCH 06/11] qemu-iotests: filter QEMU_PROG in 051.out,
Stefan Hajnoczi <=
- [Qemu-devel] [PATCH 07/11] ide: refuse WIN_READ_NATIVE_MAX on empty device, Stefan Hajnoczi, 2013/04/26
- [Qemu-devel] [PATCH 07/11] sheepdog: cleanup find_vdi_name, Stefan Hajnoczi, 2013/04/26
- [Qemu-devel] [PATCH 08/11] sheepdog: add SD_RES_READONLY result code, Stefan Hajnoczi, 2013/04/26
- [Qemu-devel] [PATCH 09/11] block: ssh: Use libssh2_sftp_fsync (if supported by libssh2) to flush to disk., Stefan Hajnoczi, 2013/04/26
- [Qemu-devel] [PATCH 08/11] block: Add support for Secure Shell (ssh) block device., Stefan Hajnoczi, 2013/04/26
- [Qemu-devel] [PATCH 09/11] sheepdog: add helper function to reload inode, Stefan Hajnoczi, 2013/04/26
- [Qemu-devel] [PATCH 10/11] sheepdog: resend write requests when SD_RES_READONLY is received, Stefan Hajnoczi, 2013/04/26
- [Qemu-devel] [PATCH 10/11] iotests: Add 'check -ssh' option to test Secure Shell block device., Stefan Hajnoczi, 2013/04/26
- [Qemu-devel] [PATCH 11/11] rbd: add an asynchronous flush, Stefan Hajnoczi, 2013/04/26
- [Qemu-devel] [PATCH 11/11] sheepdog: fix loadvm operation, Stefan Hajnoczi, 2013/04/26