summaryrefslogtreecommitdiffstats
path: root/drivers/thunderbolt/Makefile
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2020-04-29 15:38:39 +0200
committerMika Westerberg <mika.westerberg@linux.intel.com>2020-06-22 18:58:20 +0200
commit54509f5005caccd8459c9084535802feeb27bb2c (patch)
treeebb7830b61191f64ecf0ffeac7653dda22bd2e85 /drivers/thunderbolt/Makefile
parentthunderbolt: Increase path length in discovery (diff)
downloadlinux-54509f5005caccd8459c9084535802feeb27bb2c.tar.xz
linux-54509f5005caccd8459c9084535802feeb27bb2c.zip
thunderbolt: Add KUnit tests for path walking
This adds KUnit tests for path walking which is only dependent on software structures, so no hardware is needed to run these. We make these available only when both KUnit and the driver itself are built into the kernel image. The reason for this is that KUnit adds its own module_init() call in kunit_test_suite() which generates linker error because the driver does the same in nhi.c. This should be fine for now because these tests are only meant to run by developers anyway. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/Makefile')
-rw-r--r--drivers/thunderbolt/Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/thunderbolt/Makefile b/drivers/thunderbolt/Makefile
index eae28dd45250..68f7a19690d8 100644
--- a/drivers/thunderbolt/Makefile
+++ b/drivers/thunderbolt/Makefile
@@ -2,3 +2,5 @@
obj-${CONFIG_USB4} := thunderbolt.o
thunderbolt-objs := nhi.o nhi_ops.o ctl.o tb.o switch.o cap.o path.o tunnel.o eeprom.o
thunderbolt-objs += domain.o dma_port.o icm.o property.o xdomain.o lc.o tmu.o usb4.o
+
+obj-${CONFIG_USB4_KUNIT_TEST} += test.o