From: Kevin Wolf <kwolf@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, mreitz@redhat.com, eblake@redhat.com,
qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH v3 11/12] qemu-iotests/141: Avoid blockdev-add with id
Date: Wed, 21 Sep 2016 14:56:10 +0200 [thread overview]
Message-ID: <1474462571-10596-12-git-send-email-kwolf@redhat.com> (raw)
In-Reply-To: <1474462571-10596-1-git-send-email-kwolf@redhat.com>
We want to remove the 'id' option for blockdev-add. This removes one
user of the option and makes it use only node names.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
tests/qemu-iotests/141 | 24 ++++++++++++++----------
tests/qemu-iotests/141.out | 24 ++++++++++++------------
2 files changed, 26 insertions(+), 22 deletions(-)
diff --git a/tests/qemu-iotests/141 b/tests/qemu-iotests/141
index b2617e5..c092d87 100755
--- a/tests/qemu-iotests/141
+++ b/tests/qemu-iotests/141
@@ -51,7 +51,7 @@ test_blockjob()
"{'execute': 'blockdev-add',
'arguments': {
'options': {
- 'id': 'drv0',
+ 'node-name': 'drv0',
'driver': '$IMGFMT',
'file': {
'driver': 'file',
@@ -66,18 +66,18 @@ test_blockjob()
# We want this to return an error because the block job is still running
_send_qemu_cmd $QEMU_HANDLE \
- "{'execute': 'x-blockdev-remove-medium',
- 'arguments': {'device': 'drv0'}}" \
+ "{'execute': 'x-blockdev-del',
+ 'arguments': {'node-name': 'drv0'}}" \
'error'
_send_qemu_cmd $QEMU_HANDLE \
"{'execute': 'block-job-cancel',
- 'arguments': {'device': 'drv0'}}" \
+ 'arguments': {'device': 'job0'}}" \
"$3"
_send_qemu_cmd $QEMU_HANDLE \
"{'execute': 'x-blockdev-del',
- 'arguments': {'id': 'drv0'}}" \
+ 'arguments': {'node-name': 'drv0'}}" \
'return'
}
@@ -101,7 +101,8 @@ echo
test_blockjob \
"{'execute': 'drive-backup',
- 'arguments': {'device': 'drv0',
+ 'arguments': {'job-id': 'job0',
+ 'device': 'drv0',
'target': '$TEST_DIR/o.$IMGFMT',
'format': '$IMGFMT',
'sync': 'none'}}" \
@@ -117,7 +118,8 @@ echo
test_blockjob \
"{'execute': 'drive-mirror',
- 'arguments': {'device': 'drv0',
+ 'arguments': {'job-id': 'job0',
+ 'device': 'drv0',
'target': '$TEST_DIR/o.$IMGFMT',
'format': '$IMGFMT',
'sync': 'none'}}" \
@@ -134,7 +136,7 @@ echo
test_blockjob \
"{'execute': 'block-commit',
- 'arguments': {'device': 'drv0'}}" \
+ 'arguments': {'job-id': 'job0', 'device': 'drv0'}}" \
'BLOCK_JOB_READY' \
'BLOCK_JOB_COMPLETED'
@@ -150,7 +152,8 @@ $QEMU_IO -c 'write 0 1M' "$TEST_DIR/m.$IMGFMT" | _filter_qemu_io
test_blockjob \
"{'execute': 'block-commit',
- 'arguments': {'device': 'drv0',
+ 'arguments': {'job-id': 'job0',
+ 'device': 'drv0',
'top': '$TEST_DIR/m.$IMGFMT',
'speed': 1}}" \
'return' \
@@ -172,7 +175,8 @@ $QEMU_IO -c 'write 0 1M' "$TEST_DIR/b.$IMGFMT" | _filter_qemu_io
test_blockjob \
"{'execute': 'block-stream',
- 'arguments': {'device': 'drv0',
+ 'arguments': {'job-id': 'job0',
+ 'device': 'drv0',
'speed': 1}}" \
'return' \
'BLOCK_JOB_CANCELLED'
diff --git a/tests/qemu-iotests/141.out b/tests/qemu-iotests/141.out
index eaf1e60..195ca1a 100644
--- a/tests/qemu-iotests/141.out
+++ b/tests/qemu-iotests/141.out
@@ -9,30 +9,30 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 backing_file=TEST_DIR/m.
{"return": {}}
Formatting 'TEST_DIR/o.IMGFMT', fmt=IMGFMT size=1048576 backing_file=TEST_DIR/t.IMGFMT backing_fmt=IMGFMT
{"return": {}}
-{"error": {"class": "GenericError", "desc": "Node 'drv0' is busy: block device is in use by block job: backup"}}
+{"error": {"class": "GenericError", "desc": "Node drv0 is in use"}}
{"return": {}}
-{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "drv0", "len": 1048576, "offset": 0, "speed": 0, "type": "backup"}}
+{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "job0", "len": 1048576, "offset": 0, "speed": 0, "type": "backup"}}
{"return": {}}
=== Testing drive-mirror ===
{"return": {}}
Formatting 'TEST_DIR/o.IMGFMT', fmt=IMGFMT size=1048576 backing_file=TEST_DIR/t.IMGFMT backing_fmt=IMGFMT
-{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "drv0", "len": 0, "offset": 0, "speed": 0, "type": "mirror"}}
+{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "job0", "len": 0, "offset": 0, "speed": 0, "type": "mirror"}}
{"return": {}}
-{"error": {"class": "GenericError", "desc": "Node 'drv0' is busy: block device is in use by block job: mirror"}}
+{"error": {"class": "GenericError", "desc": "Node drv0 is in use"}}
{"return": {}}
-{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "drv0", "len": 0, "offset": 0, "speed": 0, "type": "mirror"}}
+{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "job0", "len": 0, "offset": 0, "speed": 0, "type": "mirror"}}
{"return": {}}
=== Testing active block-commit ===
{"return": {}}
-{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "drv0", "len": 0, "offset": 0, "speed": 0, "type": "commit"}}
+{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "job0", "len": 0, "offset": 0, "speed": 0, "type": "commit"}}
{"return": {}}
-{"error": {"class": "GenericError", "desc": "Node 'drv0' is busy: block device is in use by block job: commit"}}
+{"error": {"class": "GenericError", "desc": "Node drv0 is in use"}}
{"return": {}}
-{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "drv0", "len": 0, "offset": 0, "speed": 0, "type": "commit"}}
+{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "job0", "len": 0, "offset": 0, "speed": 0, "type": "commit"}}
{"return": {}}
=== Testing non-active block-commit ===
@@ -41,9 +41,9 @@ wrote 1048576/1048576 bytes at offset 0
1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
{"return": {}}
{"return": {}}
-{"error": {"class": "GenericError", "desc": "Node 'drv0' is busy: block device is in use by block job: commit"}}
+{"error": {"class": "GenericError", "desc": "Node drv0 is in use"}}
{"return": {}}
-{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "drv0", "len": 1048576, "offset": 524288, "speed": 1, "type": "commit"}}
+{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "job0", "len": 1048576, "offset": 524288, "speed": 1, "type": "commit"}}
{"return": {}}
=== Testing block-stream ===
@@ -52,8 +52,8 @@ wrote 1048576/1048576 bytes at offset 0
1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
{"return": {}}
{"return": {}}
-{"error": {"class": "GenericError", "desc": "Node 'drv0' is busy: block device is in use by block job: stream"}}
+{"error": {"class": "GenericError", "desc": "Node drv0 is in use"}}
{"return": {}}
-{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "drv0", "len": 1048576, "offset": 524288, "speed": 1, "type": "stream"}}
+{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "job0", "len": 1048576, "offset": 524288, "speed": 1, "type": "stream"}}
{"return": {}}
*** done
--
1.8.3.1
next prev parent reply other threads:[~2016-09-21 12:56 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-21 12:55 [Qemu-devel] [PATCH v3 00/12] block: Remove BB interface from blockdev-add/del Kevin Wolf
2016-09-21 12:56 ` [Qemu-devel] [PATCH v3 01/12] qemu-iotests/041: Avoid blockdev-add with id Kevin Wolf
2016-09-21 12:56 ` [Qemu-devel] [PATCH v3 02/12] qemu-iotests/067: " Kevin Wolf
2016-09-21 12:56 ` [Qemu-devel] [PATCH v3 03/12] qemu-iotests/071: " Kevin Wolf
2016-09-21 12:56 ` [Qemu-devel] [PATCH v3 04/12] qemu-iotests/081: " Kevin Wolf
2016-09-21 12:56 ` [Qemu-devel] [PATCH v3 05/12] qemu-iotests/087: " Kevin Wolf
2016-09-21 12:56 ` [Qemu-devel] [PATCH v3 06/12] qemu-iotests/117: " Kevin Wolf
2016-09-21 12:56 ` [Qemu-devel] [PATCH v3 07/12] qemu-iotests/118: " Kevin Wolf
2016-09-21 12:56 ` [Qemu-devel] [PATCH v3 08/12] qemu-iotests/124: " Kevin Wolf
2016-09-21 12:56 ` [Qemu-devel] [PATCH v3 09/12] qemu-iotests/139: " Kevin Wolf
2016-09-21 12:56 ` [Qemu-devel] [PATCH v3 10/12] block: Avoid printing NULL string in error messages Kevin Wolf
2016-09-21 14:16 ` Eric Blake
2016-09-21 12:56 ` Kevin Wolf [this message]
2016-09-21 14:17 ` [Qemu-devel] [PATCH v3 11/12] qemu-iotests/141: Avoid blockdev-add with id Eric Blake
2016-09-21 12:56 ` [Qemu-devel] [PATCH v3 12/12] block: Remove BB interface from blockdev-add/del Kevin Wolf
2016-09-21 14:20 ` Eric Blake
2016-09-21 14:48 ` [Qemu-devel] [PATCH v3 00/12] " 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=1474462571-10596-12-git-send-email-kwolf@redhat.com \
--to=kwolf@redhat.com \
--cc=eblake@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).