Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1859646rdb; Thu, 7 Dec 2023 10:33:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IHgo25oEJ6zYuLSYL4HsnhSAJCDdq86KdboMZPkO7YRmj8xxduq7OBoK2HDEAM7ZkhfqldH X-Received: by 2002:a05:6a21:a598:b0:190:c99:cfb1 with SMTP id gd24-20020a056a21a59800b001900c99cfb1mr1290861pzc.22.1701974019669; Thu, 07 Dec 2023 10:33:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701974019; cv=none; d=google.com; s=arc-20160816; b=SSCfO0yoB6V8tW8mTaToz3nvhT2O4aEXPqQA9cU/SYWz7aIe8GW9f158fONaCjLrOA Gkpei7K9fjqYMvnHJb+uOHWmeUHVjDGl3971Kyg0OohRhyRenB2wpQTdk+qGd6AWXn5h VQzndunTgTpuD45Hndtu06bePwh1gMThjh9LD9c/r8KNxnkfH5VyPGEOh/oXuvz7+LqJ rb4Q997n4UO2/etqHa2qmc160wABKHxhjLbJFUiQhc5eyLMvBWPykggNFnr3GPrVOSMS 6VOfa11gRrUt87NyLPUVtdxWeV8RasLhghs2fS39HDY9bl/PUN6j45A6BlbYubMD3AGL a0kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=+qZs05fDLrVpJOykinunzvw0aTQ7fAely9B/z9ewZO8=; fh=1+vlmbgdzJlAyAqZD2UNtpBDiPC6HSr7DWHQ9dBR1tI=; b=D9ttAb1ZsD54EYpFd990rykmJzb/d83qrSm5nBITI1T9zaN9S2uOlONAzP6FVQTfoh N8ZZDpZJNwt61crjzOUQBsFUJb5dqpc4ZB1bNUo082KBg9b6lB8rziC6JQeLT7ONt6oZ oRCh4grFh2v9HpcvCfRRO2CkDPsSHNFoIR6m54BWeUC/UdD4k/1Ll2nZ6KRLMyrKhjWk CfRqTcIt9d30Af4nwJIGfnLv55Hu+eLZi7atOo0FC8yt+G3uyMKXmsDlrriNBDpN5PBb uCLiYI1HAFsywI7nUSgtU+ZCia4vCmbfjtX/FoNq3jBsHLmYccLs7iNDshLkS7hAv27U RrEw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id o9-20020a655209000000b005b8ee1c0c67si99346pgp.594.2023.12.07.10.33.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 10:33:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 6769A82E8769; Thu, 7 Dec 2023 10:33:37 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230239AbjLGSdP (ORCPT + 99 others); Thu, 7 Dec 2023 13:33:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229806AbjLGSdP (ORCPT ); Thu, 7 Dec 2023 13:33:15 -0500 Received: from xavier.telenet-ops.be (xavier.telenet-ops.be [IPv6:2a02:1800:120:4::f00:14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94179E0 for ; Thu, 7 Dec 2023 10:33:19 -0800 (PST) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:f5c7:c244:a7e3:47bf]) by xavier.telenet-ops.be with bizsmtp id KWZG2B00S2nBfCd01WZGRb; Thu, 07 Dec 2023 19:33:17 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1rBJB7-00BL2d-Md; Thu, 07 Dec 2023 19:33:16 +0100 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1rBJBU-003ZDD-Az; Thu, 07 Dec 2023 19:33:16 +0100 From: Geert Uytterhoeven To: John Stultz , Thomas Gleixner , Stephen Boyd , Shuah Khan , Wolfram Sang , =?UTF-8?q?Niklas=20S=C3=B6derlund?= Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] selftests: timers: clocksource-switch: Adapt progress to kselftest framework Date: Thu, 7 Dec 2023 19:33:10 +0100 Message-Id: <6d7a665392e75c0af8fd4ad5b95bd3f0489236ee.1701973869.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 07 Dec 2023 10:33:37 -0800 (PST) When adapting the test to the kselftest framework, a few printf() calls indicating test progress were not updated. Fix this by replacing these printf() calls by ksft_print_msg() calls. Fixes: ce7d101750ff8450 ("selftests: timers: clocksource-switch: adapt to kselftest framework") Signed-off-by: Geert Uytterhoeven --- When just running the test, the output looks like: # Validating clocksource arch_sys_counter TAP version 13 1..12 ok 1 CLOCK_REALTIME ... # Validating clocksource ffca0000.timer TAP version 13 1..12 ok 1 CLOCK_REALTIME ... When redirecting the test output to a file, the progress prints are not interspersed with the test output, but collated at the end: TAP version 13 1..12 ok 1 CLOCK_REALTIME ... TAP version 13 1..12 ok 1 CLOCK_REALTIME ... # Totals: pass:6 fail:0 xfail:0 xpass:0 skip:6 error:0 # Validating clocksource arch_sys_counter # Validating clocksource ffca0000.timer ... This makes it hard to match the test results with the timer under test. Is there a way to fix this? The test does use fork(). Thanks! --- tools/testing/selftests/timers/clocksource-switch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/timers/clocksource-switch.c b/tools/testing/selftests/timers/clocksource-switch.c index c5264594064c8516..83faa4e354e389c2 100644 --- a/tools/testing/selftests/timers/clocksource-switch.c +++ b/tools/testing/selftests/timers/clocksource-switch.c @@ -156,8 +156,8 @@ int main(int argc, char **argv) /* Check everything is sane before we start switching asynchronously */ if (do_sanity_check) { for (i = 0; i < count; i++) { - printf("Validating clocksource %s\n", - clocksource_list[i]); + ksft_print_msg("Validating clocksource %s\n", + clocksource_list[i]); if (change_clocksource(clocksource_list[i])) { status = -1; goto out; @@ -169,7 +169,7 @@ int main(int argc, char **argv) } } - printf("Running Asynchronous Switching Tests...\n"); + ksft_print_msg("Running Asynchronous Switching Tests...\n"); pid = fork(); if (!pid) return run_tests(runtime); -- 2.34.1