From: wang lian <lianux.mm@gmail.com>
To: richard.weiyang@gmail.com
Cc: akpm@linux-foundation.org, baolin.wang@linux.alibaba.com,
david@redhat.com, donettom@linux.ibm.com,
linux-kselftest@vger.kernel.org, linux-mm@kvack.org,
ryan.roberts@arm.com, ziy@nvidia.com,
wang lian <lianux.mm@gmail.com>
Subject: Re: [PATCH] selftests/mm: refactore split_huge_page_test with kselftest_harness
Date: Fri, 5 Sep 2025 17:10:29 +0800 [thread overview]
Message-ID: <20250905091029.81259-1-lianux.mm@gmail.com> (raw)
In-Reply-To: <20250905032431.22179-1-richard.weiyang@gmail.com>
> Refactor split_huge_page_test with kselftest_harness, since there is a
> magic counting about valid tests.
> The idea is simple:
> For standalone test, put it into TEST().
> For tests iterating order/offset, define fixture and variant with
> order and offset. And skip it if order/offset is not valid.
> No functional change is expected.
Sounds good.
> -static void split_pmd_zero_pages(void)
> +TEST(split_pmd_zero_pages)
> {
> char *one_page;
> int nr_hpages = 4;
> size_t len = nr_hpages * pmd_pagesize;
nr_hpages and len appeared many times and
david use nr_thps and thp_area_size rename it.
and maybe we can unify it and make it into FIXTURE and init.
> + prepare_proc_fd();
> +
> one_page = allocate_zero_filled_hugepage(len);
> verify_rss_anon_split_huge_page_all_zeroes(one_page, nr_hpages, len);
> - ksft_test_result_pass("Split zero filled huge pages successful\n");
> free(one_page);
> +
> + cleanup_proc_fd();
> }
Best regards,
wang lian
next prev parent reply other threads:[~2025-09-05 9:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-05 3:24 Wei Yang
2025-09-05 9:10 ` wang lian [this message]
2025-09-05 13:43 ` Wei Yang
2025-09-05 11:33 ` Donet Tom
2025-09-05 13:39 ` Wei Yang
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=20250905091029.81259-1-lianux.mm@gmail.com \
--to=lianux.mm@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=david@redhat.com \
--cc=donettom@linux.ibm.com \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=richard.weiyang@gmail.com \
--cc=ryan.roberts@arm.com \
--cc=ziy@nvidia.com \
/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