Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: ChenXiaoSong <chenxiaosong.chenxiaosong@linux.dev>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: bharathsm@microsoft.com, chenxiaosong@kylinos.cn,
	dhowells@redhat.com, linkinjeon@kernel.org,
	Brendan Higgins <brendan.higgins@linux.dev>,
	David Gow <davidgow@google.com>, Rae Moar <raemoar63@gmail.com>,
	linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com,
	linux-cifs@vger.kernel.org, pc@manguebit.org,
	ronniesahlberg@gmail.com, senozhatsky@chromium.org,
	smfrench@gmail.com, sprasad@microsoft.com, tom@talpey.com
Subject: Re: [PATCH v9 1/1] smb/client: introduce KUnit test to check search result of smb2_error_map_table
Date: Tue, 10 Feb 2026 17:53:07 +0800	[thread overview]
Message-ID: <5c4bbbea-d68c-4089-b3aa-adb4b05696ba@linux.dev> (raw)
In-Reply-To: <20260210081040.4156383-1-geert@linux-m68k.org>

Hi Geert,

Thank you for reviewing this patch.

The KUnit test cases are only executed when the CONFIG_SMB_KUNIT_TESTS 
is enabled.

Making it a separate test module would require exporting local variables 
and functions so that the test code can access them. However, exporting 
local variables and functions would likely make the code much uglier, as 
it would require adding "#if" conditionals into the production code to 
isolate the test code.

Geert, please let me know if you have a better idea.

I am also discussing this with the ext4 community, and we all hope to 
find a way to make the tests a separate module.

Thanks,
ChenXiaoSong <chenxiaosong@kylinos.cn>

On 2/10/26 4:10 PM, Geert Uytterhoeven wrote:
>   	Hi ChenXiaoSong,
> 
> Thanks for your patch, which is now commit 480afcb19b61385d
> ("smb/client: introduce KUnit test to check search result of
> smb2_error_map_table") in linus/master
> 
>> The KUnit test are executed when cifs.ko is loaded.
> This means the tests are_always_ executed when cifs.ko is loaded,
> which is different from how most other test modules work.
> Please make it a separate test module, so it can be loaded independently
> of the main cifs module.  That way people can enable all tests in
> production kernels, without affecting the system unless a test module
> is actually loaded.


  reply	other threads:[~2026-02-10  9:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260118091313.1988168-1-chenxiaosong.chenxiaosong@linux.dev>
2026-02-10  8:10 ` [PATCH v9 1/1] smb/client: introduce KUnit test to check search result of smb2_error_map_table Geert Uytterhoeven
2026-02-10  9:53   ` ChenXiaoSong [this message]
2026-02-10 10:38     ` Geert Uytterhoeven
2026-02-10 11:03       ` ChenXiaoSong

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=5c4bbbea-d68c-4089-b3aa-adb4b05696ba@linux.dev \
    --to=chenxiaosong.chenxiaosong@linux.dev \
    --cc=bharathsm@microsoft.com \
    --cc=brendan.higgins@linux.dev \
    --cc=chenxiaosong@kylinos.cn \
    --cc=davidgow@google.com \
    --cc=dhowells@redhat.com \
    --cc=geert@linux-m68k.org \
    --cc=kunit-dev@googlegroups.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=pc@manguebit.org \
    --cc=raemoar63@gmail.com \
    --cc=ronniesahlberg@gmail.com \
    --cc=senozhatsky@chromium.org \
    --cc=smfrench@gmail.com \
    --cc=sprasad@microsoft.com \
    --cc=tom@talpey.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