kunit: use kmemdup in kunit_filter_tests(), take suite as const
authorDaniel Latypov <dlatypov@google.com>
Mon, 16 May 2022 16:54:46 +0000 (09:54 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Thu, 7 Jul 2022 23:42:53 +0000 (17:42 -0600)
commitd2fbdde838f270377de4fc20e919aac3941ea55f
tree08946cb6a013c300f1ba0ef5aeae7aba5feaede5
parent671007281de93c721c1ea2d4af603d211b0a7e1f
kunit: use kmemdup in kunit_filter_tests(), take suite as const

kmemdup() is easier than kmalloc() + memcpy(), per lkp bot.

Also make the input `suite` as const since we're now always making
copies after commit a127b154a8f2 ("kunit: tool: allow filtering test
cases via glob").

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
lib/kunit/executor.c