[igt-dev] [PATCH i-g-t 5/5] tests/kms_chv_cursor_fail: Handle cleanup better.

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Mon Mar 19 15:07:26 UTC 2018


Op 14-03-18 om 15:48 schreef Ville Syrjälä:
> On Wed, Mar 14, 2018 at 12:20:21PM +0100, Maarten Lankhorst wrote:
>> Clean up cursor fb in cleanup_crtc, which means that cursor fb
>> has to be created after prepare_crtc() is called.
>>
>> This will fix a small leak when a subtest fails.
>>
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
>> ---
>>  tests/kms_chv_cursor_fail.c | 7 ++-----
>>  1 file changed, 2 insertions(+), 5 deletions(-)
>>
>> diff --git a/tests/kms_chv_cursor_fail.c b/tests/kms_chv_cursor_fail.c
>> index 0dd366c3b4b1..7138e549aeb7 100644
>> --- a/tests/kms_chv_cursor_fail.c
>> +++ b/tests/kms_chv_cursor_fail.c
>> @@ -224,6 +224,7 @@ static void cleanup_crtc(data_t *data)
>>  	data->pipe_crc = NULL;
>>  
>>  	igt_remove_fb(data->drm_fd, &data->primary_fb);
>> +	igt_remove_fb(data->drm_fd, &data->fb);
>>  }
>>  
>>  static void prepare_crtc(data_t *data)
>> @@ -262,15 +263,11 @@ static void prepare_crtc(data_t *data)
>>  
>>  static void test_crtc(data_t *data, unsigned int edges)
>>  {
>> -	cleanup_crtc(data);
>> +	prepare_crtc(data);
>>  
>>  	create_cursor_fb(data, data->curw, data->curh);
> 4 and 5 lgtm as well
>
> Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
Thanks, pushed after tests succeeded. :)


More information about the igt-dev mailing list