[LTP] hugemmap35: Migrating libhugetlbfs test v6 truncate_reserve_wraparound.c

linuxtestproject.agent@gmail.com linuxtestproject.agent@gmail.com
Thu Jul 2 14:42:01 CEST 2026


Hi Pavithra,

On Sat Apr 4 22:46:14 2026 +0530, Pavithra wrote:
> hugemmap35: Migrating libhugetlbfs test v6 truncate_reserve_wraparound.c

The "v6" in the subject looks like a series revision tag left over from
git-send-email. The libhugetlbfs source file has no "v6" in its name
(the Origin URL confirms this). Please strip it before resubmitting.

Suggested subject:
  "hugemmap35: migrate libhugetlbfs test truncate_reserve_wraparound.c"

> +/*
> + * Origin: https://github.com/libhugetlbfs/libhugetlbfs/blob/master/tests/truncate_reserve_wraparound.c
> + *
> + * Test that hugepage reservation accounting is correctly maintained when
> + * truncating a hugetlbfs file. This verifies that reserved hugepages are
> + * properly tracked through the complete lifecycle
> + */

The description block must open with `/*\` (backslash after the opening
`/*`) to be recognised as RST content and exported to the test catalog.
A plain `/* */` comment is not rendered there.

The `Origin:` URL is also inside what should be the RST doc block. It
belongs in a separate plain `/* */` comment before the `/*\ ... */`
block, or can simply be omitted (the commit message and .tags already
record the provenance).

Rule 4 also requires documenting why root is needed. Hugetlbfs has to
be mounted by root, so a sentence to that effect belongs in the block.

Suggested restructure:

    /*
     * Origin: https://github.com/libhugetlbfs/libhugetlbfs/blob/...
     */

    /*\
     * Test that hugepage reservation accounting is correctly maintained
     * when truncating a hugetlbfs file. This verifies that reserved
     * hugepages are properly tracked through the sequence of: mmap
     * (reserves page), touch (instantiates page), truncate (releases
     * page), and attempted access (triggers SIGBUS). A bug in i_size
     * handling could cause the reservation count to become incorrect,
     * leading to resource leaks or allocation failures.
     *
     * Requires root to mount hugetlbfs.
     */

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