From nobody Tue Sep 29 06:11:03 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 F412B3B14CD; Tue, 11 Aug 2026 16:14:02 +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=1786464844; cv=none; b=JGrstT0Ho0Dom96uGWTEetyOSzjKEcIsGjpndIRb5a8O2cMmusEH87tethFq6HMeOQJblhF9P7wJWNBMdXCdC2ALIxk9X1QwvUWlAdaYtuOU4ecsXxs3IzMLINgCIWLU24IpE+O0L7wtgzB0kjIq5MxaXxE5vEsTY5Au69r0hag= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786464844; c=relaxed/simple; bh=1c7kT697X+nmr6BCRZIG6Qf1JpeKiSH3Z+yKp+tq9HY=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=NL2lZm+gv26Ee1/+wml77kznHVaHJuMQzRIFhHRcutaUGX0NM9DXeFinBO16bExDQdC9gbWUR7tibgAIpH0ZinJLlFRBJV0aByZNSDWTXOck2ql3nCWtvL/8xcJPYMPfohQFVrS25Xd3zQGUyV4Tp7yWoDZp4tDms4VdgTfFI3Q= 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=uubmXIjh; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=udMgJq+k; 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="uubmXIjh"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="udMgJq+k" Date: Tue, 11 Aug 2026 16:13:59 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1786464840; 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=1GqVDpOvNsNQMFu+W3YmDpv7NsEq2HgPw1qbdBATRRY=; b=uubmXIjhJ8XOTm8FHYBe5Ma1GVMxN6RU6SIMlOU3PHS1WIsgQWnF4g+Doq6N0WR1WmQUX4 1Ki7+3jq0eT0RMSWdZiEpcm3wScyWAS29VSVpfAN0j1ajipa83E7DJxRgKTp0GwwX1qq2Z Q2VSZGDBKMdjSMfX1D7INojm0DQxFfOvys6CMhbWN12HekC7u0aO1i5vpNW0r8oB8HfXz9 UWuW+PrwkUuePAlfzuSwcmyOrHVmfVNtksPaXr3D/kYX2QOC5EwyQQt0d1ULo8UXEBWAx1 7OKdm1DGb3eXXZHndhsddhtSUlb1cgwMgUDF3N95SKVMc2kqIQEuFp5EZ2wuNA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1786464840; 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=1GqVDpOvNsNQMFu+W3YmDpv7NsEq2HgPw1qbdBATRRY=; b=udMgJq+kAHzYwSVSG2WGtte1bnd44SSs94rrOSxFNNfYbSWBGnndn+x2YiEELkbVz/+mgi qrGM+J6wSPdXmSDQ== 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: Check all calls to clock_nanosleep() and clock_gettime() 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-17-910cbd485390@linutronix.de> References: <20260803-auxclock-nanosleep-prep-v2-17-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: <178646483921.442315.17733103485042357926.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: 4fa377c19e111c539a530a8200996b911ceff9ff Gitweb: https://git.kernel.org/tip/4fa377c19e111c539a530a8200996b911= ceff9ff Author: Thomas Wei=C3=9Fschuh (Schneider Electric) AuthorDate: Mon, 03 Aug 2026 12:04:48 +02:00 Committer: Thomas Gleixner CommitterDate: Tue, 11 Aug 2026 18:11:21 +02:00 selftests: timers: nsleep-lat: Check all calls to clock_nanosleep() and clo= ck_gettime() Both these functions can fail. The first calls to those functions are already checked and result in KSFT_SKIP. If they start failing afterwards unexpectedly, report a hard error. 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-17-910cb= d485390@linutronix.de --- tools/testing/selftests/timers/nsleep-lat.c | 23 +++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/tools/testing/selftests/timers/nsleep-lat.c b/tools/testing/se= lftests/timers/nsleep-lat.c index 266ca0c..5de0051 100644 --- a/tools/testing/selftests/timers/nsleep-lat.c +++ b/tools/testing/selftests/timers/nsleep-lat.c @@ -65,10 +65,16 @@ int nanosleep_lat_test(int clockid, long long ns) count =3D 10; =20 /* First check relative latency */ - clock_gettime(clockid, &start); - for (i =3D 0; i < count; i++) - clock_nanosleep(clockid, 0, &target, NULL); - clock_gettime(clockid, &end); + if (clock_gettime(clockid, &start)) + return KSFT_FAIL; + + for (i =3D 0; i < count; i++) { + if (clock_nanosleep(clockid, 0, &target, NULL)) + return KSFT_FAIL; + } + + if (clock_gettime(clockid, &end)) + return KSFT_FAIL; =20 if (((timespec_sub(start, end)/count)-ns) > UNRESONABLE_LATENCY) { ksft_print_msg("Large rel latency: %lld ns :", (timespec_sub(start, end)= /count)-ns); @@ -77,10 +83,13 @@ int nanosleep_lat_test(int clockid, long long ns) =20 /* Next check absolute latency */ for (i =3D 0; i < count; i++) { - clock_gettime(clockid, &start); + if (clock_gettime(clockid, &start)) + return KSFT_FAIL; target =3D timespec_add(start, ns); - clock_nanosleep(clockid, TIMER_ABSTIME, &target, NULL); - clock_gettime(clockid, &end); + if (clock_nanosleep(clockid, TIMER_ABSTIME, &target, NULL)) + return KSFT_FAIL; + if (clock_gettime(clockid, &end)) + return KSFT_FAIL; latency +=3D timespec_sub(target, end); } =20