Skip to content

Commit d432e88

Browse files
RichardCaoakpm00
authored andcommitted
selftests: mm: skip charge_reserved_hugetlb without killall
charge_reserved_hugetlb.sh tears down background writers with killall from psmisc. Minimal Ubuntu images do not always provide that tool, so the selftest fails in cleanup for an environment reason rather than for the hugetlb behavior it is trying to cover. Skip the test when killall is unavailable, similar to the existing root check, so these environments report the dependency clearly instead of failing the test. Link: https://lore.kernel.org/20260410044139.67480-1-create0818@163.com Signed-off-by: Cao Ruichuang <create0818@163.com> Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org> Cc: David Hildenbrand <david@kernel.org> Cc: "Liam R. Howlett" <Liam.Howlett@oracle.com> Cc: Lorenzo Stoakes <ljs@kernel.org> Cc: Michal Hocko <mhocko@suse.com> Cc: Shuah Khan <shuah@kernel.org> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Vlastimil Babka <vbabka@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 161ce69 commit d432e88

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tools/testing/selftests/mm/charge_reserved_hugetlb.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ if [[ $(id -u) -ne 0 ]]; then
1111
exit $ksft_skip
1212
fi
1313

14+
if ! command -v killall >/dev/null 2>&1; then
15+
echo "killall not available. Skipping..."
16+
exit $ksft_skip
17+
fi
18+
1419
nr_hugepgs=$(cat /proc/sys/vm/nr_hugepages)
1520

1621
fault_limit_file=limit_in_bytes

0 commit comments

Comments
 (0)