From: Mike Rapoport <rppt@kernel.org>
To: ackerleytng@google.com
Cc: Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@kernel.org>,
Lorenzo Stoakes <ljs@kernel.org>,
"Liam R. Howlett" <liam@infradead.org>,
Vlastimil Babka <vbabka@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>, Shuah Khan <shuah@kernel.org>,
muchun.song@linux.dev, osalvador@suse.de, linux-mm@kvack.org,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC 0/5] Test readback from fd on hugetlbfs mount
Date: Tue, 19 May 2026 08:32:38 +0300 [thread overview]
Message-ID: <agv19uVH0pQztjdP@kernel.org> (raw)
In-Reply-To: <20260518-port-hugetlb-selftests-v1-0-d64ba3a785fe@google.com>
Hi,
On Mon, May 18, 2026 at 11:17:32AM -0700, Ackerley Tng via B4 Relay wrote:
> Hi,
>
> I'm thinking of consolidating the tests for libhugetlbfs as kernel
> selftests, and to start that off, I picked the simplest test:
> tests/readback.c
>
> I refactored hugepage-mmap.c to use the kselftest harness, and then used
I made a lot of changes to mm selftests recently:
https://lore.kernel.org/all/20260511162840.375890-1-rppt@kernel.org/
This work is currently in mm.git, please take a look to avoid effort
duplication.
> FIXTURE_VARIANT from the harness to port in testing readback from an fd on
> a hugetlbfs mount.
I didn't look into the patches, but in general I'm not sure that
FIXTURE_VARIANT is such a win for simple tests.
> This output shows that the original test behavior was retained for the
> memfd part:
>
> # ./hugepage-mmap
> TAP version 13
> 1..1
> # Returned address is 0x7f312f200000
> # First hex is 0
> # First hex is 3020100
> ok 1 Read same data
> # Totals: pass:1 fail:0 xfail:0 xpass:0 skip:0 error:0
>
> # ./hugepage-mmap
> TAP version 13
> 1..1
> # Starting 1 tests from 1 test cases.
> # RUN hugepage_mmap.read_write ...
> # hugepage-mmap.c:41:read_write:Returned address is 0x7f19f3a00000
> # hugepage-mmap.c:54:read_write:First hex is 0
> # hugepage-mmap.c:59:read_write:First hex is 3020100
> # OK hugepage_mmap.read_write
> ok 1 hugepage_mmap.read_write
> # PASSED: 1 / 1 tests passed.
> # Totals: pass:1 fail:0 xfail:0 xpass:0 skip:0 error:0
>
> Let me know what you think before I genericize the 2M hugepage size to
> other sizes!
>
> Signed-off-by: Ackerley Tng <ackerleytng@google.com>
> ---
> Ackerley Tng (5):
> mm: selftests: Inline check_bytes() function into caller
> mm: selftests: Inline {read,write}_bytes functions
> mm: selftests: Refactor hugepage-mmap to use kselftest harness
> mm: selftests: Update hugepage-mmap to support hugetlbfs mount
> mm: selftests: Port readback test logic from libhugetlbfs
>
> tools/testing/selftests/mm/hugepage-mmap.c | 143 +++++++++++++++++++++--------
> 1 file changed, 105 insertions(+), 38 deletions(-)
> ---
> base-commit: 66edb901bf874d9e0787326ba12d3548b2da8700
> change-id: 20260503-port-hugetlb-selftests-9bc63bde5116
>
> Best regards,
> --
> Ackerley Tng <ackerleytng@google.com>
>
>
--
Sincerely yours,
Mike.
next prev parent reply other threads:[~2026-05-19 5:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-18 18:17 [PATCH RFC 0/5] Test readback from fd on hugetlbfs mount Ackerley Tng via B4 Relay
2026-05-18 18:17 ` [PATCH RFC 1/5] mm: selftests: Inline check_bytes() function into caller Ackerley Tng via B4 Relay
2026-05-18 18:17 ` [PATCH RFC 2/5] mm: selftests: Inline {read,write}_bytes functions Ackerley Tng via B4 Relay
2026-05-18 18:17 ` [PATCH RFC 3/5] mm: selftests: Refactor hugepage-mmap to use kselftest harness Ackerley Tng via B4 Relay
2026-05-18 18:17 ` [PATCH RFC 4/5] mm: selftests: Update hugepage-mmap to support hugetlbfs mount Ackerley Tng via B4 Relay
2026-05-18 18:17 ` [PATCH RFC 5/5] mm: selftests: Port readback test logic from libhugetlbfs Ackerley Tng via B4 Relay
2026-05-19 5:32 ` Mike Rapoport [this message]
2026-05-19 13:23 ` [PATCH RFC 0/5] Test readback from fd on hugetlbfs mount tarunsahu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=agv19uVH0pQztjdP@kernel.org \
--to=rppt@kernel.org \
--cc=ackerleytng@google.com \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=muchun.song@linux.dev \
--cc=osalvador@suse.de \
--cc=shuah@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox