diff options
| author | 2025-04-14 11:23:43 +0100 | |
|---|---|---|
| committer | 2025-04-14 11:23:43 +0100 | |
| commit | 1749125091cd0834632ac295caa65f8c57628be6 (patch) | |
| tree | c82bc06c4e335e250fdb41f4fcdc53619242b380 /drivers/gpu/drm/tests/drm_cmdline_parser_test.c | |
| parent | ASoC: soc-pcm: Fix hw_params() and DAPM widget sequence (diff) | |
| parent | firmware: cs_dsp: tests: Depend on FW_CS_DSP rather then enabling it (diff) | |
| download | wireguard-linux-1749125091cd0834632ac295caa65f8c57628be6.tar.xz wireguard-linux-1749125091cd0834632ac295caa65f8c57628be6.zip | |
Fix up building KUnit tests for Cirrus Logic modules
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>:
This series fixes the KConfig for cs_dsp and cs-amp-lib tests so that
CONFIG_KUNIT_ALL_TESTS doesn't cause them to add modules to the build.
Diffstat (limited to 'drivers/gpu/drm/tests/drm_cmdline_parser_test.c')
| -rw-r--r-- | drivers/gpu/drm/tests/drm_cmdline_parser_test.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/drm/tests/drm_cmdline_parser_test.c b/drivers/gpu/drm/tests/drm_cmdline_parser_test.c index 59c8408c453c..1cfcb597b088 100644 --- a/drivers/gpu/drm/tests/drm_cmdline_parser_test.c +++ b/drivers/gpu/drm/tests/drm_cmdline_parser_test.c @@ -7,6 +7,7 @@ #include <kunit/test.h> #include <drm/drm_connector.h> +#include <drm/drm_kunit_helpers.h> #include <drm/drm_modes.h> static const struct drm_connector no_connector = {}; @@ -955,8 +956,15 @@ struct drm_cmdline_tv_option_test { static void drm_test_cmdline_tv_options(struct kunit *test) { const struct drm_cmdline_tv_option_test *params = test->param_value; - const struct drm_display_mode *expected_mode = params->mode_fn(NULL); + struct drm_display_mode *expected_mode; struct drm_cmdline_mode mode = { }; + int ret; + + expected_mode = params->mode_fn(NULL); + KUNIT_ASSERT_NOT_NULL(test, expected_mode); + + ret = drm_kunit_add_mode_destroy_action(test, expected_mode); + KUNIT_ASSERT_EQ(test, ret, 0); KUNIT_EXPECT_TRUE(test, drm_mode_parse_command_line_for_connector(params->cmdline, &no_connector, &mode)); |
