|
|
be3800 |
From 127c5a52752f34ac6dbf2e818f036308d94ea81f Mon Sep 17 00:00:00 2001
|
|
|
be3800 |
From: Yu Watanabe <watanabe.yu+github@gmail.com>
|
|
|
be3800 |
Date: Fri, 14 Sep 2018 15:47:42 +0900
|
|
|
be3800 |
Subject: [PATCH] test-execute: skip several tests when running in container
|
|
|
be3800 |
|
|
|
be3800 |
(cherry picked from commit 642d1a6d6e98204ade25816bcc429cb67df92a29)
|
|
|
be3800 |
(cherry picked from commit 3a8ebd888d97c9f83df724264b47475e315d1a20)
|
|
|
be3800 |
|
|
|
be3800 |
Resolves: #1836979
|
|
|
be3800 |
---
|
|
|
be3800 |
src/test/test-execute.c | 12 +++++++++++-
|
|
|
be3800 |
1 file changed, 11 insertions(+), 1 deletion(-)
|
|
|
be3800 |
|
|
|
be3800 |
diff --git a/src/test/test-execute.c b/src/test/test-execute.c
|
|
|
be3800 |
index af64427bc7..637ffe96bb 100644
|
|
|
be3800 |
--- a/src/test/test-execute.c
|
|
|
be3800 |
+++ b/src/test/test-execute.c
|
|
|
be3800 |
@@ -616,14 +616,24 @@ static void test_exec_privatenetwork(Manager *m) {
|
|
|
be3800 |
|
|
|
be3800 |
static void test_exec_oomscoreadjust(Manager *m) {
|
|
|
be3800 |
test(m, "exec-oomscoreadjust-positive.service", 0, CLD_EXITED);
|
|
|
be3800 |
+
|
|
|
be3800 |
+ if (detect_container() > 0) {
|
|
|
be3800 |
+ log_notice("Testing in container, skipping remaining tests in %s", __func__);
|
|
|
be3800 |
+ return;
|
|
|
be3800 |
+ }
|
|
|
be3800 |
test(m, "exec-oomscoreadjust-negative.service", 0, CLD_EXITED);
|
|
|
be3800 |
}
|
|
|
be3800 |
|
|
|
be3800 |
static void test_exec_ioschedulingclass(Manager *m) {
|
|
|
be3800 |
test(m, "exec-ioschedulingclass-none.service", 0, CLD_EXITED);
|
|
|
be3800 |
test(m, "exec-ioschedulingclass-idle.service", 0, CLD_EXITED);
|
|
|
be3800 |
- test(m, "exec-ioschedulingclass-realtime.service", 0, CLD_EXITED);
|
|
|
be3800 |
test(m, "exec-ioschedulingclass-best-effort.service", 0, CLD_EXITED);
|
|
|
be3800 |
+
|
|
|
be3800 |
+ if (detect_container() > 0) {
|
|
|
be3800 |
+ log_notice("Testing in container, skipping remaining tests in %s", __func__);
|
|
|
be3800 |
+ return;
|
|
|
be3800 |
+ }
|
|
|
be3800 |
+ test(m, "exec-ioschedulingclass-realtime.service", 0, CLD_EXITED);
|
|
|
be3800 |
}
|
|
|
be3800 |
|
|
|
be3800 |
static void test_exec_unsetenvironment(Manager *m) {
|