aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test-bdrv-drain.c6
-rw-r--r--tests/test-blockjob.c10
2 files changed, 8 insertions, 8 deletions
diff --git a/tests/test-bdrv-drain.c b/tests/test-bdrv-drain.c
index 58ea5663f0..b428aaca68 100644
--- a/tests/test-bdrv-drain.c
+++ b/tests/test-bdrv-drain.c
@@ -514,9 +514,9 @@ static void coroutine_fn test_job_start(void *opaque)
job_defer_to_main_loop(&s->common.job, test_job_completed, NULL);
}
-static void test_job_complete(BlockJob *job, Error **errp)
+static void test_job_complete(Job *job, Error **errp)
{
- TestBlockJob *s = container_of(job, TestBlockJob, common);
+ TestBlockJob *s = container_of(job, TestBlockJob, common.job);
s->should_complete = true;
}
@@ -527,8 +527,8 @@ BlockJobDriver test_job_driver = {
.user_resume = block_job_user_resume,
.drain = block_job_drain,
.start = test_job_start,
+ .complete = test_job_complete,
},
- .complete = test_job_complete,
};
static void test_blockjob_common(enum drain_type drain_type)
diff --git a/tests/test-blockjob.c b/tests/test-blockjob.c
index 592a13613d..e44c608327 100644
--- a/tests/test-blockjob.c
+++ b/tests/test-blockjob.c
@@ -171,9 +171,9 @@ static void cancel_job_completed(Job *job, void *opaque)
block_job_completed(bjob, 0);
}
-static void cancel_job_complete(BlockJob *job, Error **errp)
+static void cancel_job_complete(Job *job, Error **errp)
{
- CancelJob *s = container_of(job, CancelJob, common);
+ CancelJob *s = container_of(job, CancelJob, common.job);
s->should_complete = true;
}
@@ -204,8 +204,8 @@ static const BlockJobDriver test_cancel_driver = {
.user_resume = block_job_user_resume,
.drain = block_job_drain,
.start = cancel_job_start,
+ .complete = cancel_job_complete,
},
- .complete = cancel_job_complete,
};
static CancelJob *create_common(BlockJob **pjob)
@@ -333,7 +333,7 @@ static void test_cancel_pending(void)
block_job_enter(job);
assert(job->job.status == JOB_STATUS_READY);
- block_job_complete(job, &error_abort);
+ job_complete(&job->job, &error_abort);
block_job_enter(job);
while (!s->completed) {
aio_poll(qemu_get_aio_context(), true);
@@ -357,7 +357,7 @@ static void test_cancel_concluded(void)
block_job_enter(job);
assert(job->job.status == JOB_STATUS_READY);
- block_job_complete(job, &error_abort);
+ job_complete(&job->job, &error_abort);
block_job_enter(job);
while (!s->completed) {
aio_poll(qemu_get_aio_context(), true);