From patchwork Thu Mar 23 18:48:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 666135 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E834EC6FD1C for ; Thu, 23 Mar 2023 18:50:03 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 8AE69ED0; Thu, 23 Mar 2023 19:49:10 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8AE69ED0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1679597400; bh=0hW7ou4yKKzkx7XuuV6id7JupKItK72eoKHvINXaR/g=; h=From:Date:Subject:To:CC:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=H6/4krIBnwY/TEWY5XtxXAeDfktS2/a13dm1Vl7JyfSiZ/N6bxXTksATKiPRfPwDZ mFzXgX/IQMD32ETzjrsKiWB6xXsaR29zV1esyBKWbDQlXpsFZ/iyrm6GxKznD2lOAZ BNnuqDz1NA2IvO8wVZYeMv1Qxgemw2nU/6CFbyAk= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 5010FF802E8; Thu, 23 Mar 2023 19:48:48 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 24B9DF802E8; Thu, 23 Mar 2023 19:48:44 +0100 (CET) Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id D94B9F800C9 for ; Thu, 23 Mar 2023 19:48:36 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D94B9F800C9 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=HqPjcFMX Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C7A24B821EA; Thu, 23 Mar 2023 18:48:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47367C433D2; Thu, 23 Mar 2023 18:48:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679597314; bh=0hW7ou4yKKzkx7XuuV6id7JupKItK72eoKHvINXaR/g=; h=From:Date:Subject:To:Cc:From; b=HqPjcFMXRRGfmNZl9SbWgq2UXbQeJguo7vNCSJgukRxSzyvtqDNFAMquWswFmBzKH xKjxAVul3SMHdelFUoroEgCTEup8RqTfB6AuIJhZD7V99jT7m7uZj6gHB9xyaibfke 16yOKZbQwh7/DcFD8S54E532ry0wKtfa47xkzA763w3wVtzJXmqoSnJTNP5XLLItVD +vMRp/P9gYE/gxlaTunFfOW3f5Jrz11gJsPImNvorSwCgM8jWmzazl5TurI1KHMSZp SsaZ01uswqS9vp5kYb/mZ3RBmvU0qZ6mB8cEPPj/dYTlYZ8IcKRjYKH8NUqvSNCgb7 vo5SKiIcvIQSQ== From: Mark Brown Date: Thu, 23 Mar 2023 18:48:28 +0000 Subject: [PATCH] kselftest/alsa - pcm-test: Don't include diagnostic message in test name MIME-Version: 1.0 Message-Id: <20230323-alsa-pcm-test-names-v1-1-8be67a8885ff@kernel.org> X-B4-Tracking: v=1; b=H4sIAPueHGQC/x2NQQqDQAwAvyI5N6C7WNp+pfSQjWkNraskYgvi3 117nIFhVnAxFYdbtYLJoq5jLtCcKuCe8ktQu8IQ6hDrGCLSxwknHnAWnzHTII6Ju9ik9nJmukI pE7lgMsrcH+13tPehJ5On/v6z+2PbdtOTZcx8AAAA To: Jaroslav Kysela , Takashi Iwai , Shuah Khan X-Mailer: b4 0.13-dev-bd1bf X-Developer-Signature: v=1; a=openpgp-sha256; l=1895; i=broonie@kernel.org; h=from:subject:message-id; bh=0hW7ou4yKKzkx7XuuV6id7JupKItK72eoKHvINXaR/g=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBkHJ8ArrjYNOz4WBOk/FnbKxWklUcuQ1FG7p5o1Iov 0w94Y92JATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZByfAAAKCRAk1otyXVSH0KVpB/ 95WrxkkhbtiPCEmm8bG8RydT5ktpFzt1qrLZy0inaBl/htzrlxQVvFAbskJnSTO6BUx9CXLR+NSe0/ GM6PZaRs9gxNBbJbDUYodigTluRSTvwOmS0veoiCrftnGSquU2nEIgy8N5A0oBFM4/LE9iUI/d8vr/ XFKowdpqHGO4vWuzrY1AN/xrFpngzgysx7TfGtZDRtEOc+or0zKV6LbFz3WVSsU6XgTZaOPxIjHAhM exjLO7OwyMT1RfMUbagFY/QcrBZ+RuiTgL3jtGed5of0fl+ShKjWlNxQxRF9hvOdbryCEMrOWdgz+B 3x+p8HCg5WPf8VSeyUK9chcrcBai/D X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Message-ID-Hash: C4OYCDNQL6AA5NSDUIMLMIYFI5524PZ6 X-Message-ID-Hash: C4OYCDNQL6AA5NSDUIMLMIYFI5524PZ6 X-MailFrom: broonie@kernel.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, linux-kselftest@vger.kernel.org, Mark Brown X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 --- tools/testing/selftests/alsa/pcm-test.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) --- base-commit: e8d018dd0257f744ca50a729e3d042cf2ec9da65 change-id: 20230323-alsa-pcm-test-names-bcd31b586ca9 Best regards, 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);