aboutsummaryrefslogtreecommitdiff
path: root/lib/cmdline_kunit.c
AgeCommit message (Collapse)AuthorFilesLines
2021-06-23lib/cmdline_kunit: Remove a cast which are no-longer requiredDavid Gow1-1/+1
With some of the stricter type checking in KUnit's EXPECT macros removed, a cast in cmdline_kunit is no longer required. Remove the unnecessary cast, using NULL instead of (int *) to make it clearer. Signed-off-by: David Gow <[email protected]> Acked-by: Andy Shevchenko <[email protected]> Reviewed-by: Brendan Higgins <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
2021-02-15lib/cmdline: Allow get_options() to take 0 to validate the inputAndy Shevchenko1-1/+10
Allow get_options() to take 0 as a number of integers parameter to validate the input. Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]>
2021-02-15lib/cmdline_kunit: add a new test case for get_options()Andy Shevchenko1-0/+47
Add a test case for get_options() which is provided by cmdline.c. Signed-off-by: Andy Shevchenko <[email protected]>
2020-12-15lib/cmdline_kunit: add a new test suite for cmdline APIAndy Shevchenko1-0/+100
Test get_option() for a starter which is provided by cmdline.c. [[email protected]: fix warning by constifying cmdline_test_values] [[email protected]: type of expected returned values should be int] Link: https://lkml.kernel.org/r/[email protected] [[email protected]: provide meaningful MODULE_LICENSE()] Link: https://lkml.kernel.org/r/[email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Andy Shevchenko <[email protected]> Cc: Shuah Khan <[email protected]> Cc: Vitor Massaru Iha <[email protected]> Cc: Mark Brown <[email protected]> Cc: Brendan Higgins <[email protected]> Cc: David Gow <[email protected]> Cc: Matti Vaittinen <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>