]> git.ipfire.org Git - thirdparty/systemd.git/commit
test-oomd-util: remove memory_pressure == 0 checks
authorAnita Zhang <the.anitazha@gmail.com>
Thu, 12 Nov 2020 21:53:20 +0000 (13:53 -0800)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 17 Nov 2020 09:08:32 +0000 (10:08 +0100)
commit6ace20b971076b79e1b5c4864720cc072b6d5633
treedd18efb0bb72c7c3a4a1a13d4786cd04904c13da
parentcbdc9062886eef7a9aa355689429c6e19332a72e
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.
src/oom/test-oomd-util.c