Files
linux/fs/smb/Kconfig
ChenXiaoSong 480afcb19b smb/client: introduce KUnit test to check search result of smb2_error_map_table
The KUnit test are executed when cifs.ko is loaded.

Just like `fs/ext4/mballoc.c` includes `fs/ext4/mballoc-test.c`.
`smb2maperror.c` also includes `smb2maperror_test.c`, allowing KUnit
tests to access any functions and variables in `smb2maperror.c`.

The maperror_test_check_search() checks whether all elements can be
correctly found in the array.

Suggested-by: David Howells <dhowells@redhat.com>
Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Signed-off-by: Steve French <stfrench@microsoft.com>
2026-02-08 21:24:41 -06:00

29 lines
785 B
Plaintext

# SPDX-License-Identifier: GPL-2.0-only
#
# smbfs configuration
source "fs/smb/client/Kconfig"
source "fs/smb/server/Kconfig"
config SMBFS
tristate
default y if CIFS=y || SMB_SERVER=y
default m if CIFS=m || SMB_SERVER=m
config SMB_KUNIT_TESTS
tristate "KUnit tests for SMB" if !KUNIT_ALL_TESTS
depends on SMBFS && KUNIT
default KUNIT_ALL_TESTS
help
This builds the SMB KUnit tests.
KUnit tests run during boot and output the results to the debug log
in TAP format (https://testanything.org/). Only useful for kernel devs
running KUnit test harness and are not for inclusion into a production
build.
For more information on KUnit and unit tests in general please refer
to the KUnit documentation in Documentation/dev-tools/kunit/.
If unsure, say N.