diff mbox

[2/2] iotests: Don't mention bdrv_swap in comments

Message ID 1450328956-25224-3-git-send-email-famz@redhat.com
State New
Headers show

Commit Message

Fam Zheng Dec. 17, 2015, 5:09 a.m. UTC
Signed-off-by: Fam Zheng <famz@redhat.com>
---
 tests/qemu-iotests/094 | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Kevin Wolf Dec. 17, 2015, 8:21 a.m. UTC | #1
Am 17.12.2015 um 06:09 hat Fam Zheng geschrieben:
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
>  tests/qemu-iotests/094 | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/tests/qemu-iotests/094 b/tests/qemu-iotests/094
> index 27a2be2..d30c78d 100755
> --- a/tests/qemu-iotests/094
> +++ b/tests/qemu-iotests/094
> @@ -1,6 +1,6 @@
>  #!/bin/bash
>  #
> -# Test case for drive-mirror to NBD (especially bdrv_swap() on NBD BDS)
> +# Test case for drive-mirror to NBD
>  #
>  # Copyright (C) 2015 Red Hat, Inc.
>  #
> @@ -50,8 +50,6 @@ _send_qemu_cmd $QEMU_HANDLE \
>      "{'execute': 'qmp_capabilities'}" \
>      'return'
>  
> -# 'format': 'nbd' is not actually "correct", but this is probably the only way
> -# to test bdrv_swap() on an NBD BDS
>  _send_qemu_cmd $QEMU_HANDLE  \
>      "{'execute': 'drive-mirror',
>        'arguments': {'device': 'src',

Just completely removing the comment doesn't seem right to me if we
leave the "bad" option around.

The test seems to be a regression test for what was fixed in commit
f53a829, i.e. a direct effect of bdrv_swap(). This effect can't exist
any more, so we would keep the test just for some additional coverage
for NBD. Do we still need 'format': 'nbd' (if so, with a comment why we
do that) or should we make it 'raw' now?

Kevin
Fam Zheng Dec. 17, 2015, 12:44 p.m. UTC | #2
On Thu, 12/17 09:21, Kevin Wolf wrote:
> Am 17.12.2015 um 06:09 hat Fam Zheng geschrieben:
> > Signed-off-by: Fam Zheng <famz@redhat.com>
> > ---
> >  tests/qemu-iotests/094 | 4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> > 
> > diff --git a/tests/qemu-iotests/094 b/tests/qemu-iotests/094
> > index 27a2be2..d30c78d 100755
> > --- a/tests/qemu-iotests/094
> > +++ b/tests/qemu-iotests/094
> > @@ -1,6 +1,6 @@
> >  #!/bin/bash
> >  #
> > -# Test case for drive-mirror to NBD (especially bdrv_swap() on NBD BDS)
> > +# Test case for drive-mirror to NBD
> >  #
> >  # Copyright (C) 2015 Red Hat, Inc.
> >  #
> > @@ -50,8 +50,6 @@ _send_qemu_cmd $QEMU_HANDLE \
> >      "{'execute': 'qmp_capabilities'}" \
> >      'return'
> >  
> > -# 'format': 'nbd' is not actually "correct", but this is probably the only way
> > -# to test bdrv_swap() on an NBD BDS
> >  _send_qemu_cmd $QEMU_HANDLE  \
> >      "{'execute': 'drive-mirror',
> >        'arguments': {'device': 'src',
> 
> Just completely removing the comment doesn't seem right to me if we
> leave the "bad" option around.
> 
> The test seems to be a regression test for what was fixed in commit
> f53a829, i.e. a direct effect of bdrv_swap(). This effect can't exist
> any more, so we would keep the test just for some additional coverage
> for NBD. Do we still need 'format': 'nbd' (if so, with a comment why we
> do that) or should we make it 'raw' now?
> 

I prefer keeping it as is, because making it raw would spoil the purpose as a
regression test (the fix was on nbd).

Can we re-comment it as below?

    # 'format': 'nbd' is not actually "correct", but this was the only way to
    # test the bug fixed in commit f53a829.  Though the bug's related code
    # bdrv_swap() was replaced later, let's make sure we don't fall in the same
    # pit again.

Fam
Kevin Wolf Dec. 17, 2015, 12:48 p.m. UTC | #3
Am 17.12.2015 um 13:44 hat Fam Zheng geschrieben:
> On Thu, 12/17 09:21, Kevin Wolf wrote:
> > Am 17.12.2015 um 06:09 hat Fam Zheng geschrieben:
> > > Signed-off-by: Fam Zheng <famz@redhat.com>
> > > ---
> > >  tests/qemu-iotests/094 | 4 +---
> > >  1 file changed, 1 insertion(+), 3 deletions(-)
> > > 
> > > diff --git a/tests/qemu-iotests/094 b/tests/qemu-iotests/094
> > > index 27a2be2..d30c78d 100755
> > > --- a/tests/qemu-iotests/094
> > > +++ b/tests/qemu-iotests/094
> > > @@ -1,6 +1,6 @@
> > >  #!/bin/bash
> > >  #
> > > -# Test case for drive-mirror to NBD (especially bdrv_swap() on NBD BDS)
> > > +# Test case for drive-mirror to NBD
> > >  #
> > >  # Copyright (C) 2015 Red Hat, Inc.
> > >  #
> > > @@ -50,8 +50,6 @@ _send_qemu_cmd $QEMU_HANDLE \
> > >      "{'execute': 'qmp_capabilities'}" \
> > >      'return'
> > >  
> > > -# 'format': 'nbd' is not actually "correct", but this is probably the only way
> > > -# to test bdrv_swap() on an NBD BDS
> > >  _send_qemu_cmd $QEMU_HANDLE  \
> > >      "{'execute': 'drive-mirror',
> > >        'arguments': {'device': 'src',
> > 
> > Just completely removing the comment doesn't seem right to me if we
> > leave the "bad" option around.
> > 
> > The test seems to be a regression test for what was fixed in commit
> > f53a829, i.e. a direct effect of bdrv_swap(). This effect can't exist
> > any more, so we would keep the test just for some additional coverage
> > for NBD. Do we still need 'format': 'nbd' (if so, with a comment why we
> > do that) or should we make it 'raw' now?
> > 
> 
> I prefer keeping it as is, because making it raw would spoil the purpose as a
> regression test (the fix was on nbd).
> 
> Can we re-comment it as below?
> 
>     # 'format': 'nbd' is not actually "correct", but this was the only way to
>     # test the bug fixed in commit f53a829.  Though the bug's related code
>     # bdrv_swap() was replaced later, let's make sure we don't fall in the same
>     # pit again.

That's fine with me.

Kevin
Paolo Bonzini Dec. 17, 2015, 7:07 p.m. UTC | #4
On 17/12/2015 09:21, Kevin Wolf wrote:
>> > -# 'format': 'nbd' is not actually "correct", but this is probably the only way
>> > -# to test bdrv_swap() on an NBD BDS
>> >  _send_qemu_cmd $QEMU_HANDLE  \
>> >      "{'execute': 'drive-mirror',
>> >        'arguments': {'device': 'src',
> Just completely removing the comment doesn't seem right to me if we
> leave the "bad" option around.
> 
> The test seems to be a regression test for what was fixed in commit
> f53a829, i.e. a direct effect of bdrv_swap(). This effect can't exist
> any more, so we would keep the test just for some additional coverage
> for NBD. Do we still need 'format': 'nbd' (if so, with a comment why we
> do that) or should we make it 'raw' now?

Some coverage of no-format BDSes is nice to have, since raw is sometimes
measurably slower than no format at all.

Paolo
diff mbox

Patch

diff --git a/tests/qemu-iotests/094 b/tests/qemu-iotests/094
index 27a2be2..d30c78d 100755
--- a/tests/qemu-iotests/094
+++ b/tests/qemu-iotests/094
@@ -1,6 +1,6 @@ 
 #!/bin/bash
 #
-# Test case for drive-mirror to NBD (especially bdrv_swap() on NBD BDS)
+# Test case for drive-mirror to NBD
 #
 # Copyright (C) 2015 Red Hat, Inc.
 #
@@ -50,8 +50,6 @@  _send_qemu_cmd $QEMU_HANDLE \
     "{'execute': 'qmp_capabilities'}" \
     'return'
 
-# 'format': 'nbd' is not actually "correct", but this is probably the only way
-# to test bdrv_swap() on an NBD BDS
 _send_qemu_cmd $QEMU_HANDLE  \
     "{'execute': 'drive-mirror',
       'arguments': {'device': 'src',