Blame SOURCES/kvm-qemu-iotests-filter-QEMU-version-in-monitor-banner.patch

218e99
From 61a448529ef5b2a2ad37e7f7ff5d858593abc9c6 Mon Sep 17 00:00:00 2001
218e99
From: Stefan Hajnoczi <stefanha@redhat.com>
218e99
Date: Mon, 5 Aug 2013 14:40:34 +0200
218e99
Subject: [PATCH 33/38] qemu-iotests: filter QEMU version in monitor banner
218e99
218e99
Message-id: <1379499002-5231-2-git-send-email-mreitz@redhat.com>
218e99
Patchwork-id: 54432
218e99
O-Subject: [RHEL-7.0 qemu-kvm PATCH 1/6] qemu-iotests: filter QEMU version in monitor banner
218e99
Bugzilla: 1006959
218e99
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
218e99
RH-Acked-by: Fam Zheng <famz@redhat.com>
218e99
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
218e99
218e99
BZ: 1006959
218e99
218e99
Filter out the QEMU monitor version banner so that tests do not break
218e99
when the QEMU version number is changed.
218e99
218e99
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
218e99
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
218e99
(cherry picked from commit 9580498b9a599b38c3a28599dcd40bd59f12af2c)
218e99
218e99
Signed-off-by: Max Reitz <mreitz@redhat.com>
218e99
---
218e99
 tests/qemu-iotests/051.out       |   64 +++++++++++++++++++-------------------
218e99
 tests/qemu-iotests/common.filter |    3 +-
218e99
 2 files changed, 34 insertions(+), 33 deletions(-)
218e99
218e99
diff --git a/tests/qemu-iotests/051.out b/tests/qemu-iotests/051.out
218e99
index 9588d0c..5582ed3 100644
218e99
--- a/tests/qemu-iotests/051.out
218e99
+++ b/tests/qemu-iotests/051.out
218e99
@@ -23,11 +23,11 @@ QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=foo: could not
218e99
 === Enable and disable lazy refcounting on the command line, plus some invalid values ===
218e99
 
218e99
 Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=on
218e99
-QEMU 1.5.50 monitor - type 'help' for more information
218e99
+QEMU X.Y.Z monitor - type 'help' for more information
218e99
 (qemu) q?[K?[Dqu?[K?[D?[Dqui?[K?[D?[D?[Dquit?[K
218e99
 
218e99
 Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=off
218e99
-QEMU 1.5.50 monitor - type 'help' for more information
218e99
+QEMU X.Y.Z monitor - type 'help' for more information
218e99
 (qemu) q?[K?[Dqu?[K?[D?[Dqui?[K?[D?[D?[Dquit?[K
218e99
 
218e99
 Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=
218e99
@@ -51,72 +51,72 @@ QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=on: Lazy ref
218e99
 QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=on: could not open disk image TEST_DIR/t.qcow2: Invalid argument
218e99
 
218e99
 Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=off
218e99
-QEMU 1.5.50 monitor - type 'help' for more information
218e99
+QEMU X.Y.Z monitor - type 'help' for more information
218e99
 (qemu) q?[K?[Dqu?[K?[D?[Dqui?[K?[D?[D?[Dquit?[K
218e99
 
218e99
 
218e99
 === No medium ===
218e99
 
218e99
 Testing: -drive if=floppy
218e99
-QEMU 1.5.50 monitor - type 'help' for more information
218e99
+QEMU X.Y.Z monitor - type 'help' for more information
218e99
 (qemu) q?[K?[Dqu?[K?[D?[Dqui?[K?[D?[D?[Dquit?[K
218e99
 
218e99
 Testing: -drive if=ide,media=cdrom
218e99
-QEMU 1.5.50 monitor - type 'help' for more information
218e99
+QEMU X.Y.Z monitor - type 'help' for more information
218e99
 (qemu) q?[K?[Dqu?[K?[D?[Dqui?[K?[D?[D?[Dquit?[K
218e99
 
218e99
 Testing: -drive if=scsi,media=cdrom
218e99
-QEMU 1.5.50 monitor - type 'help' for more information
218e99
+QEMU X.Y.Z monitor - type 'help' for more information
218e99
 (qemu) q?[K?[Dqu?[K?[D?[Dqui?[K?[D?[D?[Dquit?[K
218e99
 
218e99
 Testing: -drive if=ide
218e99
-QEMU 1.5.50 monitor - type 'help' for more information
218e99
+QEMU X.Y.Z monitor - type 'help' for more information
218e99
 (qemu) QEMU_PROG: Device needs media, but drive is empty
218e99
 QEMU_PROG: Device initialization failed.
218e99
 QEMU_PROG: Initialization of device ide-hd failed
218e99
 
218e99
 Testing: -drive if=virtio
218e99
-QEMU 1.5.50 monitor - type 'help' for more information
218e99
+QEMU X.Y.Z monitor - type 'help' for more information
218e99
 (qemu) QEMU_PROG: -drive if=virtio: Device needs media, but drive is empty
218e99
 QEMU_PROG: -drive if=virtio: Device initialization failed.
218e99
 QEMU_PROG: -drive if=virtio: Device initialization failed.
218e99
 QEMU_PROG: -drive if=virtio: Device 'virtio-blk-pci' could not be initialized
218e99
 
218e99
 Testing: -drive if=scsi
218e99
-QEMU 1.5.50 monitor - type 'help' for more information
218e99
+QEMU X.Y.Z monitor - type 'help' for more information
218e99
 (qemu) QEMU_PROG: -drive if=scsi: Device needs media, but drive is empty
218e99
 QEMU_PROG: -drive if=scsi: Device initialization failed.
218e99
 QEMU_PROG: Device initialization failed.
218e99
 QEMU_PROG: Initialization of device lsi53c895a failed
218e99
 
218e99
 Testing: -drive if=none,id=disk -device ide-cd,drive=disk
218e99
-QEMU 1.5.50 monitor - type 'help' for more information
218e99
+QEMU X.Y.Z monitor - type 'help' for more information
218e99
 (qemu) q?[K?[Dqu?[K?[D?[Dqui?[K?[D?[D?[Dquit?[K
218e99
 
218e99
 Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-cd,drive=disk
218e99
-QEMU 1.5.50 monitor - type 'help' for more information
218e99
+QEMU X.Y.Z monitor - type 'help' for more information
218e99
 (qemu) q?[K?[Dqu?[K?[D?[Dqui?[K?[D?[D?[Dquit?[K
218e99
 
218e99
 Testing: -drive if=none,id=disk -device ide-drive,drive=disk
218e99
-QEMU 1.5.50 monitor - type 'help' for more information
218e99
+QEMU X.Y.Z monitor - type 'help' for more information
218e99
 (qemu) QEMU_PROG: -device ide-drive,drive=disk: Device needs media, but drive is empty
218e99
 QEMU_PROG: -device ide-drive,drive=disk: Device initialization failed.
218e99
 QEMU_PROG: -device ide-drive,drive=disk: Device 'ide-drive' could not be initialized
218e99
 
218e99
 Testing: -drive if=none,id=disk -device ide-hd,drive=disk
218e99
-QEMU 1.5.50 monitor - type 'help' for more information
218e99
+QEMU X.Y.Z monitor - type 'help' for more information
218e99
 (qemu) QEMU_PROG: -device ide-hd,drive=disk: Device needs media, but drive is empty
218e99
 QEMU_PROG: -device ide-hd,drive=disk: Device initialization failed.
218e99
 QEMU_PROG: -device ide-hd,drive=disk: Device 'ide-hd' could not be initialized
218e99
 
218e99
 Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-disk,drive=disk
218e99
-QEMU 1.5.50 monitor - type 'help' for more information
218e99
+QEMU X.Y.Z monitor - type 'help' for more information
218e99
 (qemu) QEMU_PROG: -device scsi-disk,drive=disk: Device needs media, but drive is empty
218e99
 QEMU_PROG: -device scsi-disk,drive=disk: Device initialization failed.
218e99
 QEMU_PROG: -device scsi-disk,drive=disk: Device 'scsi-disk' could not be initialized
218e99
 
218e99
 Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-hd,drive=disk
218e99
-QEMU 1.5.50 monitor - type 'help' for more information
218e99
+QEMU X.Y.Z monitor - type 'help' for more information
218e99
 (qemu) QEMU_PROG: -device scsi-hd,drive=disk: Device needs media, but drive is empty
218e99
 QEMU_PROG: -device scsi-hd,drive=disk: Device initialization failed.
218e99
 QEMU_PROG: -device scsi-hd,drive=disk: Device 'scsi-hd' could not be initialized
218e99
@@ -125,77 +125,77 @@ QEMU_PROG: -device scsi-hd,drive=disk: Device 'scsi-hd' could not be initialized
218e99
 === Read-only ===
218e99
 
218e99
 Testing: -drive file=TEST_DIR/t.qcow2,if=floppy,readonly=on
218e99
-QEMU 1.5.50 monitor - type 'help' for more information
218e99
+QEMU X.Y.Z monitor - type 'help' for more information
218e99
 (qemu) q?[K?[Dqu?[K?[D?[Dqui?[K?[D?[D?[Dquit?[K
218e99
 
218e99
 Testing: -drive file=TEST_DIR/t.qcow2,if=ide,media=cdrom,readonly=on
218e99
-QEMU 1.5.50 monitor - type 'help' for more information
218e99
+QEMU X.Y.Z monitor - type 'help' for more information
218e99
 (qemu) q?[K?[Dqu?[K?[D?[Dqui?[K?[D?[D?[Dquit?[K
218e99
 
218e99
 Testing: -drive file=TEST_DIR/t.qcow2,if=scsi,media=cdrom,readonly=on
218e99
-QEMU 1.5.50 monitor - type 'help' for more information
218e99
+QEMU X.Y.Z monitor - type 'help' for more information
218e99
 (qemu) q?[K?[Dqu?[K?[D?[Dqui?[K?[D?[D?[Dquit?[K
218e99
 
218e99
 Testing: -drive file=TEST_DIR/t.qcow2,if=ide,readonly=on
218e99
 QEMU_PROG: -drive file=TEST_DIR/t.qcow2,if=ide,readonly=on: read-only not supported by this bus type
218e99
 
218e99
 Testing: -drive file=TEST_DIR/t.qcow2,if=virtio,readonly=on
218e99
-QEMU 1.5.50 monitor - type 'help' for more information
218e99
+QEMU X.Y.Z monitor - type 'help' for more information
218e99
 (qemu) q?[K?[Dqu?[K?[D?[Dqui?[K?[D?[D?[Dquit?[K
218e99
 
218e99
 Testing: -drive file=TEST_DIR/t.qcow2,if=scsi,readonly=on
218e99
-QEMU 1.5.50 monitor - type 'help' for more information
218e99
+QEMU X.Y.Z monitor - type 'help' for more information
218e99
 (qemu) q?[K?[Dqu?[K?[D?[Dqui?[K?[D?[D?[Dquit?[K
218e99
 
218e99
 Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device ide-cd,drive=disk
218e99
-QEMU 1.5.50 monitor - type 'help' for more information
218e99
+QEMU X.Y.Z monitor - type 'help' for more information
218e99
 (qemu) q?[K?[Dqu?[K?[D?[Dqui?[K?[D?[D?[Dquit?[K
218e99
 
218e99
 Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device lsi53c895a -device scsi-cd,drive=disk
218e99
-QEMU 1.5.50 monitor - type 'help' for more information
218e99
+QEMU X.Y.Z monitor - type 'help' for more information
218e99
 (qemu) q?[K?[Dqu?[K?[D?[Dqui?[K?[D?[D?[Dquit?[K
218e99
 
218e99
 Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device ide-drive,drive=disk
218e99
-QEMU 1.5.50 monitor - type 'help' for more information
218e99
+QEMU X.Y.Z monitor - type 'help' for more information
218e99
 (qemu) QEMU_PROG: -device ide-drive,drive=disk: Can't use a read-only drive
218e99
 QEMU_PROG: -device ide-drive,drive=disk: Device initialization failed.
218e99
 QEMU_PROG: -device ide-drive,drive=disk: Device 'ide-drive' could not be initialized
218e99
 
218e99
 Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device ide-hd,drive=disk
218e99
-QEMU 1.5.50 monitor - type 'help' for more information
218e99
+QEMU X.Y.Z monitor - type 'help' for more information
218e99
 (qemu) QEMU_PROG: -device ide-hd,drive=disk: Can't use a read-only drive
218e99
 QEMU_PROG: -device ide-hd,drive=disk: Device initialization failed.
218e99
 QEMU_PROG: -device ide-hd,drive=disk: Device 'ide-hd' could not be initialized
218e99
 
218e99
 Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device lsi53c895a -device scsi-disk,drive=disk
218e99
-QEMU 1.5.50 monitor - type 'help' for more information
218e99
+QEMU X.Y.Z monitor - type 'help' for more information
218e99
 (qemu) q?[K?[Dqu?[K?[D?[Dqui?[K?[D?[D?[Dquit?[K
218e99
 
218e99
 Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device lsi53c895a -device scsi-hd,drive=disk
218e99
-QEMU 1.5.50 monitor - type 'help' for more information
218e99
+QEMU X.Y.Z monitor - type 'help' for more information
218e99
 (qemu) q?[K?[Dqu?[K?[D?[Dqui?[K?[D?[D?[Dquit?[K
218e99
 
218e99
 
218e99
 === Cache modes ===
218e99
 
218e99
 Testing: -drive media=cdrom,cache=none
218e99
-QEMU 1.5.50 monitor - type 'help' for more information
218e99
+QEMU X.Y.Z monitor - type 'help' for more information
218e99
 (qemu) q?[K?[Dqu?[K?[D?[Dqui?[K?[D?[D?[Dquit?[K
218e99
 
218e99
 Testing: -drive media=cdrom,cache=directsync
218e99
-QEMU 1.5.50 monitor - type 'help' for more information
218e99
+QEMU X.Y.Z monitor - type 'help' for more information
218e99
 (qemu) q?[K?[Dqu?[K?[D?[Dqui?[K?[D?[D?[Dquit?[K
218e99
 
218e99
 Testing: -drive media=cdrom,cache=writeback
218e99
-QEMU 1.5.50 monitor - type 'help' for more information
218e99
+QEMU X.Y.Z monitor - type 'help' for more information
218e99
 (qemu) q?[K?[Dqu?[K?[D?[Dqui?[K?[D?[D?[Dquit?[K
218e99
 
218e99
 Testing: -drive media=cdrom,cache=writethrough
218e99
-QEMU 1.5.50 monitor - type 'help' for more information
218e99
+QEMU X.Y.Z monitor - type 'help' for more information
218e99
 (qemu) q?[K?[Dqu?[K?[D?[Dqui?[K?[D?[D?[Dquit?[K
218e99
 
218e99
 Testing: -drive media=cdrom,cache=unsafe
218e99
-QEMU 1.5.50 monitor - type 'help' for more information
218e99
+QEMU X.Y.Z monitor - type 'help' for more information
218e99
 (qemu) q?[K?[Dqu?[K?[D?[Dqui?[K?[D?[D?[Dquit?[K
218e99
 
218e99
 Testing: -drive media=cdrom,cache=invalid_value
218e99
@@ -205,7 +205,7 @@ QEMU_PROG: -drive media=cdrom,cache=invalid_value: invalid cache option
218e99
 === Specifying the protocol layer ===
218e99
 
218e99
 Testing: -drive file=TEST_DIR/t.qcow2,file.driver=file
218e99
-QEMU 1.5.50 monitor - type 'help' for more information
218e99
+QEMU X.Y.Z monitor - type 'help' for more information
218e99
 (qemu) q?[K?[Dqu?[K?[D?[Dqui?[K?[D?[D?[Dquit?[K
218e99
 
218e99
 Testing: -drive file=TEST_DIR/t.qcow2,file.driver=qcow2
218e99
diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter
218e99
index 9dbcae8..97a31ff 100644
218e99
--- a/tests/qemu-iotests/common.filter
218e99
+++ b/tests/qemu-iotests/common.filter
218e99
@@ -155,7 +155,8 @@ _filter_qemu_io()
218e99
 # replace occurrences of QEMU_PROG with "qemu"
218e99
 _filter_qemu()
218e99
 {
218e99
-    sed -e "s#\\(^\\|(qemu) \\)$(basename $QEMU_PROG):#\1QEMU_PROG:#"
218e99
+    sed -e "s#\\(^\\|(qemu) \\)$(basename $QEMU_PROG):#\1QEMU_PROG:#" \
218e99
+        -e 's#^QEMU [0-9]\+\.[0-9]\+\.[0-9]\+ monitor#QEMU X.Y.Z monitor#'
218e99
 }
218e99
 
218e99
 # make sure this script returns success
218e99
-- 
218e99
1.7.1
218e99