kunit: add parameter generation macro using description from array
authorBenjamin Berg <benjamin.berg@intel.com>
Wed, 20 Dec 2023 15:19:47 +0000 (16:19 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 3 Jan 2024 14:35:04 +0000 (15:35 +0100)
commit292010ee509443a1383bb079a4fa80515aa89a7f
tree4185e49ceb3c01c4df61d6688ada2ed66ac427d5
parenta5bb4e1a3748e650e664e9d44feb30daa9851945
kunit: add parameter generation macro using description from array

The existing KUNIT_ARRAY_PARAM macro requires a separate function to
get the description. However, in a lot of cases the description can
just be copied directly from the array. Add a second macro that
avoids having to write a static function just for a single strscpy.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Reviewed-by: David Gow <davidgow@google.com>
Link: https://msgid.link/20231220151952.415232-2-benjamin@sipsolutions.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Documentation/dev-tools/kunit/usage.rst
include/kunit/test.h