summaryrefslogtreecommitdiffstats
path: root/src/oom
diff options
context:
space:
mode:
authorAnita Zhang <the.anitazha@gmail.com>2020-11-12 22:53:20 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-11-17 10:08:32 +0100
commit6ace20b971076b79e1b5c4864720cc072b6d5633 (patch)
treedd18efb0bb72c7c3a4a1a13d4786cd04904c13da /src/oom
parentman: mention that FirewallMark= optionally takes firewall mask (diff)
downloadsystemd-6ace20b971076b79e1b5c4864720cc072b6d5633.tar.xz
systemd-6ace20b971076b79e1b5c4864720cc072b6d5633.zip
test-oomd-util: remove memory_pressure == 0 checks
test_oomd_cgroup_context_acquire_and_insert reads the live cgroup data used by the unit test. Under certain conditions, the memory pressure for the cgroup can be non-zero (although most of the time it is 0 since these tests don't generate much pressure). Since these values are too dependent on the state of the system, remove the checks. The type used is always >= 0 and test-psi-util already unit tests that PSI values are parsed correctly from files so this test is redundant anyways.
Diffstat (limited to 'src/oom')
-rw-r--r--src/oom/test-oomd-util.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/oom/test-oomd-util.c b/src/oom/test-oomd-util.c
index 68c498e2d1..5df57107f9 100644
--- a/src/oom/test-oomd-util.c
+++ b/src/oom/test-oomd-util.c
@@ -104,10 +104,6 @@ static void test_oomd_cgroup_context_acquire_and_insert(void) {
assert_se(oomd_cgroup_context_acquire(cgroup, &ctx) == 0);
assert_se(streq(ctx->path, cgroup));
- assert_se(ctx->memory_pressure.avg10 == 0);
- assert_se(ctx->memory_pressure.avg60 == 0);
- assert_se(ctx->memory_pressure.avg300 == 0);
- assert_se(ctx->memory_pressure.total == 0);
assert_se(ctx->current_memory_usage > 0);
assert_se(ctx->memory_min == 0);
assert_se(ctx->memory_low == 0);