test: add new driver_data load tester
This adds a load tester driver test_driver_data a for the new
extensible driver_data loader API, part of firmware_class.
Since the fallback mechanisms are currenlty completely
ignored by the driver_data API the testing is much easier to do.
Contrary to the firmware_class tester which adds in-kernel
code for each and every single test it can think of for each
type of request, this enables you to build your tests in userspace
by exposing knobs of the exported API to userspace of the
options available in the API and then lets the trigger kick a one
time kernel API use. This lets us build any possible test case
in userspace.
The test driver also enables multiple test triggers
to be created enabling further testing to be done through
separate threads in parallel.
Both these facts should should not only help testing the
drvdata API in as many ways as possible as efficiently
as possible, but it also paves the way to later strive to
see how it might be even possible to automatically generate
test API drivers for exported symbols in the future. The
exported symbols being the test cases and attributes exposed
in userspace consisting of device attributes, the target test
driver being the desired output driver.
v6:
o document test driver data test driver
v5:
o 0-day build complaint lock fix on lib/test_drvdata.c:9991
o expand testdrv.sh to support a series of different options
to help with testing
o use snprintf() using PAGE_SIZE
o add a common helper config_test_show_str()
o drop test_dev_get_name() in favor for kasprintf()
o use vzalloc() instead of vmalloc()
o bike shedding sysdata/drvdata
Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
7 files changed