mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 10:01:39 -05:00
Merge tag 'linux_kselftest-kunit-fixes-6.19-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
Pull kunit fixes from Shuah Khan: "Drop unused parameter from kunit_device_register_internal and make FAULT_TEST default to n when PANIC_ON_OOPS" * tag 'linux_kselftest-kunit-fixes-6.19-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: kunit: make FAULT_TEST default to n when PANIC_ON_OOPS kunit: Drop unused parameter from kunit_device_register_internal
This commit is contained in:
@@ -28,7 +28,7 @@ config KUNIT_FAULT_TEST
|
|||||||
bool "Enable KUnit tests which print BUG stacktraces"
|
bool "Enable KUnit tests which print BUG stacktraces"
|
||||||
depends on KUNIT_TEST
|
depends on KUNIT_TEST
|
||||||
depends on !UML
|
depends on !UML
|
||||||
default y
|
default !PANIC_ON_OOPS
|
||||||
help
|
help
|
||||||
Enables fault handling tests for the KUnit framework. These tests may
|
Enables fault handling tests for the KUnit framework. These tests may
|
||||||
trigger a kernel BUG(), and the associated stack trace, even when they
|
trigger a kernel BUG(), and the associated stack trace, even when they
|
||||||
|
|||||||
@@ -106,8 +106,7 @@ EXPORT_SYMBOL_GPL(kunit_driver_create);
|
|||||||
|
|
||||||
/* Helper which creates a kunit_device, attaches it to the kunit_bus*/
|
/* Helper which creates a kunit_device, attaches it to the kunit_bus*/
|
||||||
static struct kunit_device *kunit_device_register_internal(struct kunit *test,
|
static struct kunit_device *kunit_device_register_internal(struct kunit *test,
|
||||||
const char *name,
|
const char *name)
|
||||||
const struct device_driver *drv)
|
|
||||||
{
|
{
|
||||||
struct kunit_device *kunit_dev;
|
struct kunit_device *kunit_dev;
|
||||||
int err = -ENOMEM;
|
int err = -ENOMEM;
|
||||||
@@ -150,7 +149,7 @@ struct device *kunit_device_register_with_driver(struct kunit *test,
|
|||||||
const char *name,
|
const char *name,
|
||||||
const struct device_driver *drv)
|
const struct device_driver *drv)
|
||||||
{
|
{
|
||||||
struct kunit_device *kunit_dev = kunit_device_register_internal(test, name, drv);
|
struct kunit_device *kunit_dev = kunit_device_register_internal(test, name);
|
||||||
|
|
||||||
if (IS_ERR_OR_NULL(kunit_dev))
|
if (IS_ERR_OR_NULL(kunit_dev))
|
||||||
return ERR_CAST(kunit_dev);
|
return ERR_CAST(kunit_dev);
|
||||||
@@ -172,7 +171,7 @@ struct device *kunit_device_register(struct kunit *test, const char *name)
|
|||||||
if (IS_ERR(drv))
|
if (IS_ERR(drv))
|
||||||
return ERR_CAST(drv);
|
return ERR_CAST(drv);
|
||||||
|
|
||||||
dev = kunit_device_register_internal(test, name, drv);
|
dev = kunit_device_register_internal(test, name);
|
||||||
if (IS_ERR(dev)) {
|
if (IS_ERR(dev)) {
|
||||||
kunit_release_action(test, driver_unregister_wrapper, (void *)drv);
|
kunit_release_action(test, driver_unregister_wrapper, (void *)drv);
|
||||||
return ERR_CAST(dev);
|
return ERR_CAST(dev);
|
||||||
|
|||||||
Reference in New Issue
Block a user