summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-09-14 15:47:42 +0900
committerThe Plumber <50238977+systemd-rhel-bot@users.noreply.github.com>2020-05-18 19:35:19 +0200
commit127c5a52752f34ac6dbf2e818f036308d94ea81f (patch)
tree1e3e426c7bbc658380ec071496d644bb368781cc
parent464a88eeb63c0e733633c7d8eef3a48f68b8440e (diff)
downloadsystemd-127c5a52752f34ac6dbf2e818f036308d94ea81f.tar.gz
test-execute: skip several tests when running in container
(cherry picked from commit 642d1a6d6e98204ade25816bcc429cb67df92a29) (cherry picked from commit 3a8ebd888d97c9f83df724264b47475e315d1a20) Resolves: #1836979
-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 af64427bc7..637ffe96bb 100644
--- a/src/test/test-execute.c
+++ b/src/test/test-execute.c
@@ -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) {