[LTP] hugetlb/hugemmap: add hugemmap33 to test hugetlbfs quota accounting
linuxtestproject.agent@gmail.com
linuxtestproject.agent@gmail.com
Sun Aug 9 18:38:36 CEST 2026
Hi Pavithra,
On Sun, 9 Aug 2026, Pavithra wrote:
> hugetlb/hugemmap: add hugemmap33 to test hugetlbfs quota accounting
> if (expected == QUOTA_FAIL &&
> (errno == ENOMEM || errno == ENOSPC)) {
Could these checks require ENOMEM rather than also accepting ENOSPC?
The documented behavior is ENOMEM, and hugetlbfs_file_mmap() deliberately
returns ENOMEM when hugetlb_reserve_pages() rejects the reservation.
Accepting ENOSPC here and in the COW check can hide an errno regression.
> a = mmap(NULL, size, PROT_READ | PROT_WRITE, mmap_flags, fd, 0);
Could this and the second tested mmap() call use TESTPTR() or an appropriate
TST_EXP_* wrapper? Subject syscalls should use the LTP result macros so the
return value and errno are captured consistently.
> char path[PATH_MAX + 32];
Could this use PATH_MAX? LTP path buffers should use PATH_MAX rather than a
custom larger size, and this constructed path is already bounded.
> +/hugetlb/hugemmap/hugemmap33
Could this entry move to
testcases/kernel/mem/hugetlb/hugemmap/.gitignore? New test binaries should be
ignored in their own leaf test directory rather than a parent directory.
Verdict - Needs revision
---
Note:
The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
More information about the ltp
mailing list