summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2023-03-23 18:48:28 +0000
committerTakashi Iwai <tiwai@suse.de>2023-03-24 07:49:57 +0100
commit38bd221a9c974636dd255d15d7b710f8f4a66009 (patch)
treed98a3b18838c9be6b8c1784df174de1243e15452 /tools
parent05a2cdfef02595cf1ec843c814cac5d57290ad35 (diff)
downloadlinux-stable-38bd221a9c974636dd255d15d7b710f8f4a66009.tar.gz
linux-stable-38bd221a9c974636dd255d15d7b710f8f4a66009.tar.bz2
linux-stable-38bd221a9c974636dd255d15d7b710f8f4a66009.zip
kselftest/alsa - pcm-test: Don't include diagnostic message in test name
When reporting errors or skips we currently include the diagnostic message indicating why we're failing or skipping. This isn't ideal since KTAP defines the entire print as the test name, so if there's an error then test systems won't detect the test as being the same one as a passing test. Move the diagnostic to a separate ksft_print_msg() to avoid this issue, the test name part will always be the same for passes, fails and skips and the diagnostic information is still displayed. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230323-alsa-pcm-test-names-v1-1-8be67a8885ff@kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/alsa/pcm-test.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/tools/testing/selftests/alsa/pcm-test.c b/tools/testing/selftests/alsa/pcm-test.c
index d73600e93e83..3e390fe67eb9 100644
--- a/tools/testing/selftests/alsa/pcm-test.c
+++ b/tools/testing/selftests/alsa/pcm-test.c
@@ -499,17 +499,18 @@ __close:
}
if (!skip)
- ksft_test_result(pass, "%s.%s.%d.%d.%d.%s%s%s\n",
+ ksft_test_result(pass, "%s.%s.%d.%d.%d.%s\n",
test_class_name, test_name,
data->card, data->device, data->subdevice,
- snd_pcm_stream_name(data->stream),
- msg[0] ? " " : "", msg);
+ snd_pcm_stream_name(data->stream));
else
- ksft_test_result_skip("%s.%s.%d.%d.%d.%s%s%s\n",
+ ksft_test_result_skip("%s.%s.%d.%d.%d.%s\n",
test_class_name, test_name,
data->card, data->device, data->subdevice,
- snd_pcm_stream_name(data->stream),
- msg[0] ? " " : "", msg);
+ snd_pcm_stream_name(data->stream));
+
+ if (msg[0])
+ ksft_print_msg("%s\n", msg);
pthread_mutex_unlock(&results_lock);