From nobody Tue Sep 29 06:09:19 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 505E23F4DDC; Tue, 11 Aug 2026 16:14:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786464846; cv=none; b=VeQsAx5jogAfEtl/D0erpM+ef6ilPPw1DbVXCgRlBY8TjFvpxX0uwLYm2PhFiP1vN2YnoEefpgaOaTdQxf2bCHP/m3Uwi0InlfF38pISoGlr5SZVJ8nss6slNRhcA8F5SNuykSY/sZ1Z3eb43Q/cKyMvq87mhJwt9vM/VaQStVs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786464846; c=relaxed/simple; bh=wI4Z3nXfPwlBi7a9vMLkAve74DQRfA0XeEVrTP52RUw=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=Xm6VRLCeFRu6XVuy2LzMNvwEbTAuWGcHxEn6LFBzVNPllTahns5YDx/mfV92JHoDXFDjP86enhfZKuwNNXNOWvCLIklOPDEdb95WZitUk17vyLLDREv8BPODTEjVebRIEMqAbl07bzdwc/1CLTDcVeMIvm85ihNrMwF1LULn8OA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=uBIzEaG/; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ByW1Cq/o; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="uBIzEaG/"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ByW1Cq/o" Date: Tue, 11 Aug 2026 16:14:01 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1786464843; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vnEk0dZ3yYKQusn8rG4kZctsAUsFxTgmDbtK713vFeA=; b=uBIzEaG/wSIKwTtFAN3DbIfmJzn3w3z91P9oaoPaH7ba+MMj2cMxEtndKcyIoTAAvlpNj2 xL/iehp7lSFAXXMBxj+VOqf/v0utHnXFixB75qu62PvBL38z02SFbYKdJ62vYSLcqtS0N+ 7DMmyVZgqG1SCqBBvZ7Msf/buJvT/ZR0mWRaFI3cYeudqMfYWajXua63jU6z1YqNIh8kud NBRQ7Pa02LOnAomqt9JmCANbKoLtFACMGx4Hu57KcwV4GXmNmjno6MLa1DI0cKKHg/82EY /WsTvQ3TfjI00JdNGuglDhPK23TiRsHjEOzowSjXJmWZGNpEEZKf16FZJQQoEA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1786464843; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vnEk0dZ3yYKQusn8rG4kZctsAUsFxTgmDbtK713vFeA=; b=ByW1Cq/owtsVLbFOrrXR7f0UDD5+fVZeJw0ZjMe3fttBq52v7r2DrcYI8/jA3XfJ4hSlcb EDlEbCCasaijqDAg== From: tip-bot2 for Thomas =?utf-8?q?Wei=C3=9Fschuh_=28Schneider_Electric=29?= Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] selftests: timers: nsleep-lat: Explicitly list the tested clocks Cc: thomas.weissschuh@linutronix.de, Thomas Gleixner , John Stultz , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260803-auxclock-nanosleep-prep-v2-15-910cbd485390@linutronix.de> References: <20260803-auxclock-nanosleep-prep-v2-15-910cbd485390@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <178646484195.442315.11475338779514364889.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the timers/core branch of tip: Commit-ID: 187ac443ed51e04dcf0df98d270863c3f54af8fc Gitweb: https://git.kernel.org/tip/187ac443ed51e04dcf0df98d270863c3f= 54af8fc Author: Thomas Wei=C3=9Fschuh (Schneider Electric) AuthorDate: Mon, 03 Aug 2026 12:04:46 +02:00 Committer: Thomas Gleixner CommitterDate: Tue, 11 Aug 2026 18:11:21 +02:00 selftests: timers: nsleep-lat: Explicitly list the tested clocks The test relies on the numeric values of the clockids. As not all clocks are meant to be tested, this requires skipping some clocks unconditionally, cluttering the result. Use an equivalent, explicit list instead. In addition to CLOCK_PROCESS_CPUTIME_ID, CLOCK_THREAD_CPUTIME_ID and CLOCK_HWSPECIFIC which were unconditionally skipped before, this also unconditionally skips CLOCK_MONOTONIC_RAW, CLOCK_MONOTONIC_COARSE and CLOCK_REALTIME_COARSE. clock_nanosleep() is not supported for those. Signed-off-by: Thomas Wei=C3=9Fschuh (Schneider Electric) Signed-off-by: Thomas Gleixner Acked-by: John Stultz Link: https://patch.msgid.link/20260803-auxclock-nanosleep-prep-v2-15-910cb= d485390@linutronix.de --- tools/testing/selftests/timers/nsleep-lat.c | 26 +++++++++----------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/tools/testing/selftests/timers/nsleep-lat.c b/tools/testing/se= lftests/timers/nsleep-lat.c index d46f174..af47c28 100644 --- a/tools/testing/selftests/timers/nsleep-lat.c +++ b/tools/testing/selftests/timers/nsleep-lat.c @@ -29,9 +29,6 @@ =20 #define UNRESONABLE_LATENCY (40 * NSEC_PER_MSEC) =20 -/* CLOCK_HWSPECIFIC =3D=3D CLOCK_SGI_CYCLE (Deprecated) */ -#define CLOCK_HWSPECIFIC 10 - #define UNSUPPORTED 0xf00f =20 struct timespec timespec_add(struct timespec ts, unsigned long long ns) @@ -97,24 +94,25 @@ int nanosleep_lat_test(int clockid, long long ns) return 0; } =20 -#define SKIPPED_CLOCK_COUNT 3 - int main(int argc, char **argv) { long long length; int clockid, ret; - int max_clocks =3D CLOCK_TAI + 1; =20 - ksft_print_header(); - ksft_set_plan(max_clocks - CLOCK_REALTIME - SKIPPED_CLOCK_COUNT); + static const clockid_t tested_clocks[] =3D { + CLOCK_REALTIME, + CLOCK_MONOTONIC, + CLOCK_BOOTTIME, + CLOCK_BOOTTIME_ALARM, + CLOCK_REALTIME_ALARM, + CLOCK_TAI, + }; =20 - for (clockid =3D CLOCK_REALTIME; clockid < max_clocks; clockid++) { + ksft_print_header(); + ksft_set_plan(ARRAY_SIZE(tested_clocks)); =20 - /* Skip cputime clockids since nanosleep won't increment cputime */ - if (clockid =3D=3D CLOCK_PROCESS_CPUTIME_ID || - clockid =3D=3D CLOCK_THREAD_CPUTIME_ID || - clockid =3D=3D CLOCK_HWSPECIFIC) - continue; + for (size_t clock_index =3D 0; clock_index < ARRAY_SIZE(tested_clocks); c= lock_index++) { + clockid =3D tested_clocks[clock_index]; =20 length =3D 10; while (length <=3D (NSEC_PER_SEC * 10)) {