qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	qemu-block@nongnu.org
Cc: kwolf@redhat.com, qemu-devel@nongnu.org, mreitz@redhat.com
Subject: Re: [PATCH] qemu-iotests/iotests.py: improve assert_qmp message
Date: Sat, 26 Oct 2019 13:29:52 +0200	[thread overview]
Message-ID: <8938c24a-4f3d-4df2-4c30-f1922242789b@redhat.com> (raw)
In-Reply-To: <20191026101221.5506-1-vsementsov@virtuozzo.com>

On 10/26/19 12:12 PM, Vladimir Sementsov-Ogievskiy wrote:
> Make it obvious, from the two values which is found at path and which
> is expected.

Maybe:

"From the two values compared, make it obvious which is found at path, 
and which is expected."

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> 
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
> 
> It's a pain, I can never remember it, and checking each time in source
> code who is who is boring.
> 
>   tests/qemu-iotests/iotests.py | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
> index 709def4d5d..e805b9ab14 100644
> --- a/tests/qemu-iotests/iotests.py
> +++ b/tests/qemu-iotests/iotests.py
> @@ -729,8 +729,8 @@ class QMPTestCase(unittest.TestCase):
>               self.fail('no match for "%s" in %s' % (str(result), str(value)))
>           else:
>               self.assertEqual(result, value,
> -                             'values not equal "%s" and "%s"'
> -                                 % (str(result), str(value)))
> +                             '"%s" is "%s", expected "%s"'
> +                                 % (path, str(result), str(value)))
>   
>       def assert_no_active_block_jobs(self):
>           result = self.vm.qmp('query-block-jobs')
> 


  reply	other threads:[~2019-10-26 11:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-26 10:12 [PATCH] qemu-iotests/iotests.py: improve assert_qmp message Vladimir Sementsov-Ogievskiy
2019-10-26 11:29 ` Philippe Mathieu-Daudé [this message]
2019-10-26 16:58   ` Vladimir Sementsov-Ogievskiy
2019-10-28 10:49     ` Kevin Wolf

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=8938c24a-4f3d-4df2-4c30-f1922242789b@redhat.com \
    --to=philmd@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.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).