linux/lib/kunit/platform-test.c

// SPDX-License-Identifier: GPL-2.0
/*
 * KUnit test for KUnit platform driver infrastructure.
 */

#include <linux/platform_device.h>

#include <kunit/platform_device.h>
#include <kunit/test.h>

/*
 * Test that kunit_platform_device_alloc() creates a platform device.
 */
static void kunit_platform_device_alloc_test(struct kunit *test)
{}

/*
 * Test that kunit_platform_device_add() registers a platform device on the
 * platform bus with the proper name and id.
 */
static void kunit_platform_device_add_test(struct kunit *test)
{}

/*
 * Test that kunit_platform_device_add() called twice with the same device name
 * and id fails the second time and properly cleans up.
 */
static void kunit_platform_device_add_twice_fails_test(struct kunit *test)
{}

static int kunit_platform_device_find_by_name(struct device *dev, const void *data)
{}

/*
 * Test that kunit_platform_device_add() cleans up by removing the platform
 * device when the test finishes. */
static void kunit_platform_device_add_cleans_up(struct kunit *test)
{}

/*
 * Test suite for struct platform_device kunit APIs
 */
static struct kunit_case kunit_platform_device_test_cases[] =;

static struct kunit_suite kunit_platform_device_suite =;

struct kunit_platform_driver_test_context {};

static const char * const test_data =;

static inline struct kunit_platform_driver_test_context *
to_test_context(struct platform_device *pdev)
{}

static int kunit_platform_driver_probe(struct platform_device *pdev)
{}

/* Test that kunit_platform_driver_register() registers a driver that probes. */
static void kunit_platform_driver_register_test(struct kunit *test)
{}

/*
 * Test that kunit_platform_device_prepare_wait_for_probe() completes the completion
 * when the device is already probed.
 */
static void kunit_platform_device_prepare_wait_for_probe_completes_when_already_probed(struct kunit *test)
{}

static struct kunit_case kunit_platform_driver_test_cases[] =;

/*
 * Test suite for struct platform_driver kunit APIs
 */
static struct kunit_suite kunit_platform_driver_suite =;

kunit_test_suites();

MODULE_LICENSE();
MODULE_DESCRIPTION();