Skip to content
Commit fadb08e7 authored by Arpitha Raghunandan's avatar Arpitha Raghunandan Committed by Shuah Khan
Browse files

kunit: Support for Parameterized Testing



Implementation of support for parameterized testing in KUnit. This
approach requires the creation of a test case using the
KUNIT_CASE_PARAM() macro that accepts a generator function as input.

This generator function should return the next parameter given the
previous parameter in parameterized tests. It also provides a macro to
generate common-case generators based on arrays. Generators may also
optionally provide a human-readable description of parameters, which is
displayed where available.

Note, currently the result of each parameter run is displayed in
diagnostic lines, and only the overall test case output summarizes
TAP-compliant success or failure of all parameter runs. In future, when
supported by kunit-tool, these can be turned into subsubtest outputs.

Signed-off-by: default avatarArpitha Raghunandan <98.arpi@gmail.com>
Co-developed-by: default avatarMarco Elver <elver@google.com>
Signed-off-by: default avatarMarco Elver <elver@google.com>
Reviewed-by: default avatarDavid Gow <davidgow@google.com>
Tested-by: default avatarDavid Gow <davidgow@google.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent 0c7a7e1a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment