aboutsummaryrefslogtreecommitdiff
path: root/tests/test-bdrv-drain.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2018-04-24 16:13:52 +0200
committerKevin Wolf <kwolf@redhat.com>2018-05-23 14:30:51 +0200
commit3d70ff53b6bf90d9eec6f97024ec9895f6799d9e (patch)
tree947adf7d4422c78235ff4b8f2a31fac0085efc9a /tests/test-bdrv-drain.c
parent7eaa8fb57da96301f4a8ce176ad503f80efc7cc0 (diff)
job: Move completion and cancellation to Job
This moves the top-level job completion and cancellation functions from BlockJob to Job. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/test-bdrv-drain.c')
-rw-r--r--tests/test-bdrv-drain.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/test-bdrv-drain.c b/tests/test-bdrv-drain.c
index b428aaca68..3600ffd3fb 100644
--- a/tests/test-bdrv-drain.c
+++ b/tests/test-bdrv-drain.c
@@ -498,8 +498,7 @@ typedef struct TestBlockJob {
static void test_job_completed(Job *job, void *opaque)
{
- BlockJob *bjob = container_of(job, BlockJob, job);
- block_job_completed(bjob, 0);
+ job_completed(job, 0);
}
static void coroutine_fn test_job_start(void *opaque)
@@ -593,7 +592,7 @@ static void test_blockjob_common(enum drain_type drain_type)
g_assert_false(job->job.paused);
g_assert_false(job->job.busy); /* We're in job_sleep_ns() */
- ret = block_job_complete_sync(job, &error_abort);
+ ret = job_complete_sync(&job->job, &error_abort);
g_assert_cmpint(ret, ==, 0);
blk_unref(blk_src);