2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-05 03:44:03 +08:00
linux-next/drivers/virt/nitro_enclaves
David Gow fe5be808fa nitro_enclaves: test: Use kunit_test_suite() macro
The kunit_test_suite() macro previously conflicted with module_init,
making it unsuitable for use in the nitro_enclaves test. Now that it's
fixed, we can use it instead of a custom call into internal KUnit
functions to run the test.

As a side-effect, this means that the test results are properly included
with other suites when built-in. To celebrate, enable the test by
default when KUNIT_ALL_TESTS is set (and NITRO_ENCLAVES enabled).

The nitro_enclave tests can now be run via kunit_tool with:
	./tools/testing/kunit/kunit.py run --arch=x86_64 \
	--kconfig_add CONFIG_PCI=y --kconfig_add CONFIG_SMP=y \
	--kconfig_add CONFIG_HOTPLUG_CPU=y \
	--kconfig_add CONFIG_VIRT_DRIVERS=y \
	--kconfig_add CONFIG_NITRO_ENCLAVES=y \
	'ne_misc_dev_test'

(This is a pretty long command, so it may be worth adding a .kunitconfig
file at some point, instead.)

Reviewed-by: Andra Paraschiv <andraprs@amazon.com>
Acked-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: David Gow <davidgow@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2022-07-11 17:13:27 -06:00
..
Kconfig nitro_enclaves: test: Use kunit_test_suite() macro 2022-07-11 17:13:27 -06:00
Makefile nitro_enclaves: Add Makefile for the Nitro Enclaves driver 2020-09-22 13:58:41 +02:00
ne_misc_dev_test.c nitro_enclaves: test: Use kunit_test_suite() macro 2022-07-11 17:13:27 -06:00
ne_misc_dev.c nitro_enclaves: test: Use kunit_test_suite() macro 2022-07-11 17:13:27 -06:00
ne_misc_dev.h
ne_pci_dev.c nitro_enclaves: Remove redundant 'flush_workqueue()' calls 2021-11-17 16:10:26 +01:00
ne_pci_dev.h nitro_enclaves: Add fix for the kernel-doc report 2021-09-14 11:11:20 +02:00