summaryrefslogtreecommitdiff
path: root/tests/kms_chamelium.c
diff options
context:
space:
mode:
authorArkadiusz Hiler <arkadiusz.hiler@intel.com>2019-11-07 16:15:24 +0200
committerArkadiusz Hiler <arkadiusz.hiler@intel.com>2019-11-26 13:39:54 +0200
commit9c860632505e6d986558d7a61807ddfa263581ba (patch)
tree56af4d745414b0433f89acb33a70da6248e4abfb /tests/kms_chamelium.c
parent9bfc0a822caa9498dd931b93aa63822e10fdb9f4 (diff)
tests/kms_chamelium: Promote fail-indicating messages to critical level
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. 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> Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
Diffstat (limited to 'tests/kms_chamelium.c')
-rw-r--r--tests/kms_chamelium.c29
1 files 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;
}
}