Skip to contentSkip to conversation

Migrating the libhugetlbfs/testcases/quota.c - v2

PATCH In review Pavithra 3 participants 3 messages Apr 4 – Jul 2

lore
Share & tools
lore

Pavithra

author
#0 lore raw

PATCH 1/1 Migrating the libhugetlbfs/testcases/quota.c - v2

Test hugetlbfs quota accounting with filesystem size limits to check for regressions in quota handling for MAP_PRIVATE and MAP_SHARED pages.

---
 runtest/hugetlb                               |   1 +
 testcases/kernel/mem/.gitignore               |   1 +
 .../kernel/mem/hugetlb/hugemmap/hugemmap33.c  | 273 ++++++++++++++++++
 3 files changed, 275 insertions(+)
 create mode 100644 testcases/kernel/mem/hugetlb/hugemmap/hugemmap33.c
runtest/hugetlb +1 -0
index 0896d3c94..24fa717ec 100644
@@ -35,6 +35,7 @@ hugemmap29 hugemmap29
 hugemmap30 hugemmap30
 hugemmap31 hugemmap31
 hugemmap32 hugemmap32
+hugemmap33 hugemmap33
 hugemmap34 hugemmap34
 hugemmap05_1 hugemmap05 -m
 hugemmap05_2 hugemmap05 -s
testcases/kernel/mem/.gitignore +1 -0
index b4455de51..7f1bcd4e7 100644
@@ -35,6 +35,7 @@
 /hugetlb/hugemmap/hugemmap30
 /hugetlb/hugemmap/hugemmap31
 /hugetlb/hugemmap/hugemmap32
+/hugetlb/hugemmap/hugemmap33
 /hugetlb/hugemmap/hugemmap34
 /hugetlb/hugeshmat/hugeshmat01
 /hugetlb/hugeshmat/hugeshmat02
testcases/kernel/mem/hugetlb/hugemmap/hugemmap33.c new file +273 -0

273 lines not on this page · raw message

Signature · 5 lines
2.53.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#1 lore raw

Hi Pavithra,

Quoted 3 lines · Pavithra

Migrating the libhugetlbfs/testcases/quota.c - v2

Migrating the libhugetlbfs/testcases/quota.c - v2

The "- v2" suffix is a patch-revision marker that must be stripped from the final commit subject before merging.

The subject should also follow the LTP convention of naming the subsystem and what is being added, for example:

hugetlb/hugemmap: add hugemmap33 to test hugetlbfs quota accounting

Quoted 4 lines

+/*\
+ * Test hugetlbfs quota accounting with filesystem size limits.
+ *
+ * The number of global huge pages available to a mounted hugetlbfs

Quoted 8 lines

+ * filesystem can be limited using a quota mechanism by setting the
+ * size attribute at mount time. Older kernels did not properly handle
+ * quota accounting in a number of cases (e.g., for MAP_PRIVATE pages,
+ * and with MAP_SHARED reservation).
+ *
+ * This test replays some scenarios on a privately mounted filesystem
+ * with quota to check for regressions in hugetlbfs quota accounting.
+ */

Ground Rule 4 requires that when a test sets .needs_root = 1, the reason must be stated in the doc comment. The test mounts a second hugetlbfs instance with a quota limit in setup(), which requires CAP_SYS_ADMIN, but the description block is silent on this.

A sentence like the following should be added:

Root is required to mount the quota-limited hugetlbfs instance.

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
#2 lore raw
In reply to Pavithra

Hi Pavithra,

I run the agent to all hugelibs patches to catch the most obvious errors. I reviewed them and they seem positive, so feel free to send a new version following the indications.

Please, don't append the version of the patch in the commit message subject. All git commits have a specific section for it, after the SOB and '---'

Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
[email protected]

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp