linux-stable/Documentation/dev-tools/kunit
Maíra Canal 4c392516ac Documentation: KUnit: Fix example with compilation error
The Parameterized Testing example contains a compilation error, as the
signature for the description helper function is void(*)(const struct
sha1_test_case *, char *), and the struct is non-const. This is
warned by Clang:

error: initialization of ‘void (*)(struct sha1_test_case *, char *)’
from incompatible pointer type ‘void (*)(const struct sha1_test_case *,
char *)’ [-Werror=incompatible-pointer-types]
33 | KUNIT_ARRAY_PARAM(sha1, cases, case_to_desc);
   |                                ^~~~~~~~~~~~
../include/kunit/test.h:1339:70: note: in definition of macro
‘KUNIT_ARRAY_PARAM’
1339 |                         void
   (*__get_desc)(typeof(__next), char *) = get_desc; \

Signed-off-by: Maíra Canal <mairacanal@riseup.net>
Reviewed-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2022-07-28 13:06:35 -06:00
..
api kunit: split resource API from test.h into new resource.h 2022-04-04 16:23:08 -06:00
architecture.rst Documentation: kunit: change complete_and_exit to kthread_complete_and_exit 2022-04-22 09:47:25 -06:00
faq.rst Documentation: KUnit: Restyled Frequently Asked Questions 2021-12-23 12:49:43 -07:00
index.rst Documentation: KUnit: Rework writing page to focus on writing tests 2021-12-23 12:49:43 -07:00
kunit-tool.rst kunit: tool: make --raw_output support only showing kunit output 2021-08-13 13:32:01 -06:00
kunit_suitememorydiagram.svg Documentation: KUnit: Added KUnit Architecture 2021-12-23 12:49:06 -07:00
run_manual.rst Documentation: kunit: Reorganize documentation related to running tests 2021-12-23 12:49:43 -07:00
run_wrapper.rst Documentation: kunit: Add CLI args for kunit_tool 2022-07-26 14:48:38 -06:00
running_tips.rst Documentation: kunit: fix example run_kunit func to allow spaces in args 2022-07-11 16:33:51 -06:00
start.rst Documentation: kunit: fix path to .kunitconfig in start.rst 2022-04-04 12:02:44 -06:00
style.rst Documentation: KUnit: Restyle Test Style and Nomenclature page 2021-12-23 12:49:43 -07:00
tips.rst docs: dev-tools: kunit: avoid using ReST :doc:foo markup 2021-06-17 13:24:37 -06:00
usage.rst Documentation: KUnit: Fix example with compilation error 2022-07-28 13:06:35 -06:00