|
|
923a60 |
From a1c4eecf9a334e5841744cabdc18bdfdc108a636 Mon Sep 17 00:00:00 2001
|
|
|
923a60 |
From: Lukas Nykryn <lnykryn@redhat.com>
|
|
|
923a60 |
Date: Fri, 21 Apr 2017 15:44:25 +0200
|
|
|
923a60 |
Subject: [PATCH] tests: set tasks_max to infinity
|
|
|
923a60 |
|
|
|
923a60 |
rhel-only
|
|
|
923a60 |
(upstream does the same but the code there is quite different)
|
|
|
923a60 |
|
|
|
923a60 |
Related: #1337244
|
|
|
923a60 |
---
|
|
|
923a60 |
src/test/test-cgroup-mask.c | 11 +++++++++++
|
|
|
923a60 |
src/test/test-execute.c | 5 +++++
|
|
|
923a60 |
2 files changed, 16 insertions(+)
|
|
|
923a60 |
|
|
|
923a60 |
diff --git a/src/test/test-cgroup-mask.c b/src/test/test-cgroup-mask.c
|
|
|
923a60 |
index 9e9de23e0e..471adb25ba 100644
|
|
|
923a60 |
--- a/src/test/test-cgroup-mask.c
|
|
|
923a60 |
+++ b/src/test/test-cgroup-mask.c
|
|
|
923a60 |
@@ -45,6 +45,17 @@ static int test_cgroup_mask(void) {
|
|
|
923a60 |
puts("manager_new: Permission denied. Skipping test.");
|
|
|
923a60 |
return EXIT_TEST_SKIP;
|
|
|
923a60 |
}
|
|
|
923a60 |
+ assert_se(r >= 0);
|
|
|
923a60 |
+
|
|
|
923a60 |
+ /* Turn off all kinds of default accouning, so that we can
|
|
|
923a60 |
+ * verify the masks resulting of our configuration and nothing
|
|
|
923a60 |
+ * else. */
|
|
|
923a60 |
+ m->default_cpu_accounting =
|
|
|
923a60 |
+ m->default_memory_accounting =
|
|
|
923a60 |
+ m->default_blockio_accounting =
|
|
|
923a60 |
+ m->default_tasks_accounting = false;
|
|
|
923a60 |
+ m->default_tasks_max = (uint64_t) -1;
|
|
|
923a60 |
+
|
|
|
923a60 |
assert_se(r >= 0);
|
|
|
923a60 |
assert_se(manager_startup(m, serial, fdset) >= 0);
|
|
|
923a60 |
|
|
|
923a60 |
diff --git a/src/test/test-execute.c b/src/test/test-execute.c
|
|
|
923a60 |
index 8e70702cbb..627097fcf2 100644
|
|
|
923a60 |
--- a/src/test/test-execute.c
|
|
|
923a60 |
+++ b/src/test/test-execute.c
|
|
|
923a60 |
@@ -270,6 +270,11 @@ int main(int argc, char *argv[]) {
|
|
|
923a60 |
}
|
|
|
923a60 |
assert_se(r >= 0);
|
|
|
923a60 |
assert_se(manager_startup(m, NULL, NULL) >= 0);
|
|
|
923a60 |
+ m->default_cpu_accounting =
|
|
|
923a60 |
+ m->default_memory_accounting =
|
|
|
923a60 |
+ m->default_blockio_accounting =
|
|
|
923a60 |
+ m->default_tasks_accounting = false;
|
|
|
923a60 |
+ m->default_tasks_max = (uint64_t) -1;
|
|
|
923a60 |
|
|
|
923a60 |
for (test = tests; test && *test; test++)
|
|
|
923a60 |
(*test)(m);
|