mirror-linux/tools/testing/selftests
Guopeng Zhang 50133c09d1 selftests: cgroup: Replace sleep with cg_read_key_long_poll() for waiting on nr_dying_descendants
Replace the manual sleep-and-retry logic in test_kmem_dead_cgroups()
with the new helper `cg_read_key_long_poll()`. This change improves
the robustness of the test by polling the "nr_dying_descendants"
counter in `cgroup.stat` until it reaches 0 or the timeout is exceeded.

Additionally, increase the retry timeout to 8 seconds (from 5 seconds)
based on testing results:
  - With 5-second timeout: 4/20 runs passed.
  - With 8-second timeout: 20/20 runs passed.

The 8 second timeout is based on stress testing of test_kmem_dead_cgroups()
under load: 5 seconds was occasionally not enough for reclaim of dying
descendants to complete, whereas 8 seconds consistently covered the observed
latencies. This value is intended as a generous upper bound for the
asynchronous reclaim and is not tied to any specific kernel constant, so it
can be adjusted in the future if reclaim behavior changes.

Signed-off-by: Guopeng Zhang <zhangguopeng@kylinos.cn>
Reviewed-by: Shakeel Butt <shakeel.butt@linux.dev>
Acked-by: Michal Koutný <mkoutny@suse.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2025-12-08 08:44:54 -10:00
..
acct selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
alsa Significant patch series in this pull request: 2025-12-06 14:01:20 -08:00
amd-pstate
arm64 Significant patch series in this pull request: 2025-12-06 14:01:20 -08:00
bpf Significant patch series in this pull request: 2025-12-06 14:01:20 -08:00
breakpoints selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
cachestat selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
capabilities selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
cgroup selftests: cgroup: Replace sleep with cg_read_key_long_poll() for waiting on nr_dying_descendants 2025-12-08 08:44:54 -10:00
clone3 selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
connector selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
core selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
coredump Significant patch series in this pull request: 2025-12-06 14:01:20 -08:00
cpu-hotplug
cpufreq
damon selftests/damon/sysfs.py: merge DAMON status dumping into commitment assertion 2025-11-20 13:44:01 -08:00
devices
dmabuf-heaps selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
drivers Significant patch series in this pull request: 2025-12-06 14:01:20 -08:00
dt
efivarfs
exec selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
fchmodat2 selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
filelock selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
filesystems Significant patch series in this pull request: 2025-12-06 14:01:20 -08:00
firmware
fpu
ftrace Runtime verifier updates for v6.19: 2025-12-05 10:17:00 -08:00
futex selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
gpio
hid Significant patch series in this pull request: 2025-12-06 14:01:20 -08:00
ia64
intel_pstate selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
iommu Significant patch series in this pull request: 2025-12-06 14:01:20 -08:00
ipc selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
ir selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
kcmp selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
kexec
kho kho: make debugfs interface optional 2025-11-27 14:24:31 -08:00
kmod
kselftest selftests/run_kselftest.sh: exit with error if tests fail 2025-11-19 15:00:22 -07:00
kselftest_harness selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
kvm ARM: 2025-12-05 17:01:20 -08:00
landlock Significant patch series in this pull request: 2025-12-06 14:01:20 -08:00
lib
livepatch
liveupdate selftests/liveupdate: add kexec test for multiple and empty sessions 2025-11-27 14:24:42 -08:00
lkdtm
locking
lsm selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
media_tests selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
membarrier selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
memfd
memory-hotplug
mincore selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
mm Significant patch series in this pull request: 2025-12-06 14:01:20 -08:00
module
mount
mount_setattr selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
move_mount_set_group selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
mqueue selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
mseal_system_mappings selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
namespaces Significant patch series in this pull request: 2025-12-06 14:01:20 -08:00
nci selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
net Significant patch series in this pull request: 2025-12-06 14:01:20 -08:00
nolibc nolibc changes for v6.19 2025-12-03 09:23:25 -08:00
ntb
openat2 selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
pci_endpoint selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
pcie_bwctrl
perf_events selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
pid_namespace selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
pidfd Significant patch series in this pull request: 2025-12-06 14:01:20 -08:00
power_supply
powerpc
prctl selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
proc selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
pstore
ptp
ptrace selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
rcutorture Merge branch 'rcu/misc' into next 2025-11-30 22:20:33 +01:00
resctrl selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
ring-buffer selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
riscv Significant patch series in this pull request: 2025-12-06 14:01:20 -08:00
rlimits
rseq Significant patch series in this pull request: 2025-12-06 14:01:20 -08:00
rtc selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
rust
safesetid
sched
sched_ext
seccomp selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
sgx selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
signal selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
size
sparc64 selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
splice
static_keys
sync selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
syscall_user_dispatch selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
sysctl
tc-testing selftests/tc-testing: Test CAKE scheduler when enqueue drops packets 2025-12-02 13:28:00 +01:00
tdx selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
thermal/intel
timens selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
timers Significant patch series in this pull request: 2025-12-06 14:01:20 -08:00
tmpfs selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
tpm2 selftests: tpm2: Fix ill defined assertions 2025-12-03 22:55:27 +02:00
tty TTY/Serial changes for 6.19-rc1 2025-12-06 18:38:19 -08:00
turbostat
ublk
uevent selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
user_events selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
vDSO Significant patch series in this pull request: 2025-12-06 14:01:20 -08:00
verification selftests/verification: Add initial RV tests 2025-11-11 13:18:55 +01:00
vfio Significant patch series in this pull request: 2025-12-06 14:01:20 -08:00
vsock selftests/vsock: disable shellcheck SC2317 and SC2119 2025-11-12 06:19:40 -08:00
watchdog
wireguard hung_task: panic when there are more than N hung tasks at the same time 2025-11-12 10:00:14 -08:00
x86 Significant patch series in this pull request: 2025-12-06 14:01:20 -08:00
zram
.gitignore
Makefile selftests/liveupdate: add userspace API selftests 2025-11-27 14:24:41 -08:00
gen_kselftest_tar.sh
kselftest.h
kselftest_deps.sh
kselftest_harness.h selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
kselftest_install.sh
kselftest_module.h
lib.mk selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
run_kselftest.sh selftests/run_kselftest.sh: exit with error if tests fail 2025-11-19 15:00:22 -07:00