linux/tools/testing/selftests/cgroup
Johannes Weiner fac2650276 selftests: cgroup: fix test_kmem_basic false positives
This test fails routinely in our prod testing environment, and I can
reproduce it locally as well.

The test allocates dcache inside a cgroup, then drops the memory limit
and checks that usage drops correspondingly. The reason it fails is
because dentries are freed with an RCU delay - a debugging sleep shows
that usage drops as expected shortly after.

Insert a 1s sleep after dropping the limit. This should be good
enough, assuming that machines running those tests are otherwise not
very busy.

Link: https://lkml.kernel.org/r/20230801135632.1768830-1-hannes@cmpxchg.org
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2023-08-04 13:03:42 -07:00
..
.gitignore kselftest/cgroup: Add cpuset v2 partition root state test 2022-09-04 10:47:28 -10:00
cgroup_util.c selftests: cgroup: fix unsigned comparison with less than zero 2022-11-18 13:55:09 -08:00
cgroup_util.h Yang Shi has improved the behaviour of khugepaged collapsing of readonly 2022-05-26 12:32:41 -07:00
config mm: memcontrol: drop dead CONFIG_MEMCG_SWAP config symbol 2022-10-03 14:03:36 -07:00
Makefile kselftest/cgroup: Add cpuset v2 partition root state test 2022-09-04 10:47:28 -10:00
memcg_protection.m selftests: memcg: adjust expected reclaim values of protected cgroups 2022-05-27 09:33:45 -07:00
test_core.c selftests: cgroup: Test open-time cgroup namespace usage for migration checks 2022-01-06 11:02:29 -10:00
test_cpu.c cgroup: Add test_cpucg_max_nested() testcase 2022-04-25 07:27:31 -10:00
test_cpuset_prs.sh cgroup/cpuset: Minor updates to test_cpuset_prs.sh 2023-03-29 08:42:25 -10:00
test_freezer.c tests/cgroup: move cg_wait_for(), cg_prepare_for_wait() 2021-05-10 10:41:11 -04:00
test_kill.c tests/cgroup: test cgroup.kill 2021-05-10 10:41:11 -04:00
test_kmem.c selftests: cgroup: fix test_kmem_basic false positives 2023-08-04 13:03:42 -07:00
test_memcontrol.c selftests: cgroup: fix unexpected failure on test_memcg_sock 2023-06-23 16:59:26 -07:00
test_stress.sh kseltest/cgroup: Make test_stress.sh work if run interactively 2022-05-13 09:33:21 -10:00
wait_inotify.c kselftest/cgroup: Add cpuset v2 partition root state test 2022-09-04 10:47:28 -10:00
with_stress.sh selftests: cgroup: Run test_core under interfering stress 2019-10-07 07:11:54 -07:00