From: Simon Ser <simon.ser@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Petri Latvala <petri.latvala@intel.com>
Subject: [igt-dev] [PATCH i-g-t v3 8/9] tests/kms_chamelium: don't abort audio test on first fail
Date: Tue, 14 May 2019 15:06:45 +0300 [thread overview]
Message-ID: <20190514120646.19889-9-simon.ser@intel.com> (raw)
In-Reply-To: <20190514120646.19889-1-simon.ser@intel.com>
The audio test is repeated with a few different frequencies. When the test
fails for one frequency, continue testing other frequencies so that we get a
better understanding of the situation: is only one frequency failing, or are
all of them failing?
Signed-off-by: Simon Ser <simon.ser@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
tests/kms_chamelium.c | 38 +++++++++++++++++++++++---------------
1 file changed, 23 insertions(+), 15 deletions(-)
diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
index 51f335efb94b..c1dbd99d0e76 100644
--- a/tests/kms_chamelium.c
+++ b/tests/kms_chamelium.c
@@ -841,15 +841,6 @@ do_test_display_audio(data_t *data, struct chamelium_port *port,
struct audio_state state = {};
int channel_mapping[8], capture_chan;
- if (!alsa_test_output_configuration(alsa, playback_channels,
- playback_rate)) {
- igt_debug("Skipping test with sample rate %d Hz and %d channels "
- "because at least one of the selected output devices "
- "doesn't support this configuration\n",
- playback_rate, playback_channels);
- return false;
- }
-
igt_debug("Testing with playback sampling rate %d Hz and %d channels\n",
playback_rate, playback_channels);
alsa_configure_output(alsa, playback_channels, playback_rate);
@@ -1028,15 +1019,14 @@ do_test_display_audio(data_t *data, struct chamelium_port *port,
audio_signal_fini(signal);
chamelium_stream_deinit(stream);
- igt_assert(success);
- return true;
+ return success;
}
static void
test_display_audio(data_t *data, struct chamelium_port *port,
const char *audio_device, enum test_edid edid)
{
- bool run = false;
+ bool run, success;
struct alsa *alsa;
int ret;
igt_output_t *output;
@@ -1045,6 +1035,7 @@ test_display_audio(data_t *data, struct chamelium_port *port,
drmModeModeInfo *mode;
drmModeConnector *connector;
int fb_id, i;
+ int channels, sampling_rate;
igt_require(alsa_has_exclusive_access());
@@ -1077,20 +1068,37 @@ test_display_audio(data_t *data, struct chamelium_port *port,
enable_output(data, port, output, mode, &fb);
+ run = false;
+ success = true;
for (i = 0; i < test_sampling_rates_count; i++) {
ret = alsa_open_output(alsa, audio_device);
igt_assert(ret >= 0);
/* TODO: playback on all 8 available channels */
- run |= do_test_display_audio(data, port, alsa,
- PLAYBACK_CHANNELS,
- test_sampling_rates[i]);
+ channels = PLAYBACK_CHANNELS;
+ sampling_rate = test_sampling_rates[i];
+
+ if (!alsa_test_output_configuration(alsa, channels,
+ sampling_rate)) {
+ igt_debug("Skipping test with sample rate %d Hz and %d channels "
+ "because at least one of the selected output devices "
+ "doesn't support this configuration\n",
+ channels, sampling_rate);
+ continue;
+ }
+
+ run = true;
+
+ success &= do_test_display_audio(data, port, alsa, channels,
+ sampling_rate);
alsa_close_output(alsa);
}
/* Make sure we tested at least one frequency. */
igt_assert(run);
+ /* Make sure all runs were successful. */
+ igt_assert(success);
igt_remove_fb(data->drm_fd, &fb);
--
2.21.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-05-14 12:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-14 12:06 [igt-dev] [PATCH i-g-t v3 0/9] tests/kms_chamelium: add HDMI audio test Simon Ser
2019-05-14 12:06 ` [igt-dev] [PATCH i-g-t v3 1/9] tests/kms_chamelium: skip if GetAudioFormat is not supported Simon Ser
2019-05-14 12:06 ` [igt-dev] [PATCH i-g-t v3 2/9] lib/igt_edid: add support for Short Audio Descriptors Simon Ser
2019-05-14 12:06 ` [igt-dev] [PATCH i-g-t v3 3/9] lib/igt_edid: add support for Vendor Specific Data blocks Simon Ser
2019-05-14 12:06 ` [igt-dev] [PATCH i-g-t v3 4/9] lib/igt_chamelium: add CHAMELIUM_DEFAULT_EDID Simon Ser
2019-05-14 12:06 ` [igt-dev] [PATCH i-g-t v3 5/9] tests/kms_chamelium: generate an EDID with audio support Simon Ser
2019-05-14 12:06 ` [igt-dev] [PATCH i-g-t v3 6/9] tests/kms_chamelium: disable >48KHz audio tests Simon Ser
2019-05-14 12:06 ` [igt-dev] [PATCH i-g-t v3 7/9] tests/kms_chamelium: enable audio test on HDMI ports Simon Ser
2019-05-14 12:06 ` Simon Ser [this message]
2019-05-14 12:06 ` [igt-dev] [PATCH i-g-t v3 9/9] HAX: add {dp, hdmi}-audio test to fast-feedback Simon Ser
2019-05-14 13:48 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_chamelium: add HDMI audio test Patchwork
2019-05-15 7:24 ` Ser, Simon
2019-05-14 18:59 ` [igt-dev] ✓ Fi.CI.IGT: " 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=20190514120646.19889-9-simon.ser@intel.com \
--to=simon.ser@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=petri.latvala@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