aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2018-04-18 17:10:26 +0200
committerKevin Wolf <kwolf@redhat.com>2018-05-23 14:30:50 +0200
commitb15de82867975e0b4acf644b5ee36d84904b6612 (patch)
tree7d2052b01d9021df82c698827b795149bbd2f0a4 /tests
parent5d43e86e11f488fda7956b13160e0c0105a84845 (diff)
downloadqemu-b15de82867975e0b4acf644b5ee36d84904b6612.zip
qemu-b15de82867975e0b4acf644b5ee36d84904b6612.tar.gz
qemu-b15de82867975e0b4acf644b5ee36d84904b6612.tar.bz2
job: Move pause/resume functions to Job
While we already moved the state related to job pausing to Job, the functions to do were still BlockJob only. This commit moves them over to Job. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/test-bdrv-drain.c1
-rw-r--r--tests/test-blockjob-txn.c1
-rw-r--r--tests/test-blockjob.c6
3 files changed, 6 insertions, 2 deletions
diff --git a/tests/test-bdrv-drain.c b/tests/test-bdrv-drain.c
index 50232f5..c993512 100644
--- a/tests/test-bdrv-drain.c
+++ b/tests/test-bdrv-drain.c
@@ -524,6 +524,7 @@ BlockJobDriver test_job_driver = {
.job_driver = {
.instance_size = sizeof(TestBlockJob),
.free = block_job_free,
+ .user_resume = block_job_user_resume,
.start = test_job_start,
},
.complete = test_job_complete,
diff --git a/tests/test-blockjob-txn.c b/tests/test-blockjob-txn.c
index 0e6162b..93d1ff0 100644
--- a/tests/test-blockjob-txn.c
+++ b/tests/test-blockjob-txn.c
@@ -78,6 +78,7 @@ static const BlockJobDriver test_block_job_driver = {
.job_driver = {
.instance_size = sizeof(TestBlockJob),
.free = block_job_free,
+ .user_resume = block_job_user_resume,
.start = test_block_job_run,
},
};
diff --git a/tests/test-blockjob.c b/tests/test-blockjob.c
index b329bd5..ceb5960 100644
--- a/tests/test-blockjob.c
+++ b/tests/test-blockjob.c
@@ -20,6 +20,7 @@ static const BlockJobDriver test_block_job_driver = {
.job_driver = {
.instance_size = sizeof(BlockJob),
.free = block_job_free,
+ .user_resume = block_job_user_resume,
},
};
@@ -199,6 +200,7 @@ static const BlockJobDriver test_cancel_driver = {
.job_driver = {
.instance_size = sizeof(CancelJob),
.free = block_job_free,
+ .user_resume = block_job_user_resume,
.start = cancel_job_start,
},
.complete = cancel_job_complete,
@@ -270,7 +272,7 @@ static void test_cancel_paused(void)
job_start(&job->job);
assert(job->job.status == JOB_STATUS_RUNNING);
- block_job_user_pause(job, &error_abort);
+ job_user_pause(&job->job, &error_abort);
block_job_enter(job);
assert(job->job.status == JOB_STATUS_PAUSED);
@@ -308,7 +310,7 @@ static void test_cancel_standby(void)
block_job_enter(job);
assert(job->job.status == JOB_STATUS_READY);
- block_job_user_pause(job, &error_abort);
+ job_user_pause(&job->job, &error_abort);
block_job_enter(job);
assert(job->job.status == JOB_STATUS_STANDBY);