summaryrefslogtreecommitdiff
path: root/drivers/base/test/Makefile
AgeCommit message (Collapse)AuthorFilesLines
2021-10-07device property: build kunit tests without structleak pluginBrendan Higgins1-1/+1
The structleak plugin causes the stack frame size to grow immensely when used with KUnit: ../drivers/base/test/property-entry-test.c:492:1: warning: the frame size of 2832 bytes is larger than 2048 bytes [-Wframe-larger-than=] ../drivers/base/test/property-entry-test.c:322:1: warning: the frame size of 2080 bytes is larger than 2048 bytes [-Wframe-larger-than=] ../drivers/base/test/property-entry-test.c:250:1: warning: the frame size of 4976 bytes is larger than 2048 bytes [-Wframe-larger-than=] ../drivers/base/test/property-entry-test.c:115:1: warning: the frame size of 3280 bytes is larger than 2048 bytes [-Wframe-larger-than=] Turn it off in this file. Signed-off-by: Brendan Higgins <brendanhiggins@google.com> Suggested-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2021-04-15kunit: software node: adhear to KUNIT formatting standardNico Pache1-1/+1
Change CONFIG_KUNIT_DRIVER_PE_TEST to CONFIG_DRIVER_PE_KUNIT_TEST inorder to adhear to the KUNIT *_KUNIT_TEST config name format. Fixes: aa811e3cecec (software node: introduce CONFIG_KUNIT_DRIVER_PE_TEST) Signed-off-by: Nico Pache <npache@redhat.com> Link: https://lore.kernel.org/r/ef06f65f4a622cf83cce5ba2ba5a060d2aa2e1b9.1618388989.git.npache@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-27drivers/base: build kunit tests without structleak pluginArnd Bergmann1-0/+1
The structleak plugin causes the stack frame size to grow immensely: drivers/base/test/property-entry-test.c: In function 'pe_test_reference': drivers/base/test/property-entry-test.c:481:1: error: the frame size of 2640 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] 481 | } | ^ drivers/base/test/property-entry-test.c: In function 'pe_test_uints': drivers/base/test/property-entry-test.c:99:1: error: the frame size of 2592 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] Turn it off in this file. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20210125124533.101339-3-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-17software node: introduce CONFIG_KUNIT_DRIVER_PE_TESTAlan Maguire1-1/+1
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: c032ace71c29 ("software node: add basic tests for property entries") Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Alan Maguire <alan.maguire@oracle.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-12-19software node: add basic tests for property entriesDmitry Torokhov1-0/+2
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 <dmitry.torokhov@gmail.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-04-04drivers: base: test: add proper SPDX identifier to MakefileGreg Kroah-Hartman1-0/+1
The Makefile in the drivers/base/test/ directory did not have a SPDX identifier on it, so fix that up. Cc: "Rafael J. Wysocki" <rafael@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-10driver-core: add test module for asynchronous probingDmitry Torokhov1-0/+1
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 <dtor@chromium.org> Reviewed-by: Olof Johansson <olofj@chromium.org> Signed-off-by: Guenter Roeck <groeck@chromium.org> Signed-off-by: Thierry Escande <thierry.escande@collabora.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>