* [PATCH] kselftest/alsa - pcm-test: Don't include diagnostic message in test name
@ 2023-03-23 18:48 Mark Brown
2023-03-24 6:50 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2023-03-23 18:48 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai, Shuah Khan
Cc: alsa-devel, linux-kselftest, Mark Brown
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>
---
tools/testing/selftests/alsa/pcm-test.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/tools/testing/selftests/alsa/pcm-test.c b/tools/testing/selftests/alsa/pcm-test.c
index 58b525a4a32c..bab56ea67e89 100644
--- a/tools/testing/selftests/alsa/pcm-test.c
+++ b/tools/testing/selftests/alsa/pcm-test.c
@@ -489,17 +489,18 @@ static void test_pcm_time(struct pcm_data *data, enum test_class class,
}
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);
---
base-commit: e8d018dd0257f744ca50a729e3d042cf2ec9da65
change-id: 20230323-alsa-pcm-test-names-bcd31b586ca9
Best regards,
--
Mark Brown <broonie@kernel.org>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] kselftest/alsa - pcm-test: Don't include diagnostic message in test name
2023-03-23 18:48 [PATCH] kselftest/alsa - pcm-test: Don't include diagnostic message in test name Mark Brown
@ 2023-03-24 6:50 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2023-03-24 6:50 UTC (permalink / raw)
To: Mark Brown
Cc: Jaroslav Kysela, Takashi Iwai, Shuah Khan, alsa-devel,
linux-kselftest
On Thu, 23 Mar 2023 19:48:28 +0100,
Mark Brown wrote:
>
> 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>
Thanks, applied now.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-24 6:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-23 18:48 [PATCH] kselftest/alsa - pcm-test: Don't include diagnostic message in test name Mark Brown
2023-03-24 6:50 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox