Commit graph

6 commits

Author SHA1 Message Date
Mika Westerberg
5adab6cc45 thunderbolt: Add KUnit tests for DMA tunnels
Add a couple of tests to check DMA tunneling functionality.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2021-03-18 18:25:32 +03:00
Mika Westerberg
15a4c7e8f9 thunderbolt: Add KUnit tests for XDomain properties
This adds KUnit tests for parsing, formatting and copying of XDomain
properties.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2021-03-18 18:25:32 +03:00
Mika Westerberg
2c6ea4e2ce thunderbolt: Allow KUnit tests to be built also when CONFIG_USB4=m
This adds a bit more build coverage for the tests even though these are
not expected to be enabled by normal users and distros. In order to make
this working we need to open-code kunit_test_suite() and call the
relevant functions directly in the driver init/exit hook.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2020-09-16 14:57:46 +03:00
Stephen Rothwell
71fa1a4489 thunderbolt: merge fix for kunix_resource changes
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-08-09 11:06:10 -07:00
Mika Westerberg
40c14d9f4f thunderbolt: Add KUnit tests for tunneling
We can test some parts of tunneling, like path allocation without access
to test hardware so add KUnit tests for PCIe, DP and USB3 tunneling.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2020-06-22 19:58:20 +03:00
Mika Westerberg
54509f5005 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>
2020-06-22 19:58:20 +03:00