File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 7
7
#include <kunit/test.h>
8
8
9
9
#include <drm/drm_connector.h>
10
+ #include <drm/drm_kunit_helpers.h>
10
11
#include <drm/drm_modes.h>
11
12
12
13
static const struct drm_connector no_connector = {};
@@ -955,8 +956,15 @@ struct drm_cmdline_tv_option_test {
955
956
static void drm_test_cmdline_tv_options (struct kunit * test )
956
957
{
957
958
const struct drm_cmdline_tv_option_test * params = test -> param_value ;
958
- const struct drm_display_mode * expected_mode = params -> mode_fn ( NULL ) ;
959
+ struct drm_display_mode * expected_mode ;
959
960
struct drm_cmdline_mode mode = { };
961
+ int ret ;
962
+
963
+ expected_mode = params -> mode_fn (NULL );
964
+ KUNIT_ASSERT_NOT_NULL (test , expected_mode );
965
+
966
+ ret = drm_kunit_add_mode_destroy_action (test , expected_mode );
967
+ KUNIT_ASSERT_EQ (test , ret , 0 );
960
968
961
969
KUNIT_EXPECT_TRUE (test , drm_mode_parse_command_line_for_connector (params -> cmdline ,
962
970
& no_connector , & mode ));
You can’t perform that action at this time.
0 commit comments