qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [Qemu-devel] [PATCH] qemu-iotests: Log QMP traffic in d


From: Eric Blake
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH] qemu-iotests: Log QMP traffic in debug mode
Date: Tue, 23 Aug 2016 13:59:07 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 08/23/2016 09:46 AM, Kevin Wolf wrote:
> Python tests are already annoying enough to debug. With QMP traffic
> available it's a little bit easier at least.
> 
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
>  tests/qemu-iotests/iotests.py | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
> index 03bccdd..3329bc1 100644
> --- a/tests/qemu-iotests/iotests.py
> +++ b/tests/qemu-iotests/iotests.py
> @@ -50,6 +50,7 @@ cachemode = os.environ.get('CACHEMODE')
>  qemu_default_machine = os.environ.get('QEMU_DEFAULT_MACHINE')
>  
>  socket_scm_helper = os.environ.get('SOCKET_SCM_HELPER', 'socket_scm_helper')
> +debug = False
>  
>  def qemu_img(*args):
>      '''Run qemu-img and return the exit code'''
> @@ -134,6 +135,8 @@ class VM(qtest.QEMUQtestMachine):
>      def __init__(self):
>          super(VM, self).__init__(qemu_prog, qemu_opts, test_dir=test_dir,
>                                   socket_scm_helper=socket_scm_helper)
> +        if debug:
> +            self._debug = True
>          self._num_drives = 0
>  

So we already had plumbing for debug...

>      def add_device(self, opts):
> @@ -323,6 +326,8 @@ def verify_quorum():
>  def main(supported_fmts=[], supported_oses=['linux']):
>      '''Run tests'''
>  
> +    global debug

...but just needed to turn it on?

At any rate, I agree that it is useful for figuring out when tests go
wrong, so:

Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]