Skip to contentSkip to conversation

hugemmap/hugemmap41: Migrate ptrace-write-hugepage from libhugetlbfs

PATCH In review Pavithra 2 participants 2 messages Aug 9

lore
Share & tools
lore

Pavithra

author
#0 lore raw

PATCH 1/1 hugemmap/hugemmap41: Migrate ptrace-write-hugepage from libhugetlbfs

This test verifies that ptrace POKEDATA and PEEKDATA operations work correctly on hugepage-backed memory regions. Migrating it to LTP as libhugetlbfs is not actively maintained.

---
v6 -> v7:
- Add spaces around '|' in SAFE_MMAP() flags argument
- Remove unconditional TPASS; TST_EXP_EQ_LU() reports its own result
- Remove incorrect linux-git tag (ebed4bfc8da8 is unrelated to this test) link to v6: https://lore.kernel.org/ltp/[email protected]/

---
 runtest/hugetlb                               |   1 +
 testcases/kernel/mem/.gitignore               |   1 +
 .../kernel/mem/hugetlb/hugemmap/hugemmap41.c  | 130 ++++++++++++++++++
 3 files changed, 132 insertions(+)
 create mode 100644 testcases/kernel/mem/hugetlb/hugemmap/hugemmap41.c
runtest/hugetlb +1 -0
index 6b35c1f42..621c9718a 100644
@@ -40,6 +40,7 @@ hugemmap35 hugemmap35
 hugemmap36 hugemmap36
 hugemmap37 hugemmap37
 hugemmap38 hugemmap38
+hugemmap41 hugemmap41
 hugemmap05_1 hugemmap05 -m
 hugemmap05_2 hugemmap05 -s
 hugemmap05_3 hugemmap05 -s -m
testcases/kernel/mem/.gitignore +1 -0
index e63a6dde7..9e706e1c8 100644
@@ -40,6 +40,7 @@
 /hugetlb/hugemmap/hugemmap36
 /hugetlb/hugemmap/hugemmap37
 /hugetlb/hugemmap/hugemmap38
+/hugetlb/hugemmap/hugemmap41
 /hugetlb/hugeshmat/hugeshmat01
 /hugetlb/hugeshmat/hugeshmat02
 /hugetlb/hugeshmat/hugeshmat03
testcases/kernel/mem/hugetlb/hugemmap/hugemmap41.c new file +130 -0

130 lines not on this page · raw message

Signature · 5 lines
2.55.0


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

Hi Pavithra,

testcases/kernel/mem/hugetlb/hugemmap/hugemmap41.c line 61

Quoted 4 lines · Pavithra

hugemmap/hugemmap41: Migrate ptrace-write-hugepage from libhugetlbfs

testcases/kernel/mem/hugetlb/hugemmap/hugemmap41.c new file +2 -0
+	tst_res(TINFO, "Poking at %p...", p);
+	SAFE_PTRACE(PTRACE_POKEDATA, pid, p, (void *)CONST);

Could this call use TEST() or a suitable TST_EXP_* check and report failure as TFAIL? PTRACE_POKEDATA is an operation under test, but SAFE_PTRACE() converts a kernel regression here into TBROK.

Quoted 1 line

+/hugetlb/hugemmap/hugemmap41

Could this entry instead be added as /hugemmap41 in testcases/kernel/mem/hugetlb/hugemmap/.gitignore? LTP keeps generated test binary entries in the leaf test directory so they move or disappear with that 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

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