]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
oomd: add unit test to repro #18926
authorAnita Zhang <the.anitazha@gmail.com>
Mon, 8 Mar 2021 18:51:12 +0000 (10:51 -0800)
committerAnita Zhang <the.anitazha@gmail.com>
Mon, 8 Mar 2021 22:36:24 +0000 (14:36 -0800)
src/oom/test-oomd-util.c

index a0e583ac6b377aae038cfce71a1033a3b192ff7d..0b1a3adfccf6bdeff8b1412b664f5c7e45ce10d8 100644 (file)
@@ -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;