qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] qemu-iotests/iotests.py: improve assert_qmp message
@ 2019-10-26 10:12 Vladimir Sementsov-Ogievskiy
  2019-10-26 11:29 ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 4+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2019-10-26 10:12 UTC (permalink / raw)
  To: qemu-block; +Cc: kwolf, vsementsov, qemu-devel, mreitz

Make it obvious, from the two values which is found at path and which
is expected.

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')
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] qemu-iotests/iotests.py: improve assert_qmp message
  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é
  2019-10-26 16:58   ` Vladimir Sementsov-Ogievskiy
  0 siblings, 1 reply; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-10-26 11:29 UTC (permalink / raw)
  To: Vladimir Sementsov-Ogievskiy, qemu-block; +Cc: kwolf, qemu-devel, mreitz

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')
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] qemu-iotests/iotests.py: improve assert_qmp message
  2019-10-26 11:29 ` Philippe Mathieu-Daudé
@ 2019-10-26 16:58   ` Vladimir Sementsov-Ogievskiy
  2019-10-28 10:49     ` Kevin Wolf
  0 siblings, 1 reply; 4+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2019-10-26 16:58 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-block; +Cc: kwolf, qemu-devel, mreitz

26.10.2019 14:29, Philippe Mathieu-Daudé wrote:
> 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>

Thanks for review and better wording!

> 
>>
>> 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')
>>


-- 
Best regards,
Vladimir

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] qemu-iotests/iotests.py: improve assert_qmp message
  2019-10-26 16:58   ` Vladimir Sementsov-Ogievskiy
@ 2019-10-28 10:49     ` Kevin Wolf
  0 siblings, 0 replies; 4+ messages in thread
From: Kevin Wolf @ 2019-10-28 10:49 UTC (permalink / raw)
  To: Vladimir Sementsov-Ogievskiy
  Cc: Philippe Mathieu-Daudé, qemu-devel, qemu-block, mreitz

Am 26.10.2019 um 18:58 hat Vladimir Sementsov-Ogievskiy geschrieben:
> 26.10.2019 14:29, Philippe Mathieu-Daudé wrote:
> > 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>
> 
> Thanks for review and better wording!

Thanks, updated the commit message and applies to the block branch.

Kevin



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-28 10:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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é
2019-10-26 16:58   ` Vladimir Sementsov-Ogievskiy
2019-10-28 10:49     ` Kevin Wolf

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).