This patch enables the test runner to print the names of test functions in the kernel when running tests.
At time of writing, doing this either involves extremely cursed unsafe rust to figure out the function pointer address followed by a symbol lookup, or using a proc macro. Which is also arguably cursed, but it is at least all safe and stable rust.
Anyway, to annotate a function as a test function, use the kernel_test attribute from the twizzler-kernel-macros crate that is now compiled into the kernel.
This attribute adds static const item containing a function pointer that will run the test and the name of the test as given by the programmer.
This patch enables the test runner to print the names of test functions in the kernel when running tests.
At time of writing, doing this either involves extremely cursed unsafe rust to figure out the function pointer address followed by a symbol lookup, or using a proc macro. Which is also arguably cursed, but it is at least all safe and stable rust.
Anyway, to annotate a function as a test function, use the kernel_test attribute from the twizzler-kernel-macros crate that is now compiled into the kernel.
This attribute adds static const item containing a function pointer that will run the test and the name of the test as given by the programmer.