aboutsummaryrefslogtreecommitdiff
path: root/tests/test-blockjob-txn.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-blockjob-txn.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-blockjob-txn.c')
-rw-r--r--tests/test-blockjob-txn.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/test-blockjob-txn.c b/tests/test-blockjob-txn.c
index 6ee31d59ad..34ee179574 100644
--- a/tests/test-blockjob-txn.c
+++ b/tests/test-blockjob-txn.c
@@ -34,7 +34,7 @@ static void test_block_job_complete(Job *job, void *opaque)
rc = -ECANCELED;
}
- block_job_completed(bjob, rc);
+ job_completed(job, rc);
bdrv_unref(bs);
}
@@ -130,7 +130,7 @@ static void test_single_job(int expected)
job_start(&job->job);
if (expected == -ECANCELED) {
- block_job_cancel(job, false);
+ job_cancel(&job->job, false);
}
while (result == -EINPROGRESS) {
@@ -176,10 +176,10 @@ static void test_pair_jobs(int expected1, int expected2)
job_txn_unref(txn);
if (expected1 == -ECANCELED) {
- block_job_cancel(job1, false);
+ job_cancel(&job1->job, false);
}
if (expected2 == -ECANCELED) {
- block_job_cancel(job2, false);
+ job_cancel(&job2->job, false);
}
while (result1 == -EINPROGRESS || result2 == -EINPROGRESS) {
@@ -232,13 +232,13 @@ static void test_pair_jobs_fail_cancel_race(void)
job_start(&job1->job);
job_start(&job2->job);
- block_job_cancel(job1, false);
+ job_cancel(&job1->job, false);
/* Now make job2 finish before the main loop kicks jobs. This simulates
* the race between a pending kick and another job completing.
*/
- block_job_enter(job2);
- block_job_enter(job2);
+ job_enter(&job2->job);
+ job_enter(&job2->job);
while (result1 == -EINPROGRESS || result2 == -EINPROGRESS) {
aio_poll(qemu_get_aio_context(), true);