Skip to content

Commit

Permalink
iotests: Drop deprecated 'props' from object-add
Browse files Browse the repository at this point in the history
Signed-off-by: Alberto Garcia <berto@igalia.com>
Message-Id: <20210222115737.2993-1-berto@igalia.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
  • Loading branch information
bertogg authored and kevmw committed Mar 8, 2021
1 parent 138d293 commit fa818b2
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 29 deletions.
8 changes: 2 additions & 6 deletions tests/qemu-iotests/087
Expand Up @@ -143,9 +143,7 @@ run_qemu <<EOF
"arguments": {
"qom-type": "secret",
"id": "sec0",
"props": {
"data": "123456"
}
"data": "123456"
}
}
{ "execute": "blockdev-add",
Expand Down Expand Up @@ -176,9 +174,7 @@ run_qemu <<EOF
"arguments": {
"qom-type": "secret",
"id": "sec0",
"props": {
"data": "123456"
}
"data": "123456"
}
}
{ "execute": "blockdev-add",
Expand Down
18 changes: 6 additions & 12 deletions tests/qemu-iotests/184
Expand Up @@ -67,10 +67,8 @@ run_qemu <<EOF
"arguments": {
"qom-type": "throttle-group",
"id": "group0",
"props": {
"limits" : {
"iops-total": 1000
}
"limits" : {
"iops-total": 1000
}
}
}
Expand All @@ -96,10 +94,8 @@ run_qemu <<EOF
"arguments": {
"qom-type": "throttle-group",
"id": "group0",
"props" : {
"limits": {
"iops-total": 1000
}
"limits": {
"iops-total": 1000
}
}
}
Expand Down Expand Up @@ -136,10 +132,8 @@ run_qemu <<EOF
"arguments": {
"qom-type": "throttle-group",
"id": "group0",
"props" : {
"limits": {
"iops-total": 1000
}
"limits": {
"iops-total": 1000
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/qemu-iotests/218
Expand Up @@ -152,7 +152,7 @@ with iotests.VM() as vm, \
vm.launch()

ret = vm.qmp('object-add', qom_type='throttle-group', id='tg',
props={'x-bps-read': 4096})
limits={'bps-read': 4096})
assert ret['return'] == {}

ret = vm.qmp('blockdev-add',
Expand Down
2 changes: 1 addition & 1 deletion tests/qemu-iotests/235
Expand Up @@ -57,7 +57,7 @@ vm.add_args('-drive', 'id=src,file=' + disk)
vm.launch()

log(vm.qmp('object-add', qom_type='throttle-group', id='tg0',
props={ 'x-bps-total': size }))
limits={'bps-total': size}))

log(vm.qmp('blockdev-add',
**{ 'node-name': 'target',
Expand Down
4 changes: 2 additions & 2 deletions tests/qemu-iotests/245
Expand Up @@ -644,12 +644,12 @@ class TestBlockdevReopen(iotests.QMPTestCase):
###### throttle ######
######################
opts = { 'qom-type': 'throttle-group', 'id': 'group0',
'props': { 'limits': { 'iops-total': 1000 } } }
'limits': { 'iops-total': 1000 } }
result = self.vm.qmp('object-add', conv_keys = False, **opts)
self.assert_qmp(result, 'return', {})

opts = { 'qom-type': 'throttle-group', 'id': 'group1',
'props': { 'limits': { 'iops-total': 2000 } } }
'limits': { 'iops-total': 2000 } }
result = self.vm.qmp('object-add', conv_keys = False, **opts)
self.assert_qmp(result, 'return', {})

Expand Down
6 changes: 3 additions & 3 deletions tests/qemu-iotests/258
Expand Up @@ -103,9 +103,9 @@ def test_concurrent_finish(write_to_stream_node):
vm.qmp_log('object-add',
qom_type='throttle-group',
id='tg',
props={
'x-iops-write': 1,
'x-iops-write-max': 1
limits={
'iops-write': 1,
'iops-write-max': 1
})

vm.qmp_log('blockdev-add',
Expand Down
4 changes: 2 additions & 2 deletions tests/qemu-iotests/258.out
Expand Up @@ -2,7 +2,7 @@ Running tests:

=== Commit and stream finish concurrently (letting stream write) ===

{"execute": "object-add", "arguments": {"id": "tg", "props": {"x-iops-write": 1, "x-iops-write-max": 1}, "qom-type": "throttle-group"}}
{"execute": "object-add", "arguments": {"id": "tg", "limits": {"iops-write": 1, "iops-write-max": 1}, "qom-type": "throttle-group"}}
{"return": {}}
{"execute": "blockdev-add", "arguments": {"backing": {"backing": {"backing": {"backing": {"driver": "raw", "file": {"driver": "file", "filename": "TEST_DIR/PID-node0.img"}, "node-name": "node0"}, "driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-node1.img"}, "node-name": "node1"}, "driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-node2.img"}, "node-name": "node2"}, "driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-node3.img"}, "node-name": "node3"}, "driver": "IMGFMT", "file": {"driver": "throttle", "file": {"driver": "file", "filename": "TEST_DIR/PID-node4.img"}, "throttle-group": "tg"}, "node-name": "node4"}}
{"return": {}}
Expand All @@ -18,7 +18,7 @@ Running tests:

=== Commit and stream finish concurrently (letting commit write) ===

{"execute": "object-add", "arguments": {"id": "tg", "props": {"x-iops-write": 1, "x-iops-write-max": 1}, "qom-type": "throttle-group"}}
{"execute": "object-add", "arguments": {"id": "tg", "limits": {"iops-write": 1, "iops-write-max": 1}, "qom-type": "throttle-group"}}
{"return": {}}
{"execute": "blockdev-add", "arguments": {"backing": {"backing": {"backing": {"backing": {"driver": "raw", "file": {"driver": "throttle", "file": {"driver": "file", "filename": "TEST_DIR/PID-node0.img"}, "throttle-group": "tg"}, "node-name": "node0"}, "driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-node1.img"}, "node-name": "node1"}, "driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-node2.img"}, "node-name": "node2"}, "driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-node3.img"}, "node-name": "node3"}, "driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-node4.img"}, "node-name": "node4"}}
{"return": {}}
Expand Down
2 changes: 1 addition & 1 deletion tests/qemu-iotests/295
Expand Up @@ -43,7 +43,7 @@ class Secret:

def to_qmp_object(self):
return { "qom_type" : "secret", "id": self.id(),
"props": { "data": self.secret() } }
"data": self.secret() }

################################################################################
class EncryptionSetupTestCase(iotests.QMPTestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/qemu-iotests/296
Expand Up @@ -43,7 +43,7 @@ class Secret:

def to_qmp_object(self):
return { "qom_type" : "secret", "id": self.id(),
"props": { "data": self.secret() } }
"data": self.secret() }

################################################################################

Expand Down

0 comments on commit fa818b2

Please sign in to comment.