All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Takashi Iwai <tiwai@suse.de>, Jaroslav Kysela <perex@perex.cz>,
	Shuah Khan <shuah@kernel.org>
Cc: alsa-devel@alsa-project.org, Mark Brown <broonie@kernel.org>,
	linux-kselftest@vger.kernel.org
Subject: [PATCH v3 5/7] kselftest/alsa: pcm - Support optional description for tests
Date: Fri,  2 Dec 2022 00:17:47 +0000	[thread overview]
Message-ID: <20221202001749.3321187-6-broonie@kernel.org> (raw)
In-Reply-To: <20221202001749.3321187-1-broonie@kernel.org>

In order to help with the comprehensibility of tests it is useful for us to
document what the test is attempting to cover. We could just do this through
comments in the configuration files but in order to aid people looking at
the output of the program in logs let's provide support for an optional
'description' directive which we log prior to running each of the tests.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 tools/testing/selftests/alsa/pcm-test.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/testing/selftests/alsa/pcm-test.c b/tools/testing/selftests/alsa/pcm-test.c
index 5fbb3ff517aa..57d3f6dcb46b 100644
--- a/tools/testing/selftests/alsa/pcm-test.c
+++ b/tools/testing/selftests/alsa/pcm-test.c
@@ -244,6 +244,11 @@ static void test_pcm_time(struct pcm_data *data, enum test_class class,
 	snd_pcm_sw_params_t *sw_params;
 	const char *test_class_name;
 	bool skip = true;
+	const char *desc;
+
+	desc = conf_get_string(pcm_cfg, "description", NULL, NULL);
+	if (desc)
+		ksft_print_msg("%s\n", desc);
 
 	switch (class) {
 	case TEST_CLASS_DEFAULT:
-- 
2.30.2


WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie@kernel.org>
To: Takashi Iwai <tiwai@suse.de>, Jaroslav Kysela <perex@perex.cz>,
	Shuah Khan <shuah@kernel.org>
Cc: alsa-devel@alsa-project.org, linux-kselftest@vger.kernel.org,
	Mark Brown <broonie@kernel.org>
Subject: [PATCH v3 5/7] kselftest/alsa: pcm - Support optional description for tests
Date: Fri,  2 Dec 2022 00:17:47 +0000	[thread overview]
Message-ID: <20221202001749.3321187-6-broonie@kernel.org> (raw)
In-Reply-To: <20221202001749.3321187-1-broonie@kernel.org>

In order to help with the comprehensibility of tests it is useful for us to
document what the test is attempting to cover. We could just do this through
comments in the configuration files but in order to aid people looking at
the output of the program in logs let's provide support for an optional
'description' directive which we log prior to running each of the tests.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 tools/testing/selftests/alsa/pcm-test.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/testing/selftests/alsa/pcm-test.c b/tools/testing/selftests/alsa/pcm-test.c
index 5fbb3ff517aa..57d3f6dcb46b 100644
--- a/tools/testing/selftests/alsa/pcm-test.c
+++ b/tools/testing/selftests/alsa/pcm-test.c
@@ -244,6 +244,11 @@ static void test_pcm_time(struct pcm_data *data, enum test_class class,
 	snd_pcm_sw_params_t *sw_params;
 	const char *test_class_name;
 	bool skip = true;
+	const char *desc;
+
+	desc = conf_get_string(pcm_cfg, "description", NULL, NULL);
+	if (desc)
+		ksft_print_msg("%s\n", desc);
 
 	switch (class) {
 	case TEST_CLASS_DEFAULT:
-- 
2.30.2


  parent reply	other threads:[~2022-12-02  0:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-02  0:17 [PATCH v3 0/7] kselftest/alsa: pcm-test improvements Mark Brown
2022-12-02  0:17 ` Mark Brown
2022-12-02  0:17 ` [PATCH v3 1/7] kselftest/alsa: pcm - Drop recent coverage improvement changes Mark Brown
2022-12-02  0:17   ` Mark Brown
2022-12-02  0:17 ` [PATCH v3 2/7] kselftest/alsa: pcm - move more configuration to configuration files Mark Brown
2022-12-02  0:17   ` Mark Brown
2022-12-02  0:17 ` [PATCH v3 3/7] kselftest/alsa: pcm - Always run the default set of tests Mark Brown
2022-12-02  0:17   ` Mark Brown
2022-12-02  0:17 ` [PATCH v3 4/7] kselftest/alsa: pcm - skip tests when we fail to set params Mark Brown
2022-12-02  0:17   ` Mark Brown
2022-12-02  0:17 ` Mark Brown [this message]
2022-12-02  0:17   ` [PATCH v3 5/7] kselftest/alsa: pcm - Support optional description for tests Mark Brown
2022-12-02  0:17 ` [PATCH v3 6/7] kselftest/alsa: pcm - Provide descriptions for the default tests Mark Brown
2022-12-02  0:17   ` Mark Brown
2022-12-02  0:17 ` [PATCH v3 7/7] kselftest/alsa: pcm - Add more coverage by default Mark Brown
2022-12-02  0:17   ` Mark Brown
2022-12-02  8:58 ` [PATCH v3 0/7] kselftest/alsa: pcm-test improvements Jaroslav Kysela

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=20221202001749.3321187-6-broonie@kernel.org \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=shuah@kernel.org \
    --cc=tiwai@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.