Commit Graph
4 Commits
Author SHA1 Message Date
Alan Maguire aa811e3cec software node: introduce CONFIG_KUNIT_DRIVER_PE_TEST
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]>
2020-01-17 00:23:37 +01:00
Dmitry Torokhov c032ace71c software node: add basic tests for property entries
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]>
2019-12-19 18:14:34 +01:00
Greg Kroah-Hartman 47bcc18c7e drivers: base: test: add proper SPDX identifier to Makefile
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]>
2019-04-04 20:03:40 +02:00
Dmitry Torokhov 79543cf2b1 driver-core: add test module for asynchronous probing
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]>
2016-11-10 17:28:16 +01:00