Skip to contentSkip to conversation

qemu-iotests: fix 028 failure due to disk image path

PATCH Applied Stefan Hajnoczi 3 participants 3 messages Jul 17, 2014 – Jul 18, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemu-iotests: fix 028 failure due to disk image path

The disk image path is echoed by QEMU's readline when the "drive_backup disk ${TEST_IMG}.copy" HMP command is issued. Unfortunately it is very hard to filter out the path due to readline's character-by-character output (with terminal escape sequences). Just redirect this command to /dev/null for now.

---
 tests/qemu-iotests/028     | 4 +++-
 tests/qemu-iotests/028.out | 2 --
 2 files changed, 3 insertions(+), 3 deletions(-)
tests/qemu-iotests/028 +3 -1
index d5718c5..9e701e1 100755
@@ -110,7 +110,9 @@ _launch_qemu -drive file="${TEST_IMG}",cache=${CACHEMODE},id=disk
 h=$QEMU_HANDLE
 QEMU_COMM_TIMEOUT=1
 
-_send_qemu_cmd $h "drive_backup disk ${TEST_IMG}.copy" "(qemu)"
+# Silence output since it contains the disk image path and QEMU's readline
+# character echoing makes it very hard to filter the output
+_send_qemu_cmd $h "drive_backup disk ${TEST_IMG}.copy" "(qemu)" >/dev/null
 qemu_cmd_repeat=20 _send_qemu_cmd $h "info block-jobs" "No active jobs"
 _send_qemu_cmd $h 'quit' ""
 
tests/qemu-iotests/028.out +0 -2
index 38099e4..0e1a5ae 100644
@@ -468,8 +468,6 @@ No errors were found on the image.
 
 block-backup
 
-QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) ddrdridrivdrivedrive_drive_bdrive_badrive_bacdrive_backdrive_backudrive_backupdrive_backup drive_backup ddrive_backup didrive_backup disdrive_backup diskdrive_backup disk drive_backup disk /drive_backup disk /hdrive_backup disk /ho!
 drive_backup disk /homdrive_backup disk /homedrive_backup disk /home/drive_backup disk /home/kdrive_backup disk /home/kwdrive_backup disk /home/kwodrive_backup disk /home/kwoldrive_backup disk /home/kwolfdrive_backup disk /home/kwolf/drive_backup disk /!
 home/kwolf/sdrive_backup disk /home/kwolf/sodrive_backup disk /home/kwolf/soudrive_backup disk /home/kwolf/sourdrive_backup disk /home/kwolf/sourcdrive_backup disk /home/kwolf/sourcedrive_backup disk /home/kwolf/source/drive_backup disk /home/kwolf/sour!
 ce/q!

[Ddrive_backup disk /home/kwolf/source/qedrive_backup disk /home/kwolf/source/qemdrive_backup disk /home/kwolf/source/qemudrive_backup disk /home/kwolf/source/qemu/drive_backup disk /home/kwolf/source/qemu/tdrive_backup disk /home/kwolf/source/qemu/te[! Ddrive_backup disk /home/kwolf/source/qemu/tesdrive_backup disk /home/kwolf/source/qemu/testdrive_backup disk /home/kwolf/source/qemu/testsdrive_backup disk /home/kwolf/source/qemu/tests/drive_backup disk /home/kwolf/source/qemu/tests/q[! Ddrive_backup disk /home/kwol!
f/source/qemu/tests/qedrive_backup disk /home/kwolf/source/qemu/tests/qemdrive_backup disk /home/kwolf/source/qemu/tests/qemudrive_backup disk /home/kwolf/source/qemu/tests/qemu-drive_backup disk /home/kwolf/source/qemu/tests/qemu-i! drive_backup disk /home/kwolf/source/qemu/tests/qemu-iodrive_backup disk /home/kwolf/source/qemu/tests/qemu-iotdrive_backup disk /home/kwolf/source/qemu/tests/qemu-iotedrive_backup disk /home/kwolf/source/qemu/tests/qemu-iotesdrive_backup disk /home/kwolf/sou! rce/qemu/tests/qemu-iotest!
drive_backup disk /home/kwolf/source/qemu/tests/qemu-iotestsdrive_backup disk /home/kwolf/source/qemu/tests/qemu-iotests/drive_backup disk /home/kwolf/source/qemu/tests/qemu-iotests/sdrive_backup disk /home/kwolf/source/qemu/tests/qemu-iotests/sc! [Ddrive_backup disk /home/kwolf/source/qemu/tests/qemu-iotests/scrdrive_backup disk /home/kwolf/source/qemu/tests/qemu-iotests/scradrive_backup disk /home/kwolf/source/qemu/tests/qemu-iotests/scratdrive_backup disk /home/kwolf/source/qemu/tests/qemu-iot! ests/scratc!
drive_backup disk TEST_DIRdrive_backup disk TEST_DIR/drive_backup disk TEST_DIR/tdrive_backup disk TEST_DIR/t.[! Ddrive_backup disk TEST_DIR/t.qdrive_backup disk TEST_DIR/t.qcdrive_backup disk TEST_DIR/t.qcodrive_backup disk TEST_DIR/t.qcow! [!
Ddrive_backup disk TEST_DIR/t.qcow2drive_backup disk TEST_DIR/t.qcow2.drive_backup disk TEST_DIR/t.qcow2.cdrive_backup disk TEST_DIR/t.qcow2.co[! Ddrive_backup disk TEST_DIR/t.qcow2.copdrive_backup disk TEST_DIR/t.qcow2.copy
Formatting 'TEST_DIR/t.qcow2.copy', fmt=qcow2 size=4294968832 backing_file='TEST_DIR/t.qcow2.base' backing_fmt='qcow2' encryption=off cluster_size=65536 lazy_refcounts=off
(qemu) iininfinfoinfo info binfo blinfo bloinfo blocinfo blockinfo block-info block-jinfo block-joinfo block-jobinfo block-jobs
Type backup, device disk: Completed 0 of 4294968832 bytes, speed limit 0 bytes/s

Signature · 1 line
1.9.3
Reviewed-by on v1 1/1
#1 lore raw

Am 17.07.2014 um 20:13 hat Stefan Hajnoczi geschrieben:

Quoted 7 lines

The disk image path is echoed by QEMU's readline when the "drive_backup disk ${TEST_IMG}.copy" HMP command is issued. Unfortunately it is very hard to filter out the path due to readline's character-by-character output (with terminal escape sequences). Just redirect this command to /dev/null for now.

#2 lore raw
In reply to Stefan Hajnoczi
Quoted 11 lines · Stefan Hajnoczi

The disk image path is echoed by QEMU's readline when the "drive_backup disk ${TEST_IMG}.copy" HMP command is issued. Unfortunately it is very hard to filter out the path due to readline's character-by-character output (with terminal escape sequences). Just redirect this command to /dev/null for now.

---
 tests/qemu-iotests/028     | 4 +++-
 tests/qemu-iotests/028.out | 2 --
 2 files changed, 3 insertions(+), 3 deletions(-)

Applied to my block tree:
https://github.com/stefanha/qemu/commits/block

Stefan