qemu-iotests: filter QEMU_PROG in 051.out
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 <stefanha@redhat.com>
This commit is contained in:
		
							parent
							
								
									47e5df2146
								
							
						
					
					
						commit
						c09b437b5f
					
				@ -51,7 +51,7 @@ function do_run_qemu()
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
function run_qemu()
 | 
					function run_qemu()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    do_run_qemu "$@" 2>&1 | _filter_testdir
 | 
					    do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qemu
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
size=128M
 | 
					size=128M
 | 
				
			||||||
 | 
				
			|||||||
@ -4,20 +4,20 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
 | 
				
			|||||||
=== Unknown option ===
 | 
					=== Unknown option ===
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=
 | 
					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_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: -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=: could not open disk image TEST_DIR/t.qcow2: Invalid argument
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=on
 | 
					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_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: -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: could not open disk image TEST_DIR/t.qcow2: Invalid argument
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=1234
 | 
					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_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: -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: could not open disk image TEST_DIR/t.qcow2: Invalid argument
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=foo
 | 
					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_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: -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: could not open disk image TEST_DIR/t.qcow2: Invalid argument
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
=== Enable and disable lazy refcounting on the command line, plus some invalid values ===
 | 
					=== 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
 | 
					q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy_refcounts=
 | 
					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_PROG: -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=: could not open disk image TEST_DIR/t.qcow2: Invalid argument
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy_refcounts=42
 | 
					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_PROG: -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: could not open disk image TEST_DIR/t.qcow2: Invalid argument
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy_refcounts=foo
 | 
					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_PROG: -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: could not open disk image TEST_DIR/t.qcow2: Invalid argument
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
=== With version 2 images enabling lazy refcounts must fail ===
 | 
					=== With version 2 images enabling lazy refcounts must fail ===
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 
 | 
					Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 
 | 
				
			||||||
Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy_refcounts=on
 | 
					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_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: -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: could not open disk image TEST_DIR/t.qcow2: Invalid argument
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy_refcounts=off
 | 
					Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy_refcounts=off
 | 
				
			||||||
q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
 | 
					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
 | 
					q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Testing: -drive if=ide
 | 
					Testing: -drive if=ide
 | 
				
			||||||
qemu: Device needs media, but drive is empty
 | 
					QEMU_PROG: Device needs media, but drive is empty
 | 
				
			||||||
qemu: Initialization of device ide-hd failed
 | 
					QEMU_PROG: Initialization of device ide-hd failed
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Testing: -drive if=virtio
 | 
					Testing: -drive if=virtio
 | 
				
			||||||
qemu: -drive if=virtio: Device needs media, but drive is empty
 | 
					QEMU_PROG: -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 'virtio-blk-pci' could not be initialized
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Testing: -drive if=scsi
 | 
					Testing: -drive if=scsi
 | 
				
			||||||
qemu: -drive if=scsi: Device needs media, but drive is empty
 | 
					QEMU_PROG: -drive if=scsi: Device needs media, but drive is empty
 | 
				
			||||||
qemu: Initialization of device lsi53c895a failed
 | 
					QEMU_PROG: Initialization of device lsi53c895a failed
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Testing: -drive if=none,id=disk -device ide-cd,drive=disk
 | 
					Testing: -drive if=none,id=disk -device ide-cd,drive=disk
 | 
				
			||||||
q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
 | 
					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
 | 
					q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Testing: -drive if=none,id=disk -device ide-drive,drive=disk
 | 
					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_PROG: -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 'ide-drive' could not be initialized
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Testing: -drive if=none,id=disk -device ide-hd,drive=disk
 | 
					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_PROG: -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 'ide-hd' could not be initialized
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-disk,drive=disk
 | 
					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_PROG: -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 'scsi-disk' could not be initialized
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-hd,drive=disk
 | 
					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_PROG: -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 'scsi-hd' could not be initialized
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
=== Read-only ===
 | 
					=== 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
 | 
					q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Testing: -drive file=TEST_DIR/t.qcow2,if=ide,readonly=on
 | 
					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
 | 
					Testing: -drive file=TEST_DIR/t.qcow2,if=virtio,readonly=on
 | 
				
			||||||
q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
 | 
					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
 | 
					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
 | 
					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_PROG: -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: 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
 | 
					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_PROG: -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: 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
 | 
					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
 | 
					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
 | 
					q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Testing: -drive media=cdrom,cache=invalid_value
 | 
					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
 | 
					*** done
 | 
				
			||||||
 | 
				
			|||||||
@ -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)/"
 | 
					    _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
 | 
					# make sure this script returns success
 | 
				
			||||||
/bin/true
 | 
					/bin/true
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user