diff options
author | Thomas Huth | 2019-07-23 21:22:39 +0200 |
---|---|---|
committer | Thomas Huth | 2019-08-15 19:24:10 +0200 |
commit | 6fc9f3d347aee337421f8afc4d0984294f8ea6c3 (patch) | |
tree | cc551dfcc927f02a95c9666d26c87caeded1c4f0 /tests/virtio-scsi-test.c | |
parent | tests/libqtest: Make qtest_qmp_device_add/del independent from global_qtest (diff) | |
download | qemu-6fc9f3d347aee337421f8afc4d0984294f8ea6c3.tar.gz qemu-6fc9f3d347aee337421f8afc4d0984294f8ea6c3.tar.xz qemu-6fc9f3d347aee337421f8afc4d0984294f8ea6c3.zip |
tests/libqtest: Make qmp_assert_success() independent from global_qtest
The normal libqtest library functions should never depend on global_qtest.
Pass in the test state via parameter instead. And while we're at it,
also rename this function to qtest_qmp_assert_success() to make it clear
that it is part of libqtest.
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20190813093047.27948-7-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/virtio-scsi-test.c')
-rw-r--r-- | tests/virtio-scsi-test.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/virtio-scsi-test.c b/tests/virtio-scsi-test.c index 16481491e3..09348765d7 100644 --- a/tests/virtio-scsi-test.c +++ b/tests/virtio-scsi-test.c @@ -225,10 +225,12 @@ static void test_iothread_attach_node(void *obj, void *data, mkqcow2(tmp_path, 64); /* Attach the overlay to the null0 node */ - qmp_assert_success("{'execute': 'blockdev-add', 'arguments': {" - " 'driver': 'qcow2', 'node-name': 'overlay'," - " 'backing': 'null0', 'file': {" - " 'driver': 'file', 'filename': %s}}}", tmp_path); + qtest_qmp_assert_success(scsi_pci->pci_vdev.pdev->bus->qts, + "{'execute': 'blockdev-add', 'arguments': {" + " 'driver': 'qcow2', 'node-name': 'overlay'," + " 'backing': 'null0', 'file': {" + " 'driver': 'file', 'filename': %s}}}", + tmp_path); /* Send a request to see if the AioContext is still right */ ret = virtio_scsi_do_command(vs, write_cdb, NULL, 0, buf, 512, NULL); |