diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-05-26 14:29:29 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-05-26 14:29:30 +0100 |
commit | 2c56d06bafd8933d2a9c6e0aeb5d45f7c1fb5616 (patch) | |
tree | 0afd4cd98a38271bf76f02aee87f0ddfb5a0d0bd /tests | |
parent | a62c89117fa19adc6f9242844468ac31ec535d7e (diff) | |
parent | b75536c9fa742f887304769d0608557bb8e3a27f (diff) |
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block layer patches
# gpg: Signature made Wed 25 May 2016 18:32:40 BST using RSA key ID C88F2FD6
# gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"
* remotes/kevin/tags/for-upstream: (31 commits)
blockjob: Remove BlockJob.bs
commit: Use BlockBackend for I/O
backup: Use BlockBackend for I/O
backup: Remove bs parameter from backup_do_cow()
backup: Pack Notifier within BackupBlockJob
backup: Don't leak BackupBlockJob in error path
mirror: Use BlockBackend for I/O
mirror: Allow target that already has a BlockBackend
stream: Use BlockBackend for I/O
block: Make blk_co_preadv/pwritev() public
block: Convert block job core to BlockBackend
block: Default to enabled write cache in blk_new()
block: Cancel jobs first in bdrv_close_all()
block: keep a list of block jobs
block: Rename blk_write_zeroes()
dma-helpers: change BlockBackend to opaque value in DMAIOFunc
dma-helpers: change interface to byte-based
block: Propagate .drained_begin/end callbacks
block: Fix reconfiguring graph with drained nodes
block: Make bdrv_drain() use bdrv_drained_begin/end()
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/qemu-iotests/041 | 27 | ||||
-rw-r--r-- | tests/qemu-iotests/041.out | 4 | ||||
-rw-r--r-- | tests/test-blockjob-txn.c | 3 | ||||
-rw-r--r-- | tests/test-throttle.c | 6 |
4 files changed, 7 insertions, 33 deletions
diff --git a/tests/qemu-iotests/041 b/tests/qemu-iotests/041 index b1c542f99b..ed1d9d464c 100755 --- a/tests/qemu-iotests/041 +++ b/tests/qemu-iotests/041 @@ -207,33 +207,6 @@ class TestSingleBlockdev(TestSingleDrive): test_image_not_found = None test_small_buffer2 = None -class TestBlockdevAttached(iotests.QMPTestCase): - image_len = 1 * 1024 * 1024 # MB - - def setUp(self): - iotests.create_image(backing_img, self.image_len) - qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=%s' % backing_img, test_img) - qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=%s' % backing_img, target_img) - self.vm = iotests.VM().add_drive(test_img) - self.vm.launch() - - def tearDown(self): - self.vm.shutdown() - os.remove(test_img) - os.remove(target_img) - - def test_blockdev_attached(self): - self.assert_no_active_block_jobs() - args = {'options': - {'driver': iotests.imgfmt, - 'id': 'drive1', - 'file': { 'filename': target_img, 'driver': 'file' } } } - result = self.vm.qmp("blockdev-add", **args) - self.assert_qmp(result, 'return', {}) - result = self.vm.qmp('blockdev-mirror', device='drive0', sync='full', - target='drive1') - self.assert_qmp(result, 'error/class', 'GenericError') - class TestSingleDriveZeroLength(TestSingleDrive): image_len = 0 test_small_buffer2 = None diff --git a/tests/qemu-iotests/041.out b/tests/qemu-iotests/041.out index b67d0504a6..b0cadc8245 100644 --- a/tests/qemu-iotests/041.out +++ b/tests/qemu-iotests/041.out @@ -1,5 +1,5 @@ -............................................................................ +........................................................................... ---------------------------------------------------------------------- -Ran 76 tests +Ran 75 tests OK diff --git a/tests/test-blockjob-txn.c b/tests/test-blockjob-txn.c index 55fad9507a..828389bb45 100644 --- a/tests/test-blockjob-txn.c +++ b/tests/test-blockjob-txn.c @@ -15,6 +15,7 @@ #include "qapi/error.h" #include "qemu/main-loop.h" #include "block/blockjob.h" +#include "sysemu/block-backend.h" typedef struct { BlockJob common; @@ -30,7 +31,7 @@ static const BlockJobDriver test_block_job_driver = { static void test_block_job_complete(BlockJob *job, void *opaque) { - BlockDriverState *bs = job->bs; + BlockDriverState *bs = blk_bs(job->blk); int rc = (intptr_t)opaque; if (block_job_is_cancelled(job)) { diff --git a/tests/test-throttle.c b/tests/test-throttle.c index 5ec966c8a4..c02be805f7 100644 --- a/tests/test-throttle.c +++ b/tests/test-throttle.c @@ -578,9 +578,9 @@ static void test_groups(void) BlockBackend *blk1, *blk2, *blk3; BlockBackendPublic *blkp1, *blkp2, *blkp3; - blk1 = blk_new_with_bs(&error_abort); - blk2 = blk_new_with_bs(&error_abort); - blk3 = blk_new_with_bs(&error_abort); + blk1 = blk_new(); + blk2 = blk_new(); + blk3 = blk_new(); blkp1 = blk_get_public(blk1); blkp2 = blk_get_public(blk2); |