From: "tip-bot2 for Thomas Weißschuh" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: thomas.weissschuh@linutronix.de,
Thomas Gleixner <tglx@kernel.org>,
Andreas Larsson <andreas@gaisler.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: timers/vdso] selftests: vDSO: vdso_test_correctness: Handle different tv_usec types
Date: Wed, 11 Mar 2026 09:31:08 -0000 [thread overview]
Message-ID: <177322146821.1647592.4947808210328699801.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20260227-vdso-selftest-cleanups-v2-4-d84830fa8beb@linutronix.de>
The following commit has been merged into the timers/vdso branch of tip:
Commit-ID: b88e65e528dc5381131fc15761864470d723943c
Gitweb: https://git.kernel.org/tip/b88e65e528dc5381131fc15761864470d723943c
Author: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
AuthorDate: Fri, 27 Feb 2026 07:45:59 +01:00
Committer: Thomas Gleixner <tglx@kernel.org>
CommitterDate: Wed, 11 Mar 2026 10:27:40 +01:00
selftests: vDSO: vdso_test_correctness: Handle different tv_usec types
On SPARC the field tv_usec of 'struct timespec' is not a 'long int', but
only a regular int. In this case the format string is incorrect and will
trigger compiler warnings.
Avoid the warnings by casting to 'long long', similar to how it is done for
the tv_sec and what the other similar selftests are doing.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Tested-by: Andreas Larsson <andreas@gaisler.com>
Reviewed-by: Andreas Larsson <andreas@gaisler.com>
Link: https://patch.msgid.link/20260227-vdso-selftest-cleanups-v2-4-d84830fa8beb@linutronix.de
---
tools/testing/selftests/vDSO/vdso_test_correctness.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/vDSO/vdso_test_correctness.c b/tools/testing/selftests/vDSO/vdso_test_correctness.c
index 2a2d9b0..9b56488 100644
--- a/tools/testing/selftests/vDSO/vdso_test_correctness.c
+++ b/tools/testing/selftests/vDSO/vdso_test_correctness.c
@@ -404,10 +404,10 @@ static void test_gettimeofday(void)
return;
}
- printf("\t%llu.%06ld %llu.%06ld %llu.%06ld\n",
- (unsigned long long)start.tv_sec, start.tv_usec,
- (unsigned long long)vdso.tv_sec, vdso.tv_usec,
- (unsigned long long)end.tv_sec, end.tv_usec);
+ printf("\t%llu.%06lld %llu.%06lld %llu.%06lld\n",
+ (unsigned long long)start.tv_sec, (long long)start.tv_usec,
+ (unsigned long long)vdso.tv_sec, (long long)vdso.tv_usec,
+ (unsigned long long)end.tv_sec, (long long)end.tv_usec);
if (!tv_leq(&start, &vdso) || !tv_leq(&vdso, &end)) {
printf("[FAIL]\tTimes are out of sequence\n");
next prev parent reply other threads:[~2026-03-11 9:31 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-27 6:45 [PATCH v2 0/6] selftests: vDSO: Assorted cleanups and improvements Thomas Weißschuh
2026-02-27 6:45 ` [PATCH v2 1/6] Revert "selftests: vDSO: parse_vdso: Use UAPI headers instead of libc headers" Thomas Weißschuh
2026-03-11 9:31 ` [tip: timers/vdso] " tip-bot2 for Thomas Weißschuh
2026-03-11 14:51 ` tip-bot2 for Thomas Weißschuh
2026-02-27 6:45 ` [PATCH v2 2/6] selftests: vDSO: vdso_test_gettimeofday: Remove nolibc checks Thomas Weißschuh
2026-03-11 9:31 ` [tip: timers/vdso] " tip-bot2 for Thomas Weißschuh
2026-03-11 14:51 ` tip-bot2 for Thomas Weißschuh
2026-02-27 6:45 ` [PATCH v2 3/6] selftests: vDSO: vdso_test_correctness: Drop SYS_getcpu fallbacks Thomas Weißschuh
2026-03-11 9:31 ` [tip: timers/vdso] " tip-bot2 for Thomas Weißschuh
2026-03-11 14:51 ` tip-bot2 for Thomas Weißschuh
2026-02-27 6:45 ` [PATCH v2 4/6] selftests: vDSO: vdso_test_correctness: Handle different tv_usec types Thomas Weißschuh
2026-03-11 9:31 ` tip-bot2 for Thomas Weißschuh [this message]
2026-03-11 14:51 ` [tip: timers/vdso] " tip-bot2 for Thomas Weißschuh
2026-02-27 6:46 ` [PATCH v2 5/6] selftests: vDSO: vdso_test_correctness: Use facilities from parse_vdso.c Thomas Weißschuh
2026-03-11 9:31 ` [tip: timers/vdso] " tip-bot2 for Thomas Weißschuh
2026-03-11 14:51 ` tip-bot2 for Thomas Weißschuh
2026-02-27 6:46 ` [PATCH v2 6/6] selftests: vDSO: vdso_test_correctness: Add a test for time() Thomas Weißschuh
2026-03-11 9:31 ` [tip: timers/vdso] " tip-bot2 for Thomas Weißschuh
2026-03-11 14:51 ` tip-bot2 for Thomas Weißschuh
-- strict thread matches above, loose matches on Subject: below --
2025-10-14 6:48 [PATCH v4 01/35] selftests: vDSO: vdso_test_correctness: Handle different tv_usec types Thomas Weißschuh
2025-11-01 19:48 ` [tip: timers/vdso] " tip-bot2 for Thomas Weißschuh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=177322146821.1647592.4947808210328699801.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=andreas@gaisler.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=tglx@kernel.org \
--cc=thomas.weissschuh@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®