Skip to content

Commit

Permalink
test-execute: skip several tests when running in container
Browse files Browse the repository at this point in the history
(cherry picked from commit 642d1a6)

Resolves: #1823767
  • Loading branch information
yuwata authored and mrc0mmand committed Apr 14, 2020
1 parent 6750925 commit 3a8ebd8
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/test/test-execute.c
Original file line number Diff line number Diff line change
Expand Up @@ -616,14 +616,24 @@ static void test_exec_privatenetwork(Manager *m) {

static void test_exec_oomscoreadjust(Manager *m) {
test(m, "exec-oomscoreadjust-positive.service", 0, CLD_EXITED);

if (detect_container() > 0) {
log_notice("Testing in container, skipping remaining tests in %s", __func__);
return;
}
test(m, "exec-oomscoreadjust-negative.service", 0, CLD_EXITED);
}

static void test_exec_ioschedulingclass(Manager *m) {
test(m, "exec-ioschedulingclass-none.service", 0, CLD_EXITED);
test(m, "exec-ioschedulingclass-idle.service", 0, CLD_EXITED);
test(m, "exec-ioschedulingclass-realtime.service", 0, CLD_EXITED);
test(m, "exec-ioschedulingclass-best-effort.service", 0, CLD_EXITED);

if (detect_container() > 0) {
log_notice("Testing in container, skipping remaining tests in %s", __func__);
return;
}
test(m, "exec-ioschedulingclass-realtime.service", 0, CLD_EXITED);
}

static void test_exec_unsetenvironment(Manager *m) {
Expand Down

0 comments on commit 3a8ebd8

Please sign in to comment.