From: Ngai-Mint Kwan <ngai-mint.kwan@linux.intel.com>
To: Gustavo Sousa <gustavo.sousa@intel.com>, igt-dev@lists.freedesktop.org
Subject: Re: [PATCH i-g-t] tests/kms_atomic_transition: Fix dynamic subtest
Date: Mon, 27 Oct 2025 10:01:15 -0700 [thread overview]
Message-ID: <a313477e-4ee6-460b-937c-420fb37114bb@linux.intel.com> (raw)
In-Reply-To: <176157451100.3407.12104950322254043568@intel.com>
Hi Gustavo,
On 2025-10-27 07:15, Gustavo Sousa wrote:
> Quoting Ngai-Mint Kwan (2025-10-24 20:37:28-03:00)
>> Fix Segmentation Fault when calling igt_pipe_crc_free() due to double-freeing a
>> dangling pointer.
>>
>> This occurs when a system connected to multiple displays executes a test with
>> "1x-outputs" dynamic subtest.
>>
>> Example:
>> kms_atomic_transition --run-subtest modeset-transition --dynamic-subtest 1x-outputs
>>
>> Signed-off-by: Ngai-Mint Kwan <ngai-mint.kwan@linux.intel.com>
>> ---
>> tests/kms_atomic_transition.c | 10 +++++-----
>> 1 file changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
>> index a13830965..a7d8d88b4 100644
>> --- a/tests/kms_atomic_transition.c
>> +++ b/tests/kms_atomic_transition.c
>> @@ -1065,8 +1065,7 @@ static void run_modeset_transition(data_t *data, int requested_outputs, bool non
>> return;
>> }
>>
>> - igt_dynamic_f("%ix-outputs", requested_outputs)
>> - run_modeset_tests(data, requested_outputs, nonblocking, fencing);
>> + run_modeset_tests(data, requested_outputs, nonblocking, fencing);
>>
>> /* Cleanup */
>> unset_output_pipe(&data->display);
>> @@ -1259,9 +1258,10 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
>> igt_describe_f("%s", modeset_tests[i].desc);
>> igt_subtest_with_dynamic_f("%s", modeset_tests[i].name) {
>> for (j = 1; j <= count; j++) {
>> - run_modeset_transition(&data, j,
>> - modeset_tests[i].nonblocking,
>> - modeset_tests[i].fencing);
>> + igt_dynamic_f("%ix-outputs", j)
>> + run_modeset_transition(&data, j,
>> + modeset_tests[i].nonblocking,
>> + modeset_tests[i].fencing);
> I believe one possible problem here is that we might end up creating a
> dynamic subtest that ends not not getting exercised, when (num_outputs <
> requested_outputs) evaluates to true inside run_modeset_transition().
I looked at run_modeset_transition() and it looks more like an exit
criteria
rather than a valid subtest when it is checking for (num_outputs <
requested_outputs)?
Kwan
>
> Maybe we should rather move the cleanup code to be contained inside
> run_modeset_tests()?
>
> --
> Gustavo Sousa
>
>> }
>> }
>> }
>> --
>> 2.43.0
>>
prev parent reply other threads:[~2025-10-27 17:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-24 23:37 [PATCH i-g-t] tests/kms_atomic_transition: Fix dynamic subtest Ngai-Mint Kwan
2025-10-25 0:14 ` ✓ Xe.CI.BAT: success for " Patchwork
2025-10-25 0:24 ` ✓ i915.CI.BAT: " Patchwork
2025-10-25 9:34 ` ✗ i915.CI.Full: failure " Patchwork
2025-10-25 13:01 ` ✗ Xe.CI.Full: " Patchwork
2025-10-27 14:15 ` [PATCH i-g-t] " Gustavo Sousa
2025-10-27 17:01 ` Ngai-Mint Kwan [this message]
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=a313477e-4ee6-460b-937c-420fb37114bb@linux.intel.com \
--to=ngai-mint.kwan@linux.intel.com \
--cc=gustavo.sousa@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox