summaryrefslogtreecommitdiff
path: root/src/oom
diff options
context:
space:
mode:
authorAnita Zhang <the.anitazha@gmail.com>2021-03-08 10:51:12 -0800
committerAnita Zhang <the.anitazha@gmail.com>2021-03-08 14:36:24 -0800
commit399d80ba8c604d57e7df6c5118ea3258cce026d9 (patch)
treeae6570bdaff272d0ab706a3c8c43d2177f328fcb /src/oom
parent79d5f00ad1e45e465a4674f01175a82d489dd6a1 (diff)
downloadsystemd-399d80ba8c604d57e7df6c5118ea3258cce026d9.tar.gz
oomd: add unit test to repro #18926
Diffstat (limited to 'src/oom')
-rw-r--r--src/oom/test-oomd-util.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/oom/test-oomd-util.c b/src/oom/test-oomd-util.c
index a0e583ac6b..0b1a3adfcc 100644
--- a/src/oom/test-oomd-util.c
+++ b/src/oom/test-oomd-util.c
@@ -150,6 +150,7 @@ static void test_oomd_cgroup_context_acquire_and_insert(void) {
assert_se(oomd_insert_cgroup_context(NULL, h1, cgroup) == 0);
c1 = hashmap_get(h1, cgroup);
assert_se(c1);
+ assert_se(oomd_insert_cgroup_context(NULL, h1, cgroup) == -EEXIST);
/* make sure certain values from h1 get updated in h2 */
c1->pgscan = 5555;