Currently the property entry kunit tests are built if CONFIG_KUNIT=y.
This will cause warnings when merged with the kunit tree that now
supports tristate CONFIG_KUNIT. While the tests appear to compile
as a module, we get a warning about missing module license.
It's better to have a per-test suite CONFIG variable so that
we can do selective building of kunit-based suites, and can
also avoid merge issues like this.
Fixes: c032ace71c ("software node: add basic tests for property entries")
Reported-by: Stephen Rothwell <[email protected]>
Reported-by: Randy Dunlap <[email protected]>
Signed-off-by: Alan Maguire <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
This adds tests for creating software nodes with properties supplied by
PROPERTY_ENTRY_XXX() macros and fetching and validating data from said
nodes/properties.
We are using KUnit framework for the tests.
Signed-off-by: Dmitry Torokhov <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
The Makefile in the drivers/base/test/ directory did not have a SPDX
identifier on it, so fix that up.
Cc: "Rafael J. Wysocki" <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This test module tries to test asynchronous driver probing by having a
driver that sleeps for an extended period of time (5 secs) in its
probe() method. It measures the time needed to register this driver
(with device already registered) and a new device (with driver already
registered). The module will fail to load if the time spent in register
call is more than half the probing sleep time.
As a sanity check the driver will then try to synchronously register
driver and device and fail if registration takes less than half of the
probing sleep time.
Signed-off-by: Dmitry Torokhov <[email protected]>
Reviewed-by: Olof Johansson <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
Signed-off-by: Thierry Escande <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>