yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
902636
From 2be333e847c01397bb6a92b2e4c60e904957675d Mon Sep 17 00:00:00 2001
902636
From: Kevin Wolf <kwolf@redhat.com>
902636
Date: Mon, 8 Jun 2020 15:01:37 +0100
902636
Subject: [PATCH 09/17] iotests: Add qemu_io_log()
902636
902636
RH-Author: Kevin Wolf <kwolf@redhat.com>
902636
Message-id: <20200608150140.38218-9-kwolf@redhat.com>
902636
Patchwork-id: 97451
902636
O-Subject: [RHEL-AV-8.2.1 qemu-kvm PATCH 08/11] iotests: Add qemu_io_log()
902636
Bugzilla: 1780574
902636
RH-Acked-by: Sergio Lopez Pascual <slp@redhat.com>
902636
RH-Acked-by: Eric Blake <eblake@redhat.com>
902636
RH-Acked-by: Max Reitz <mreitz@redhat.com>
902636
902636
Add a function that runs qemu-io and logs the output with the
902636
appropriate filters applied.
902636
902636
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
902636
Reviewed-by: Eric Blake <eblake@redhat.com>
902636
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
902636
Reviewed-by: Alberto Garcia <berto@igalia.com>
902636
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
902636
(cherry picked from commit a96f0350e3d95c98f2bff1863d14493af5c1d360)
902636
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
902636
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
902636
---
902636
 tests/qemu-iotests/iotests.py | 5 +++++
902636
 1 file changed, 5 insertions(+)
902636
902636
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
902636
index be20d56..7a9c779 100644
902636
--- a/tests/qemu-iotests/iotests.py
902636
+++ b/tests/qemu-iotests/iotests.py
902636
@@ -162,6 +162,11 @@ def qemu_io(*args):
902636
         sys.stderr.write('qemu-io received signal %i: %s\n' % (-exitcode, ' '.join(args)))
902636
     return subp.communicate()[0]
902636
 
902636
+def qemu_io_log(*args):
902636
+    result = qemu_io(*args)
902636
+    log(result, filters=[filter_testfiles, filter_qemu_io])
902636
+    return result
902636
+
902636
 def qemu_io_silent(*args):
902636
     '''Run qemu-io and return the exit code, suppressing stdout'''
902636
     args = qemu_io_args + list(args)
902636
-- 
902636
1.8.3.1
902636