The order of some QMP events may depend on the architecture being
tested. Add support for filtering out QMP events so we can use a
single reference output for all architecture when the test doesn't
care about the events.

Signed-off-by: Sascha Silbe <si...@linux.vnet.ibm.com>
---
 tests/qemu-iotests/common.filter | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter
index 84b7434..b908aa2 100644
--- a/tests/qemu-iotests/common.filter
+++ b/tests/qemu-iotests/common.filter
@@ -178,6 +178,12 @@ _filter_qmp()
         -e '    QMP_VERSION'
 }
 
+# remove QMP events from output
+_filter_qmp_events()
+{
+    sed -e '/^{\(.*, \)"event": ".*}$/ d'
+}
+
 # replace driver-specific options in the "Formatting..." line
 _filter_img_create()
 {
-- 
2.1.4


Reply via email to