hugetlb/hugemmap: add hugemmap33 to test hugetlbfs quota accounting
PATCH v8 1/1 hugetlb/hugemmap: add hugemmap33 to test hugetlbfs quota accounting
Test hugetlbfs quota accounting with filesystem size limits to check for regressions in quota handling for MAP_PRIVATE and MAP_SHARED pages.
---
v7 -> v8:
- use TST_EXP_PASS_PTR_VOID/TST_EXP_FAIL_PTR_VOID instead of open-coded TESTPTR checks Link to v7: https://lore.kernel.org/ltp/[email protected]/
--- runtest/hugetlb | 1 + testcases/kernel/mem/.gitignore | 1 + .../kernel/mem/hugetlb/hugemmap/hugemmap33.c | 222 ++++++++++++++++++ 3 files changed, 224 insertions(+) create mode 100644 testcases/kernel/mem/hugetlb/hugemmap/hugemmap33.c
runtest/hugetlb +1 -0
@@ -35,6 +35,7 @@ hugemmap29 hugemmap29 hugemmap30 hugemmap30 hugemmap31 hugemmap31 hugemmap32 hugemmap32 +hugemmap33 hugemmap33 hugemmap34 hugemmap34 hugemmap35 hugemmap35 hugemmap36 hugemmap36
testcases/kernel/mem/.gitignore +1 -0
@@ -35,6 +35,7 @@ /hugetlb/hugemmap/hugemmap30 /hugetlb/hugemmap/hugemmap31 /hugetlb/hugemmap/hugemmap32 +/hugetlb/hugemmap/hugemmap33 /hugetlb/hugemmap/hugemmap34 /hugetlb/hugemmap/hugemmap35 /hugetlb/hugemmap/hugemmap36
testcases/kernel/mem/hugetlb/hugemmap/hugemmap33.c new file +222 -0
222 lines not on this page · raw message
Signature · 5 lines
2.55.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Pavithra,
Quoted 6 lines · Pavithra
hugetlb/hugemmap: add hugemmap33 to test hugetlbfs quota accounting
TST_EXP_FAIL_PTR_VOID(mmap(NULL, size, PROT_READ | PROT_WRITE, mmap_flags, fd, 0), ENOMEM, "mmap over quota"); if (!TST_PASS) SAFE_MUNMAP(TST_RET_PTR, size);
An unexpected errno also leaves TST_PASS false but TST_RET_PTR equal to MAP_FAILED, so SAFE_MUNMAP() reports TBROK and obscures the original failure. Only unmap a successful mapping; the same pattern below needs the same fix.
Quoted 1 line
{"linux-git", "a1e78772d72b"},Use the full commit ID:a1e78772d72b2616ed20e54896e68e0e7044854e.
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
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp