From: Max Reitz <mreitz@redhat.com>
To: Amit Shah <amit.shah@redhat.com>, qemu list <qemu-devel@nongnu.org>
Cc: Peter Maydell <peter.maydell@linaro.org>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
Juan Quintela <quintela@redhat.com>,
"Daniel P. Berrange" <berrange@redhat.com>
Subject: Re: [Qemu-devel] [PULL 4/7] scripts: refactor the VM class in iotests for reuse
Date: Tue, 26 Jul 2016 01:34:55 +0200 [thread overview]
Message-ID: <a4d6890c-523d-3202-a043-2afc76251ea2@redhat.com> (raw)
In-Reply-To: <66613974468fb6e1609fb3eabf55981b1ee436cf.1469174334.git.amit.shah@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2791 bytes --]
On 22.07.2016 10:00, Amit Shah wrote:
> From: "Daniel P. Berrange" <berrange@redhat.com>
>
> The iotests module has a python class for controlling QEMU
> processes. Pull the generic functionality out of this file
> and create a scripts/qemu.py module containing a QEMUMachine
> class. Put the QTest integration support into a subclass
> QEMUQtestMachine.
>
> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> Message-Id: <1469020993-29426-4-git-send-email-berrange@redhat.com>
> Signed-off-by: Amit Shah <amit.shah@redhat.com>
> ---
> scripts/qemu.py | 202 ++++++++++++++++++++++++++++++++++++++++++
> scripts/qtest.py | 34 +++++++
> tests/qemu-iotests/iotests.py | 135 +---------------------------
> 3 files changed, 240 insertions(+), 131 deletions(-)
> create mode 100644 scripts/qemu.py
[...]
> diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
> index 1687c33..14427f4 100644
> --- a/tests/qemu-iotests/iotests.py
> +++ b/tests/qemu-iotests/iotests.py
[...]
> @@ -148,27 +145,12 @@ def event_match(event, match=None):
>
> return True
>
> -class VM(object):
> +class VM(qtest.QEMUMachine):
Should this not be qtest.QEMUQtestMachine?
With QEMUMachine, I get failures like this when attempting to run tests
for the wrong format (e.g. ./check -raw 30):
Traceback (most recent call last):
File "030", line 23, in <module>
import iotests
File "./tests/qemu-iotests/iotests.py", line 148, in <module>
class VM(qtest.QEMUMachine):
AttributeError: 'module' object has no attribute 'QEMUMachine
Max
> '''A QEMU VM'''
>
> def __init__(self):
> - self._monitor_path = os.path.join(test_dir, 'qemu-mon.%d' % os.getpid())
> - self._qemu_log_path = os.path.join(test_dir, 'qemu-log.%d' % os.getpid())
> - self._qtest_path = os.path.join(test_dir, 'qemu-qtest.%d' % os.getpid())
> - self._args = qemu_args + ['-chardev',
> - 'socket,id=mon,path=' + self._monitor_path,
> - '-mon', 'chardev=mon,mode=control',
> - '-qtest', 'unix:path=' + self._qtest_path,
> - '-machine', 'accel=qtest',
> - '-display', 'none', '-vga', 'none']
> + super(self, VM).__init__(qemu_prog, qemu_opts, test_dir)
> self._num_drives = 0
> - self._events = []
> -
> - # This can be used to add an unused monitor instance.
> - def add_monitor_telnet(self, ip, port):
> - args = 'tcp:%s:%d,server,nowait,telnet' % (ip, port)
> - self._args.append('-monitor')
> - self._args.append(args)
>
> def add_drive_raw(self, opts):
> self._args.append('-drive')
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 498 bytes --]
next prev parent reply other threads:[~2016-07-25 23:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-22 8:00 [Qemu-devel] [PULL 0/7] migration: fix, perf testing framework Amit Shah
2016-07-22 8:00 ` [Qemu-devel] [PULL 1/7] migration: set state to post-migrate on failure Amit Shah
2016-07-22 8:00 ` [Qemu-devel] [PULL 2/7] scripts: add __init__.py file to scripts/qmp/ Amit Shah
2016-07-22 8:00 ` [Qemu-devel] [PULL 3/7] scripts: add a 'debug' parameter to QEMUMonitorProtocol Amit Shah
2016-07-22 8:00 ` [Qemu-devel] [PULL 4/7] scripts: refactor the VM class in iotests for reuse Amit Shah
2016-07-25 23:34 ` Max Reitz [this message]
2016-07-26 0:23 ` Max Reitz
2016-07-26 8:24 ` Daniel P. Berrange
2016-07-22 8:00 ` [Qemu-devel] [PULL 5/7] scripts: set timeout when waiting for qemu monitor connection Amit Shah
2016-07-22 8:00 ` [Qemu-devel] [PULL 6/7] scripts: ensure monitor socket has SO_REUSEADDR set Amit Shah
2016-07-22 8:00 ` [Qemu-devel] [PULL 7/7] tests: introduce a framework for testing migration performance Amit Shah
2016-07-22 10:31 ` [Qemu-devel] [PULL 0/7] migration: fix, perf testing framework Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a4d6890c-523d-3202-a043-2afc76251ea2@redhat.com \
--to=mreitz@redhat.com \
--cc=amit.shah@redhat.com \
--cc=berrange@redhat.com \
--cc=dgilbert@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).