From: Martin Peres <martin.peres@linux.intel.com>
To: Arkadiusz Hiler <arkadiusz.hiler@intel.com>,
igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_chamelium: Promote fail-indicating messages to critical level
Date: Thu, 21 Nov 2019 14:12:04 +0200 [thread overview]
Message-ID: <72f49563-9e95-d431-2fe0-2aa8779b6c53@linux.intel.com> (raw)
In-Reply-To: <20191107141524.261777-1-arkadiusz.hiler@intel.com>
On 07/11/2019 16:15, Arkadiusz Hiler wrote:
> We test so many audio configurations that igt_debug's ring buffer gets
> overflown which often puts the actual failure out of our reach.
>
> Let's promote failure-indicating messages to critical log level, so we
> see which exact configuration has borked.
Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
>
> Cc: Martin Peres <martin.peres@linux.intel.com>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111696
> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> ---
> tests/kms_chamelium.c | 29 ++++++++++++++++++-----------
> 1 file changed, 18 insertions(+), 11 deletions(-)
>
> diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
> index 52330098..af23c7f0 100644
> --- a/tests/kms_chamelium.c
> +++ b/tests/kms_chamelium.c
> @@ -1444,6 +1444,7 @@ static void audio_state_stop(struct audio_state *state, bool success)
> bool ok;
> int ret;
> struct chamelium_audio_file *audio_file;
> + enum igt_log_level log_level;
>
> igt_debug("Stopping audio playback\n");
> state->run = false;
> @@ -1475,11 +1476,17 @@ static void audio_state_stop(struct audio_state *state, bool success)
> state->dump_path = NULL;
> }
>
> - igt_debug("Audio %s test result for format %s, sampling rate %d Hz "
> - "and %d channels: %s\n",
> - state->name, snd_pcm_format_name(state->playback.format),
> - state->playback.rate, state->playback.channels,
> - success ? "ALL GREEN" : "FAILED");
> + if (success)
> + log_level = IGT_LOG_DEBUG;
> + else
> + log_level = IGT_LOG_CRITICAL;
> +
> + igt_log(IGT_LOG_DOMAIN, log_level, "Audio %s test result for format %s, "
> + "sampling rate %d Hz and %d channels: %s\n",
> + state->name, snd_pcm_format_name(state->playback.format),
> + state->playback.rate, state->playback.channels,
> + success ? "ALL GREEN" : "FAILED");
> +
> }
>
> static void check_audio_infoframe(struct audio_state *state)
> @@ -1809,18 +1816,18 @@ static bool test_audio_flatline(struct audio_state *state)
> align_success = true;
> for (i = 0; i < state->playback.channels; i++) {
> if (falling_edges[i] < 0) {
> - igt_debug("Falling edge not detected for channel %zu\n",
> - i);
> + igt_critical("Falling edge not detected for channel %zu\n",
> + i);
> align_success = false;
> continue;
> }
>
> if (abs(falling_edges[0] - falling_edges[i]) >
> FLATLINE_ALIGN_ACCURACY) {
> - igt_debug("Channel alignment mismatch: "
> - "channel 0 has a falling edge at index %d "
> - "while channel %zu has index %d\n",
> - falling_edges[0], i, falling_edges[i]);
> + igt_critical("Channel alignment mismatch: "
> + "channel 0 has a falling edge at index %d "
> + "while channel %zu has index %d\n",
> + falling_edges[0], i, falling_edges[i]);
> align_success = false;
> }
> }
>
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
prev parent reply other threads:[~2019-11-21 12:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-07 14:15 [igt-dev] [PATCH i-g-t] tests/kms_chamelium: Promote fail-indicating messages to critical level Arkadiusz Hiler
2019-11-07 14:41 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-11-08 17:52 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2019-11-21 12:12 ` Martin Peres [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=72f49563-9e95-d431-2fe0-2aa8779b6c53@linux.intel.com \
--to=martin.peres@linux.intel.com \
--cc=arkadiusz.hiler@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