From: Anita Zhang Date: Mon, 8 Mar 2021 18:51:12 +0000 (-0800) Subject: oomd: add unit test to repro #18926 X-Git-Tag: v248-rc3~23^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=399d80ba8c604d57e7df6c5118ea3258cce026d9;p=thirdparty%2Fsystemd.git oomd: add unit test to repro #18926 --- diff --git a/src/oom/test-oomd-util.c b/src/oom/test-oomd-util.c index a0e583ac6b3..0b1a3adfccf 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;