From: Mohammed Bilal <mohammed.bilal@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: jeevan.b@intel.com, sebastian.brzezinka@intel.com,
Mohammed Bilal <mohammed.bilal@intel.com>
Subject: [PATCH v4 1/2] tests/chamelium/audio: Fix ALSA handle leak on skipped audio config
Date: Mon, 16 Mar 2026 17:17:07 +0530 [thread overview]
Message-ID: <20260316114708.3342278-2-mohammed.bilal@intel.com> (raw)
In-Reply-To: <20260316114708.3342278-1-mohammed.bilal@intel.com>
When the audio configuration check fails, the loop continues without
closing previously opened ALSA handles. This leads to handle leaks
across iterations and may eventually cause file descriptor exhaustion
or configuration failures.
Fix by ensuring the handles are closed before continuing.
Signed-off-by: Mohammed Bilal <mohammed.bilal@intel.com>
Reviewed-by: Jeevan B <jeevan.b@intel.com>
Reviewed-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
---
tests/chamelium/kms_chamelium_audio.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/chamelium/kms_chamelium_audio.c b/tests/chamelium/kms_chamelium_audio.c
index df8d27c0c..2967e3c50 100644
--- a/tests/chamelium/kms_chamelium_audio.c
+++ b/tests/chamelium/kms_chamelium_audio.c
@@ -762,8 +762,10 @@ static void test_display_audio(chamelium_data_t *data,
sampling_rate = test_sampling_rates[i];
if (!check_audio_configuration(alsa, format, channels,
- sampling_rate))
+ sampling_rate)) {
+ alsa_close_output(alsa);
continue;
+ }
run = true;
--
2.48.1
next prev parent reply other threads:[~2026-03-16 11:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-16 11:47 [PATCH v4 0/2] tests/chamelium/audio: Fix resource leaks in audio tests Mohammed Bilal
2026-03-16 11:47 ` Mohammed Bilal [this message]
2026-03-16 11:47 ` [PATCH v4 2/2] tests/chamelium/audio: Fix resource leaks on assertion failure Mohammed Bilal
2026-03-25 11:06 ` Sebastian Brzezinka
2026-03-17 9:59 ` ✓ Xe.CI.BAT: success for tests/chamelium/audio: Fix resource leaks in audio tests (rev4) Patchwork
2026-03-17 12:19 ` ✓ i915.CI.BAT: " Patchwork
2026-03-18 15:36 ` ✓ Xe.CI.FULL: " Patchwork
2026-03-24 11:51 ` ✓ Xe.CI.BAT: success for tests/chamelium/audio: Fix resource leaks in audio tests (rev5) Patchwork
2026-03-24 11:58 ` ✓ i915.CI.BAT: " Patchwork
2026-03-24 20:03 ` ✗ i915.CI.Full: failure " Patchwork
2026-03-24 22:38 ` ✓ Xe.CI.FULL: success " Patchwork
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=20260316114708.3342278-2-mohammed.bilal@intel.com \
--to=mohammed.bilal@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jeevan.b@intel.com \
--cc=sebastian.brzezinka@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox