]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
smb/client: introduce KUnit test to check ntstatus_to_dos_map search
authorYouling Tang <tangyouling@kylinos.cn>
Thu, 2 Apr 2026 14:18:33 +0000 (14:18 +0000)
committerSteve French <stfrench@microsoft.com>
Mon, 6 Apr 2026 00:58:40 +0000 (19:58 -0500)
commite3ac6352a84d9ddc39a5772796032a852033ed92
tree1d8a300faf895cc413b33e15e216aa3cc7955fec
parent010ad1e895dbe269ab4f97b3e5245deefcc6205f
smb/client: introduce KUnit test to check ntstatus_to_dos_map search

Check whether all elements can be correctly found in the array.

Introduce CONFIG_SMB1_KUNIT_TESTS for smb1maperror_test.ko since
smb1maperror.o is only built when CONFIG_CIFS_ALLOW_INSECURE_LEGACY
is enabled.

We are going to define 3 functions to check the search results, introduce
the macro DEFINE_CHECK_SEARCH_FUNC() to reduce duplicate code.

Signed-off-by: Youling Tang <tangyouling@kylinos.cn>
Reviewed-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/Kconfig
fs/smb/client/Makefile
fs/smb/client/smb1maperror.c
fs/smb/client/smb1maperror_test.c [new file with mode: 0644]
fs/smb/client/smb1proto.h