diff options
| author | Li Wang <[email protected]> | 2025-04-07 08:42:01 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2025-05-12 00:48:18 +0000 |
| commit | e487a5d513cb6a0faf7e48523416434b111318b3 (patch) | |
| tree | e13c4d3e392b3dc49a7f331e1e339156271a301d /lib/test_xarray.c | |
| parent | mm: page_alloc: tighten up find_suitable_fallback() (diff) | |
| download | kernel-e487a5d513cb6a0faf7e48523416434b111318b3.tar.gz kernel-e487a5d513cb6a0faf7e48523416434b111318b3.zip | |
selftest/mm: make hugetlb_reparenting_test tolerant to async reparenting
In cgroup v2, memory and hugetlb usage reparenting is asynchronous. This
can cause test flakiness when immediately asserting usage after deleting a
child cgroup. To address this, add a helper function
`assert_with_retry()` that checks usage values with a timeout-based retry.
This improves test stability without relying on fixed sleep delays.
Also bump up the tolerance size to 7MB.
To avoid False Positives:
...
# Assert memory charged correctly for child only use.
# actual a = 11 MB
# expected a = 0 MB
# fail
# cleanup
# [FAIL]
not ok 11 hugetlb_reparenting_test.sh -cgroup-v2 # exit=1
# 0
# SUMMARY: PASS=10 SKIP=0 FAIL=1
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Li Wang <[email protected]>
Tested-by: Donet Tom <[email protected]>
Cc: Waiman Long <[email protected]>
Cc: Anshuman Khandual <[email protected]>
Cc: Dev Jain <[email protected]>
Cc: Kirill A. Shuemov <[email protected]>
Cc: Shuah Khan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'lib/test_xarray.c')
0 files changed, 0 insertions, 0 deletions
