summaryrefslogtreecommitdiffstats
path: root/src/test/test-execute.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-09-14 08:47:42 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-09-20 17:45:00 +0200
commit642d1a6d6e98204ade25816bcc429cb67df92a29 (patch)
treebe95107af1af10a20eb9954a113f53239043b8e5 /src/test/test-execute.c
parenttest-execute: also check python3 is installed or not (diff)
downloadsystemd-642d1a6d6e98204ade25816bcc429cb67df92a29.tar.xz
systemd-642d1a6d6e98204ade25816bcc429cb67df92a29.zip
test-execute: skip several tests when running in container
Diffstat (limited to 'src/test/test-execute.c')
-rw-r--r--src/test/test-execute.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/test/test-execute.c b/src/test/test-execute.c
index 80b60d0317..ade02b1e3c 100644
--- a/src/test/test-execute.c
+++ b/src/test/test-execute.c
@@ -640,14 +640,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) {