From: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
To: "B, Jeevan" <jeevan.b@intel.com>,
"B S, Karthik" <karthik.b.s@intel.com>,
"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH i-g-t v2] tests/i915/kms_big_fb: Move cleanup code to fixture
Date: Fri, 10 Jun 2022 17:29:15 +0300 [thread overview]
Message-ID: <dfd811f2-5b66-c16d-952b-e98b1f34f6b0@gmail.com> (raw)
In-Reply-To: <90c91558731c434397bf82a1ef47e500@intel.com>
On 2.6.2022 12.42, B, Jeevan wrote:
>> -----Original Message-----
>> From: B S, Karthik <karthik.b.s@intel.com>
>> Sent: Wednesday, June 1, 2022 10:59 AM
>> To: igt-dev@lists.freedesktop.org
>> Cc: B, Jeevan <jeevan.b@intel.com>; B S, Karthik <karthik.b.s@intel.com>
>> Subject: [PATCH i-g-t v2] tests/i915/kms_big_fb: Move cleanup code to
>> fixture
>>
>> When a subtest fails, it exits from the assert and does not run the cleanup
>> part of the subtest. To avoid this, move the cleanup code to igt_fixture
>> outside the subtest.
>>
>> Signed-off-by: Karthik B S <karthik.b.s@intel.com>
> Reviewed-by: Jeevan B <jeevan.b@intel.com>
Guys, this set broke big_fb tests. See any of these tests that were ran
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7210/shards-all.html?testfilter=kms_big_fb
For example
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7210/shard-dg1-17/igt@kms_big_fb@linear-16bpp-rotate-0.html
..
Starting subtest: linear-16bpp-rotate-0
Subtest linear-16bpp-rotate-0: SUCCESS (1.781s)
(kms_big_fb:992) intel_allocator-CRITICAL: Test assertion failure
function handle_request, file ../lib/intel_allocator.c:477:
(kms_big_fb:992) intel_allocator-CRITICAL: Failed assertion: al
Test kms_big_fb failed.
..
/Juha-Pekka
>> ---
>> tests/i915/kms_big_fb.c | 46 ++++++++++++++++++-----------------------
>> 1 file changed, 20 insertions(+), 26 deletions(-)
>>
>> diff --git a/tests/i915/kms_big_fb.c b/tests/i915/kms_big_fb.c index
>> 91ad3b4d..abf974bb 100644
>> --- a/tests/i915/kms_big_fb.c
>> +++ b/tests/i915/kms_big_fb.c
>> @@ -264,12 +264,6 @@ static void prep_fb(data_t *data)
>> generate_pattern(data, &data->big_fb, 640, 480); }
>>
>> -static void cleanup_fb(data_t *data)
>> -{
>> - igt_remove_fb(data->drm_fd, &data->big_fb);
>> - data->big_fb.fb_id = 0;
>> -}
>> -
>> static void set_c8_lut(data_t *data)
>> {
>> igt_pipe_t *pipe = &data->display.pipes[data->pipe]; @@ -463,14
>> +457,6 @@ static bool test_pipe(data_t *data)
>> if (data->format == DRM_FORMAT_C8)
>> unset_lut(data);
>>
>> - igt_pipe_crc_free(data->pipe_crc);
>> -
>> - igt_output_set_pipe(data->output, PIPE_ANY);
>> -
>> - igt_remove_fb(data->drm_fd, &data->small_fb);
>> -
>> - intel_bb_destroy(data->ibb);
>> -
>> return ret;
>> }
>>
>> @@ -563,14 +549,6 @@ max_hw_stride_async_flip_test(data_t *data)
>> }
>> igt_reset_timeout();
>>
>> - igt_pipe_crc_free(data->pipe_crc);
>> - igt_output_set_pipe(data->output, PIPE_NONE);
>> - igt_remove_fb(data->drm_fd, &data->big_fb);
>> - igt_remove_fb(data->drm_fd, &data->big_fb_flip[0]);
>> - igt_remove_fb(data->drm_fd, &data->big_fb_flip[1]);
>> -
>> - intel_bb_destroy(data->ibb);
>> -
>> return true;
>> }
>>
>> @@ -773,6 +751,22 @@ set_max_hw_stride(data_t *data)
>> }
>> }
>>
>> +static void test_cleanup(data_t *data)
>> +{
>> + if (!data->output)
>> + return;
>> +
>> + igt_pipe_crc_free(data->pipe_crc);
>> + igt_output_set_pipe(data->output, PIPE_NONE);
>> + igt_remove_fb(data->drm_fd, &data->big_fb);
>> + igt_remove_fb(data->drm_fd, &data->big_fb_flip[0]);
>> + igt_remove_fb(data->drm_fd, &data->big_fb_flip[1]);
>> + igt_remove_fb(data->drm_fd, &data->small_fb);
>> +
>> + intel_bb_destroy(data->ibb);
>> + data->output = NULL;
>> +}
>> +
>> static data_t data = {};
>>
>> static const struct {
>> @@ -918,7 +912,7 @@ igt_main
>> }
>>
>> igt_fixture
>> - cleanup_fb(&data);
>> + test_cleanup(&data);
>> }
>> }
>>
>> @@ -972,10 +966,10 @@ igt_main
>> test_scanout(&data);
>> }
>> data.async_flip_test = false;
>> - }
>>
>> - igt_fixture
>> - cleanup_fb(&data);
>> + igt_fixture
>> + test_cleanup(&data);
>> + }
>> }
>> }
>> }
>> --
>> 2.22.0
>
next prev parent reply other threads:[~2022-06-10 14:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-01 5:28 [igt-dev] [PATCH i-g-t v2] tests/i915/kms_big_fb: Move cleanup code to fixture Karthik B S
2022-06-01 7:11 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/i915/kms_big_fb: Move cleanup code to fixture (rev2) Patchwork
2022-06-01 8:39 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2022-06-02 9:42 ` [igt-dev] [PATCH i-g-t v2] tests/i915/kms_big_fb: Move cleanup code to fixture B, Jeevan
2022-06-10 14:29 ` Juha-Pekka Heikkila [this message]
2022-06-13 5:11 ` Karthik B S
2022-06-13 7:01 ` Karthik B S
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dfd811f2-5b66-c16d-952b-e98b1f34f6b0@gmail.com \
--to=juhapekka.heikkila@gmail.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jeevan.b@intel.com \
--cc=karthik.b.s@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.