]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
test: firmware_class: add asynchronous request trigger
authorBrian Norris <computersforpeace@gmail.com>
Wed, 9 Dec 2015 22:50:27 +0000 (14:50 -0800)
committerShuah Khan <shuahkh@osg.samsung.com>
Thu, 7 Jan 2016 20:44:22 +0000 (13:44 -0700)
commiteb910947c82f93cee6ee00a59a4ed86f12cf6e7f
tree7e941e42f6241a8c62fd4f7393a9b6990407caaf
parentbe4a1326d12cce8df1f57017bf4112eaab437a38
test: firmware_class: add asynchronous request trigger

We might want to test for bugs like that found in commit f9692b2699bd
("firmware: fix possible use after free on name on asynchronous
request"), where the asynchronous request API had race conditions.

Let's add a simple file that will launch the async request, then wait
until it's complete and report the status. It's not a true async test
(we're using a mutex + wait_for_completion(), so we can't get more than
one going at the same time), but it does help make sure the basic API is
sane, and it can catch some class of bugs.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Cc: Luis R. Rodriguez <mcgrof@suse.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
lib/test_firmware.c