summaryrefslogtreecommitdiff
path: root/src/test/test-engine.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-10-01 14:58:55 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-10-01 15:05:27 +0200
commit28a2dfe8014327a884bef36667c1cf94f547e716 (patch)
tree6a4a9aa55c4b0e1e3c5596d382e037d96b1a51bc /src/test/test-engine.c
parentfa036b61144129a7efffe44b054c1eb639d8603b (diff)
downloadsystemd-28a2dfe8014327a884bef36667c1cf94f547e716.tar.gz
core: add helper function to check job status
Since job.h includes unit.h, and unit.h includes job.h, imports need to be adjusted to make sure unit.h is included first if the helper is used.
Diffstat (limited to 'src/test/test-engine.c')
-rw-r--r--src/test/test-engine.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/test-engine.c b/src/test/test-engine.c
index 633cc42534..1064811497 100644
--- a/src/test/test-engine.c
+++ b/src/test/test-engine.c
@@ -106,9 +106,9 @@ int main(int argc, char *argv[]) {
printf("Test11: (Start/stop job ordering, execution cycle)\n");
assert_se(manager_add_job(m, JOB_START, i, JOB_FAIL, NULL, NULL, &j) == 0);
- assert_se(a->job && a->job->type == JOB_STOP);
- assert_se(d->job && d->job->type == JOB_STOP);
- assert_se(b->job && b->job->type == JOB_START);
+ assert_se(unit_has_job_type(a, JOB_STOP));
+ assert_se(unit_has_job_type(d, JOB_STOP));
+ assert_se(unit_has_job_type(b, JOB_START));
manager_dump_jobs(m, stdout, "\t");
printf("Load6:\n");