mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tarunsahu@google.com
To: Ackerley Tng <ackerleytng@google.com>,
	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>,
	Mike Rapoport <rppt@kernel.org>,
	 Suren Baghdasaryan <surenb@google.com>,
	Michal Hocko <mhocko@suse.com>, Shuah Khan <shuah@kernel.org>,
	 muchun.song@linux.dev, osalvador@suse.de
Cc: linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
	 linux-kernel@vger.kernel.org,
	Ackerley Tng <ackerleytng@google.com>
Subject: Re: [PATCH RFC 0/5] Test readback from fd on hugetlbfs mount
Date: Tue, 19 May 2026 13:23:38 +0000	[thread overview]
Message-ID: <9huzse7nfs85.fsf@tarunix.c.googlers.com> (raw)
In-Reply-To: <20260518-port-hugetlb-selftests-v1-0-d64ba3a785fe@google.com>


If you are planning to port all the libhugetlbfs tests to kselftests
I had similar efforts done in past for LTP here:
https://github.com/linux-test-project/ltp/commits/master/?author=tar-unix

These tests were migrated to LTP from libhugetlbfs.

Just want to make sure if we completely want to itegrate in kselftests
or LTP fulfil that purpose.

OR Only tests that are not part of LTP should be ported to kselftests.

Thanks

Ackerley Tng <ackerleytng@google.com> writes:

> 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
> FIXTURE_VARIANT from the harness to port in testing readback from an fd on
> a hugetlbfs mount.
>
> 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>

      parent reply	other threads:[~2026-05-19 13:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-18 18:17 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 ` [PATCH RFC 0/5] Test readback from fd on hugetlbfs mount Mike Rapoport
2026-05-19 13:23 ` tarunsahu [this message]

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=9huzse7nfs85.fsf@tarunix.c.googlers.com \
    --to=tarunsahu@google.com \
    --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=rppt@kernel.org \
    --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

all inboxes | Powered by JetHome®