summaryrefslogtreecommitdiffstats
path: root/drivers/firewire/Kconfig
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2023-05-30 01:12:39 +0200
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>2023-05-30 01:12:39 +0200
commitdc7c51638f4660cc6c72b5c8151970341b6d9587 (patch)
tree8f5d519725b8bc68faeaeaeacacf99eaf608f691 /drivers/firewire/Kconfig
parentLinux 6.4-rc3 (diff)
downloadlinux-dc7c51638f4660cc6c72b5c8151970341b6d9587.tar.xz
linux-dc7c51638f4660cc6c72b5c8151970341b6d9587.zip
firewire: add KUnit test to check layout of UAPI structures
In future commits, some new structure will be added to express new type of event. They are exposed to user space as the part of UAPI. It is likely to get trouble in ioctl compatibility layer for 32 bit binaries in 64 bit host machine since the layout of structure could differ depending on System V ABI for these architectures. Actually the subsystem already got such trouble at v2.6.27. It is preferable to decide the layout of structure carefully so that the layer is free from such trouble. This commit utilizes KUnit framework to check the layout of structure for the purpose. A test is added for the existent issue. Cc: kunit-dev@googlegroups.com Link: https://lore.kernel.org/r/20230529113406.986289-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Diffstat (limited to 'drivers/firewire/Kconfig')
-rw-r--r--drivers/firewire/Kconfig16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/firewire/Kconfig b/drivers/firewire/Kconfig
index ec00a6f70da8..0a6596b027db 100644
--- a/drivers/firewire/Kconfig
+++ b/drivers/firewire/Kconfig
@@ -18,6 +18,22 @@ config FIREWIRE
To compile this driver as a module, say M here: the module will be
called firewire-core.
+config FIREWIRE_KUNIT_UAPI_TEST
+ tristate "KUnit tests for layout of structure in UAPI" if !KUNIT_ALL_TESTS
+ depends on FIREWIRE && KUNIT
+ default KUNIT_ALL_TESTS
+ help
+ This builds the KUnit tests whether structures exposed to user
+ space have expected layout.
+
+ 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, refer
+ to the KUnit documentation in Documentation/dev-tools/kunit/.
+
config FIREWIRE_OHCI
tristate "OHCI-1394 controllers"
depends on PCI && FIREWIRE && MMU