summaryrefslogtreecommitdiff
path: root/drivers/firewire/device-attribute-test.c
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2023-12-25 01:23:00 +0300
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>2024-01-08 03:36:56 +0300
commit1770d39d10dd4c7b867e8e9f88d0f23373df3773 (patch)
tree2028fbb9334f006899f254b44b662bce5ab78225 /drivers/firewire/device-attribute-test.c
parentafa36dadd3b3f509ab48eabc1a89f487be6c6af4 (diff)
downloadlinux-1770d39d10dd4c7b867e8e9f88d0f23373df3773.tar.xz
firewire: test: add KUnit test for device attributes
The traverse over CSR space results in attributes of node and unit devices. Any test of the traverse is useful. This commit adds a skeleton of KUnit test for the purpose. Link: https://lore.kernel.org/r/20231221134849.603857-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Diffstat (limited to 'drivers/firewire/device-attribute-test.c')
-rw-r--r--drivers/firewire/device-attribute-test.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/firewire/device-attribute-test.c b/drivers/firewire/device-attribute-test.c
new file mode 100644
index 000000000000..87cfdf97c898
--- /dev/null
+++ b/drivers/firewire/device-attribute-test.c
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0-only
+//
+// device-attribute-test.c - An application of Kunit to test implementation for device attributes.
+//
+// Copyright (c) 2023 Takashi Sakamoto
+//
+// This file can not be built independently since it is intentionally included in core-device.c.
+
+#include <kunit/test.h>
+
+static struct kunit_case device_attr_test_cases[] = {
+ {}
+};
+
+static struct kunit_suite device_attr_test_suite = {
+ .name = "firewire-device-attribute",
+ .test_cases = device_attr_test_cases,
+};
+kunit_test_suite(device_attr_test_suite);