From: "yebin (H)" <yebin10@huawei.com>
To: Ojaswin Mujoo <ojaswin@linux.ibm.com>, Ye Bin <yebin@huaweicloud.com>
Cc: <tytso@mit.edu>, <adilger.kernel@dilger.ca>,
<linux-ext4@vger.kernel.org>, <jack@suse.cz>
Subject: Re: [PATCH v2 0/3] decoupling the ext4 test module
Date: Mon, 16 Mar 2026 09:41:55 +0800 [thread overview]
Message-ID: <69B75FE3.80601@huawei.com> (raw)
In-Reply-To: <abZVUmszFisfOdmz@li-dc0c254c-257c-11b2-a85c-98b6c1322444.ibm.com>
On 2026/3/15 14:44, Ojaswin Mujoo wrote:
> On Sat, Mar 14, 2026 at 03:52:55PM +0800, Ye Bin wrote:
>> From: Ye Bin <yebin10@huawei.com>
>>
>> This patchset is split out from the "Fix some issues about ext4-test"
>> patchset. It decouples mballoc-test.c and extents-test.c from the
>> ext4 module, resolving the issue where these two tests could not be run
>> when EXT4_KUNIT_TESTS is set to M.
>>
>> Ye Bin (3):
>> ext4: introduce EXPORT_SYMBOL_FOR_EXT4_TEST() helper
>> ext4: fix mballoc-test.c is not compiled when EXT4_KUNIT_TESTS=M
>> ext4: fix extents-test.c is not compiled when EXT4_KUNIT_TESTS=M
>
> Hi Ye,
>
> So thinking about this a bit more, is there any reason we are not using
> the VISIBLE_IF_KUNIT and EXPORT_SYMBOL_IF_KUNIT macros directly? Is
> there any case that they don't handle?
>
A limitation of directly using the VISIBLE_IF_KUNIT and
EXPORT_SYMBOL_IF_KUNIT macros is that they rely entirely on the
CONFIG_KUNIT configuration being enabled. However, enabling
CONFIG_KUNIT does not necessarily mean that EXT4_KUNIT_TESTS is
enabled. If EXT4_KUNIT_TESTS is not enabled, there is no need to export
the symbols.
> [1] https://docs.kernel.org/dev-tools/kunit/usage.html#testing-static-functions
>>
>> fs/ext4/Makefile | 5 +-
>> fs/ext4/ext4.h | 5 ++
>> fs/ext4/ext4_extents.h | 12 +++++
>> fs/ext4/extents-test.c | 8 ++--
>> fs/ext4/extents.c | 39 +++++++++++++---
>> fs/ext4/mballoc-test.c | 81 ++++++++++++++++----------------
>> fs/ext4/mballoc.c | 102 +++++++++++++++++++++++++++++++++++++++--
>> fs/ext4/mballoc.h | 30 ++++++++++++
>> 8 files changed, 227 insertions(+), 55 deletions(-)
>>
>> --
>> 2.34.1
>>
>
>
> .
>
next prev parent reply other threads:[~2026-03-16 1:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-14 7:52 [PATCH v2 0/3] decoupling the ext4 test module Ye Bin
2026-03-14 7:52 ` [PATCH v2 1/3] ext4: introduce EXPORT_SYMBOL_FOR_EXT4_TEST() helper Ye Bin
2026-03-14 7:52 ` [PATCH v2 2/3] ext4: fix mballoc-test.c is not compiled when EXT4_KUNIT_TESTS=M Ye Bin
2026-03-14 7:52 ` [PATCH v2 3/3] ext4: fix extents-test.c " Ye Bin
2026-03-15 6:44 ` [PATCH v2 0/3] decoupling the ext4 test module Ojaswin Mujoo
2026-03-16 1:41 ` yebin (H) [this message]
2026-03-18 16:59 ` Jan Kara
2026-03-28 5:31 ` Theodore Ts'o
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=69B75FE3.80601@huawei.com \
--to=yebin10@huawei.com \
--cc=adilger.kernel@dilger.ca \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=ojaswin@linux.ibm.com \
--cc=tytso@mit.edu \
--cc=yebin@huaweicloud.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