Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp452159rdb; Thu, 15 Feb 2024 05:28:48 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVDJNJSMAha90Jo89OiljLwN9ZDUR/GlMzkfM2WroTa4j6OW8dPdC+F6QFkbcuQkZT4s9rbogJXV9S06/W5hFnbc+GOhCOexTGb4jnPyw== X-Google-Smtp-Source: AGHT+IH6QSwKAtTS2Z/2Eob4+7bznzfVGj8/zpysMYZKb26I97H5s7VFop1Xv3gyoX67V3b5jKFk X-Received: by 2002:a25:d60a:0:b0:dc6:d7de:5b29 with SMTP id n10-20020a25d60a000000b00dc6d7de5b29mr1548739ybg.10.1708003727850; Thu, 15 Feb 2024 05:28:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708003727; cv=pass; d=google.com; s=arc-20160816; b=mUet5w9U3EBH6XIrSUN1S7Bm40+WtbY2claerwvkuR4yu/EyBoMn2gDp460C+16Qy1 yigRUtgaubKHPUFuVRGCArx47988dGz5HX/ilxicIyx/BttHUeGCLWjRyTEZ5wH0YawE 32iRg0vb+19H5OGuW5/x6hAjKq+lJ+OY6kCod/OdCAknFUbHjge5oHutqkbxGdnBDzkJ p5cxHUM/BP9CCabdgbdpoUhRaZQOXdhuCeY5lBaPVKFyHFFiaTLP541P2JO41ZpN1amF HR7ttCvKCy8zV2jK9JolZlYjCEmc48GOyYEtBG+prl+GyuHqN9291qHurcGFVvCtjh/I pKgg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=+qZs05fDLrVpJOykinunzvw0aTQ7fAely9B/z9ewZO8=; fh=OJDf3TiqVEoW7rf30cxWcXzCqmr2zPHL1ZpzugNz3Ss=; b=L9mwKuavj2HCmTsnwkzV4sl/uQVLVbQK7N+CPgHoDxic7sNbC8z/BfLyFs9L4gAyLg qe5fKK1KRkKB2YejxBFbeq9Ubl9n+iRzGU9oXtKdw0c7SUgluIByTw8zKB5WKjZwpaxD ixa/2t2eUZ0VBdsbdYTJp1PZY65S9d5vRaDgjU4WmXS6ZiS3t9yGyhjIVE7nfPCt4vHz XhWgx7OqRCMwF/uxg3gaQ7gHK/OsXgnmcaLRhxncotqrBRtDwMi4qXmqsxRQEuv4gkM3 VcYrPUzS4Q7HDW+FzlbDcV0N195iHi0km9VoefglW7x71pCSlXTVTlC675oqE/vDHhk9 WPOQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-66978-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66978-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id dw21-20020a05620a601500b007858e468ae8si1592440qkb.633.2024.02.15.05.28.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 05:28:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-66978-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-66978-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66978-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 990FB1C21B80 for ; Thu, 15 Feb 2024 13:28:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3B73E130E3C; Thu, 15 Feb 2024 13:28:30 +0000 (UTC) Received: from baptiste.telenet-ops.be (baptiste.telenet-ops.be [195.130.132.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B9D2D130E2D for ; Thu, 15 Feb 2024 13:28:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.130.132.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708003709; cv=none; b=ko7pE+6x8XJ/jmzEsquifbHkhz44f+iwVrYu9RkZYjXqNWimmOsiI2LjDc05eRRW8xHr/hooyUm4ZMPg9PwnrORtC4Xzv2AZuIAIFKQ3Rf/J+0AXrNeLNEyLoEjWQKjQ0dGVgV6fbLJpoQ+2X969+t6+9JroSt5dy2pBMMMYANg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708003709; c=relaxed/simple; bh=yErmxTR4sdF8IYbb0NbWHYGlmsiQdjhvfNimdEVhaeA=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=HLV3QnaKaQLGWLSywRQWhPH2hYlMhnbh4ravfutExBZr0F7ZLZNTLeqehKynHXlN/lTYNQ0ki0/8n7Wb3zVHagfIqv8SFoSCeGhY5MdSW3AyHAlulUOtMlVjqOG0CclUhd/JJVeAseSujhQ8xOQfNnnbHM+8soDzpkx2ixuL1fI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=none smtp.mailfrom=linux-m68k.org; arc=none smtp.client-ip=195.130.132.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux-m68k.org Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:ac52:3a54:2a84:d65a]) by baptiste.telenet-ops.be with bizsmtp id nRUJ2B0060LVNSS01RUJxk; Thu, 15 Feb 2024 14:28:18 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1rabmd-000gzE-2Y; Thu, 15 Feb 2024 14:28:18 +0100 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1rabmk-00HZka-E7; Thu, 15 Feb 2024 14:28:18 +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, Geert Uytterhoeven Subject: [PATCH resend] selftests: timers: clocksource-switch: Adapt progress to kselftest framework Date: Thu, 15 Feb 2024 14:28:17 +0100 Message-Id: <7960007c8517109b592995ad10a3058fbe5aae75.1708003520.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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