* [Qemu-devel] [PATCH] iotests: Make 182 do without device_add
@ 2019-04-17 15:30 Max Reitz
2019-04-17 15:30 ` Max Reitz
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Max Reitz @ 2019-04-17 15:30 UTC (permalink / raw)
To: qemu-block; +Cc: qemu-devel, Max Reitz, Kevin Wolf, Alberto Garcia
182 fails if qemu has no support for hotplugging of a virtio-blk device.
Using an NBD server instead works just as well for the test, even on
qemus without hotplugging support.
Fixes: 6d0a4a0fb5c8f10c8eb68b52cfda0082b00ae963
Reported-by: Danilo C. L. de Paula <ddepaula@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
---
To reintroduce the bug for which this test was written, revert the
following commits:
$ git revert -n \
23dece19da41724349809873923e20a48b619cb7 \
6ceabe6f77e4ae5ac2fa3d2ac1be11dc95021941 \
a6aeca0ca530f104b5a5dd6704fca22b2c5edefa \
577a133988c76e4ebf01d050d0d758d207a1baf7
---
tests/qemu-iotests/182 | 22 +++++++++++++++++-----
tests/qemu-iotests/182.out | 1 +
2 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/tests/qemu-iotests/182 b/tests/qemu-iotests/182
index ff3d7e7ec1..38959bf276 100755
--- a/tests/qemu-iotests/182
+++ b/tests/qemu-iotests/182
@@ -31,6 +31,7 @@ _cleanup()
{
_cleanup_test_img
rm -f "$TEST_IMG.overlay"
+ rm -f "$TEST_DIR/nbd.socket"
}
trap "_cleanup; exit \$status" 0 1 2 3 15
@@ -126,15 +127,26 @@ success_or_failure=y _send_qemu_cmd $QEMU_HANDLE \
'return' \
'error'
-# Now we attach the image to a virtio-blk device. This device does
-# require some permissions (at least WRITE and READ_CONSISTENT), so if
+# Start an NBD server to which we can attach node1
+success_or_failure=y _send_qemu_cmd $QEMU_HANDLE \
+ "{'execute': 'nbd-server-start',
+ 'arguments': {
+ 'addr': {
+ 'type': 'unix',
+ 'data': {
+ 'path': '$TEST_DIR/nbd.socket'
+ } } } }" \
+ 'return' \
+ 'error'
+
+# Now we attach the image to the NBD server. This server does require
+# some permissions (at least WRITE and READ_CONSISTENT), so if
# reopening node0 unshared any (which it should not have), this will
# fail (but it should not).
success_or_failure=y _send_qemu_cmd $QEMU_HANDLE \
- "{'execute': 'device_add',
+ "{'execute': 'nbd-server-add',
'arguments': {
- 'driver': 'virtio-blk',
- 'drive': 'node1'
+ 'device': 'node1'
} }" \
'return' \
'error'
diff --git a/tests/qemu-iotests/182.out b/tests/qemu-iotests/182.out
index af501ca3f3..33d41eea91 100644
--- a/tests/qemu-iotests/182.out
+++ b/tests/qemu-iotests/182.out
@@ -14,4 +14,5 @@ Formatting 'TEST_DIR/t.qcow2.overlay', fmt=qcow2 size=197120 backing_file=TEST_D
{"return": {}}
{"return": {}}
{"return": {}}
+{"return": {}}
*** done
--
2.20.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH] iotests: Make 182 do without device_add
2019-04-17 15:30 [Qemu-devel] [PATCH] iotests: Make 182 do without device_add Max Reitz
@ 2019-04-17 15:30 ` Max Reitz
2019-04-17 15:39 ` Eric Blake
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Max Reitz @ 2019-04-17 15:30 UTC (permalink / raw)
To: qemu-block; +Cc: Kevin Wolf, Alberto Garcia, qemu-devel, Max Reitz
182 fails if qemu has no support for hotplugging of a virtio-blk device.
Using an NBD server instead works just as well for the test, even on
qemus without hotplugging support.
Fixes: 6d0a4a0fb5c8f10c8eb68b52cfda0082b00ae963
Reported-by: Danilo C. L. de Paula <ddepaula@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
---
To reintroduce the bug for which this test was written, revert the
following commits:
$ git revert -n \
23dece19da41724349809873923e20a48b619cb7 \
6ceabe6f77e4ae5ac2fa3d2ac1be11dc95021941 \
a6aeca0ca530f104b5a5dd6704fca22b2c5edefa \
577a133988c76e4ebf01d050d0d758d207a1baf7
---
tests/qemu-iotests/182 | 22 +++++++++++++++++-----
tests/qemu-iotests/182.out | 1 +
2 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/tests/qemu-iotests/182 b/tests/qemu-iotests/182
index ff3d7e7ec1..38959bf276 100755
--- a/tests/qemu-iotests/182
+++ b/tests/qemu-iotests/182
@@ -31,6 +31,7 @@ _cleanup()
{
_cleanup_test_img
rm -f "$TEST_IMG.overlay"
+ rm -f "$TEST_DIR/nbd.socket"
}
trap "_cleanup; exit \$status" 0 1 2 3 15
@@ -126,15 +127,26 @@ success_or_failure=y _send_qemu_cmd $QEMU_HANDLE \
'return' \
'error'
-# Now we attach the image to a virtio-blk device. This device does
-# require some permissions (at least WRITE and READ_CONSISTENT), so if
+# Start an NBD server to which we can attach node1
+success_or_failure=y _send_qemu_cmd $QEMU_HANDLE \
+ "{'execute': 'nbd-server-start',
+ 'arguments': {
+ 'addr': {
+ 'type': 'unix',
+ 'data': {
+ 'path': '$TEST_DIR/nbd.socket'
+ } } } }" \
+ 'return' \
+ 'error'
+
+# Now we attach the image to the NBD server. This server does require
+# some permissions (at least WRITE and READ_CONSISTENT), so if
# reopening node0 unshared any (which it should not have), this will
# fail (but it should not).
success_or_failure=y _send_qemu_cmd $QEMU_HANDLE \
- "{'execute': 'device_add',
+ "{'execute': 'nbd-server-add',
'arguments': {
- 'driver': 'virtio-blk',
- 'drive': 'node1'
+ 'device': 'node1'
} }" \
'return' \
'error'
diff --git a/tests/qemu-iotests/182.out b/tests/qemu-iotests/182.out
index af501ca3f3..33d41eea91 100644
--- a/tests/qemu-iotests/182.out
+++ b/tests/qemu-iotests/182.out
@@ -14,4 +14,5 @@ Formatting 'TEST_DIR/t.qcow2.overlay', fmt=qcow2 size=197120 backing_file=TEST_D
{"return": {}}
{"return": {}}
{"return": {}}
+{"return": {}}
*** done
--
2.20.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] iotests: Make 182 do without device_add
2019-04-17 15:30 [Qemu-devel] [PATCH] iotests: Make 182 do without device_add Max Reitz
2019-04-17 15:30 ` Max Reitz
@ 2019-04-17 15:39 ` Eric Blake
2019-04-17 15:39 ` Eric Blake
2019-04-25 16:31 ` Alberto Garcia
2019-05-07 13:21 ` Max Reitz
3 siblings, 1 reply; 8+ messages in thread
From: Eric Blake @ 2019-04-17 15:39 UTC (permalink / raw)
To: Max Reitz, qemu-block; +Cc: Kevin Wolf, Alberto Garcia, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1280 bytes --]
On 4/17/19 10:30 AM, Max Reitz wrote:
> 182 fails if qemu has no support for hotplugging of a virtio-blk device.
> Using an NBD server instead works just as well for the test, even on
> qemus without hotplugging support.
>
> Fixes: 6d0a4a0fb5c8f10c8eb68b52cfda0082b00ae963
> Reported-by: Danilo C. L. de Paula <ddepaula@redhat.com>
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
> To reintroduce the bug for which this test was written, revert the
> following commits:
>
> $ git revert -n \
> 23dece19da41724349809873923e20a48b619cb7 \
> 6ceabe6f77e4ae5ac2fa3d2ac1be11dc95021941 \
> a6aeca0ca530f104b5a5dd6704fca22b2c5edefa \
> 577a133988c76e4ebf01d050d0d758d207a1baf7
Useful instructions; with them, I was able to:
Tested-by: Eric Blake <eblake@redhat.com>
> ---
> tests/qemu-iotests/182 | 22 +++++++++++++++++-----
> tests/qemu-iotests/182.out | 1 +
> 2 files changed, 18 insertions(+), 5 deletions(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
Do you want me to take this through my NBD tree, since it now depends on
NBD? I'm also fine letting it go through your iotests tree
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] iotests: Make 182 do without device_add
2019-04-17 15:39 ` Eric Blake
@ 2019-04-17 15:39 ` Eric Blake
0 siblings, 0 replies; 8+ messages in thread
From: Eric Blake @ 2019-04-17 15:39 UTC (permalink / raw)
To: Max Reitz, qemu-block; +Cc: Kevin Wolf, Alberto Garcia, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1280 bytes --]
On 4/17/19 10:30 AM, Max Reitz wrote:
> 182 fails if qemu has no support for hotplugging of a virtio-blk device.
> Using an NBD server instead works just as well for the test, even on
> qemus without hotplugging support.
>
> Fixes: 6d0a4a0fb5c8f10c8eb68b52cfda0082b00ae963
> Reported-by: Danilo C. L. de Paula <ddepaula@redhat.com>
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
> To reintroduce the bug for which this test was written, revert the
> following commits:
>
> $ git revert -n \
> 23dece19da41724349809873923e20a48b619cb7 \
> 6ceabe6f77e4ae5ac2fa3d2ac1be11dc95021941 \
> a6aeca0ca530f104b5a5dd6704fca22b2c5edefa \
> 577a133988c76e4ebf01d050d0d758d207a1baf7
Useful instructions; with them, I was able to:
Tested-by: Eric Blake <eblake@redhat.com>
> ---
> tests/qemu-iotests/182 | 22 +++++++++++++++++-----
> tests/qemu-iotests/182.out | 1 +
> 2 files changed, 18 insertions(+), 5 deletions(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
Do you want me to take this through my NBD tree, since it now depends on
NBD? I'm also fine letting it go through your iotests tree
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] iotests: Make 182 do without device_add
2019-04-17 15:30 [Qemu-devel] [PATCH] iotests: Make 182 do without device_add Max Reitz
2019-04-17 15:30 ` Max Reitz
2019-04-17 15:39 ` Eric Blake
@ 2019-04-25 16:31 ` Alberto Garcia
2019-04-25 16:31 ` Alberto Garcia
2019-05-07 13:21 ` Max Reitz
3 siblings, 1 reply; 8+ messages in thread
From: Alberto Garcia @ 2019-04-25 16:31 UTC (permalink / raw)
To: Max Reitz, qemu-block; +Cc: qemu-devel, Kevin Wolf
On Wed 17 Apr 2019 05:30:05 PM CEST, Max Reitz wrote:
> 182 fails if qemu has no support for hotplugging of a virtio-blk device.
> Using an NBD server instead works just as well for the test, even on
> qemus without hotplugging support.
>
> Fixes: 6d0a4a0fb5c8f10c8eb68b52cfda0082b00ae963
> Reported-by: Danilo C. L. de Paula <ddepaula@redhat.com>
> Signed-off-by: Max Reitz <mreitz@redhat.com>
Acked-by: Alberto Garcia <berto@igalia.com>
Berto
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] iotests: Make 182 do without device_add
2019-04-25 16:31 ` Alberto Garcia
@ 2019-04-25 16:31 ` Alberto Garcia
0 siblings, 0 replies; 8+ messages in thread
From: Alberto Garcia @ 2019-04-25 16:31 UTC (permalink / raw)
To: Max Reitz, qemu-block; +Cc: Kevin Wolf, qemu-devel, Max Reitz
On Wed 17 Apr 2019 05:30:05 PM CEST, Max Reitz wrote:
> 182 fails if qemu has no support for hotplugging of a virtio-blk device.
> Using an NBD server instead works just as well for the test, even on
> qemus without hotplugging support.
>
> Fixes: 6d0a4a0fb5c8f10c8eb68b52cfda0082b00ae963
> Reported-by: Danilo C. L. de Paula <ddepaula@redhat.com>
> Signed-off-by: Max Reitz <mreitz@redhat.com>
Acked-by: Alberto Garcia <berto@igalia.com>
Berto
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] iotests: Make 182 do without device_add
2019-04-17 15:30 [Qemu-devel] [PATCH] iotests: Make 182 do without device_add Max Reitz
` (2 preceding siblings ...)
2019-04-25 16:31 ` Alberto Garcia
@ 2019-05-07 13:21 ` Max Reitz
2019-05-07 15:04 ` Eric Blake
3 siblings, 1 reply; 8+ messages in thread
From: Max Reitz @ 2019-05-07 13:21 UTC (permalink / raw)
To: qemu-block; +Cc: Kevin Wolf, Alberto Garcia, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 930 bytes --]
On 17.04.19 17:30, Max Reitz wrote:
> 182 fails if qemu has no support for hotplugging of a virtio-blk device.
> Using an NBD server instead works just as well for the test, even on
> qemus without hotplugging support.
>
> Fixes: 6d0a4a0fb5c8f10c8eb68b52cfda0082b00ae963
> Reported-by: Danilo C. L. de Paula <ddepaula@redhat.com>
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
> To reintroduce the bug for which this test was written, revert the
> following commits:
>
> $ git revert -n \
> 23dece19da41724349809873923e20a48b619cb7 \
> 6ceabe6f77e4ae5ac2fa3d2ac1be11dc95021941 \
> a6aeca0ca530f104b5a5dd6704fca22b2c5edefa \
> 577a133988c76e4ebf01d050d0d758d207a1baf7
> ---
> tests/qemu-iotests/182 | 22 +++++++++++++++++-----
> tests/qemu-iotests/182.out | 1 +
> 2 files changed, 18 insertions(+), 5 deletions(-)
Thanks for the reviews, applied to my block branch.
Max
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] iotests: Make 182 do without device_add
2019-05-07 13:21 ` Max Reitz
@ 2019-05-07 15:04 ` Eric Blake
0 siblings, 0 replies; 8+ messages in thread
From: Eric Blake @ 2019-05-07 15:04 UTC (permalink / raw)
To: Max Reitz, qemu-block; +Cc: Kevin Wolf, Alberto Garcia, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1348 bytes --]
On 5/7/19 8:21 AM, Max Reitz wrote:
> On 17.04.19 17:30, Max Reitz wrote:
>> 182 fails if qemu has no support for hotplugging of a virtio-blk device.
>> Using an NBD server instead works just as well for the test, even on
>> qemus without hotplugging support.
>>
>> Fixes: 6d0a4a0fb5c8f10c8eb68b52cfda0082b00ae963
>> Reported-by: Danilo C. L. de Paula <ddepaula@redhat.com>
>> Signed-off-by: Max Reitz <mreitz@redhat.com>
>> ---
>> To reintroduce the bug for which this test was written, revert the
>> following commits:
>>
>> $ git revert -n \
>> 23dece19da41724349809873923e20a48b619cb7 \
>> 6ceabe6f77e4ae5ac2fa3d2ac1be11dc95021941 \
>> a6aeca0ca530f104b5a5dd6704fca22b2c5edefa \
>> 577a133988c76e4ebf01d050d0d758d207a1baf7
>> ---
>> tests/qemu-iotests/182 | 22 +++++++++++++++++-----
>> tests/qemu-iotests/182.out | 1 +
>> 2 files changed, 18 insertions(+), 5 deletions(-)
>
> Thanks for the reviews, applied to my block branch.
Hmm, just seeing this after I already sent a pull request doing the same
through NBD. Git should handle things correctly, whether or not you
rebase to drop patches from your block branch that get in through my NBD
pull request.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-05-07 15:10 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-17 15:30 [Qemu-devel] [PATCH] iotests: Make 182 do without device_add Max Reitz
2019-04-17 15:30 ` Max Reitz
2019-04-17 15:39 ` Eric Blake
2019-04-17 15:39 ` Eric Blake
2019-04-25 16:31 ` Alberto Garcia
2019-04-25 16:31 ` Alberto Garcia
2019-05-07 13:21 ` Max Reitz
2019-05-07 15:04 ` Eric Blake
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).