Re: [PATCH v2 2/2] ksmbd: add KUnit tests for the DACL declared-size boundary

ChenXiaoSong <[email protected]>
Newsgroups org.kernel.vger.linux-cifs,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Thanks for your patches. So far, I have found the following two areas 
that could be improved. I will finish the review as soon as possible.

On 8/12/26 18:39, Hang Nan wrote:

> diff --git a/fs/smb/server/Kconfig b/fs/smb/server/Kconfig
> index 08d8b7a965a6..05d16052b9a7 100644
> --- a/fs/smb/server/Kconfig
> +++ b/fs/smb/server/Kconfig
> +config SMB_SERVER_KUNIT_TEST
> +	tristate "KUnit tests for SMB3 server helpers" if !KUNIT_ALL_TESTS
> +	depends on SMB_SERVER && KUNIT && SHMEM
> +	default KUNIT_ALL_TESTS
> +


It would be better to use `SMB_KUNIT_TESTS` directly. We do not need to 
add a new config.


> diff --git a/fs/smb/server/Makefile b/fs/smb/server/Makefile
> index a3e9306055e8..dff9d3cd43bd 100644
> --- a/fs/smb/server/Makefile
> +++ b/fs/smb/server/Makefile
> +ksmbd-$(CONFIG_SMB_SERVER_KUNIT_TEST) += smbacl_kunit_test.o


obj-$(CONFIG_SMB_KUNIT_TESTS) += smbacl_kunit_test.o

The kunit tests should be built as a separate .ko instead of being 
linked into ksmbd.ko.

-- 
ChenXiaoSong <[email protected]>
Chinese Homepage: https://chenxiaosong.com
English Homepage: https://chenxiaosong.com/en
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.