All of lore.kernel.org
 help / color / mirror / Atom feed
From: "tip-bot2 for Oleg Nesterov" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Mark Brown <broonie@kernel.org>, Oleg Nesterov <oleg@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: timers/urgent] selftests: kselftest: Fix build failure with NOLIBC
Date: Fri, 12 Apr 2024 14:58:56 -0000	[thread overview]
Message-ID: <171293393654.10875.10737366810353639391.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20240412123536.GA32444@redhat.com>

The following commit has been merged into the timers/urgent branch of tip:

Commit-ID:     16767502aa990cca2cb7d1372b31d328c4c85b40
Gitweb:        https://git.kernel.org/tip/16767502aa990cca2cb7d1372b31d328c4c85b40
Author:        Oleg Nesterov <oleg@redhat.com>
AuthorDate:    Fri, 12 Apr 2024 14:35:36 +02:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Fri, 12 Apr 2024 16:55:00 +02:00

selftests: kselftest: Fix build failure with NOLIBC

As Mark explains ksft_min_kernel_version() can't be compiled with nolibc,
it doesn't implement uname().

Fixes: 6d029c25b71f ("selftests/timers/posix_timers: Reimplement check_timer_distribution()")
Reported-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240412123536.GA32444@redhat.com
Closes: https://lore.kernel.org/all/f0523b3a-ea08-4615-b0fb-5b504a2d39df@sirena.org.uk/
---
 tools/testing/selftests/kselftest.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/testing/selftests/kselftest.h b/tools/testing/selftests/kselftest.h
index 0591974..7b89362 100644
--- a/tools/testing/selftests/kselftest.h
+++ b/tools/testing/selftests/kselftest.h
@@ -395,6 +395,10 @@ static inline __noreturn __printf(1, 2) int ksft_exit_skip(const char *msg, ...)
 static inline int ksft_min_kernel_version(unsigned int min_major,
 					  unsigned int min_minor)
 {
+#ifdef NOLIBC
+	ksft_print_msg("NOLIBC: Can't check kernel version: Function not implemented\n");
+	return 0;
+#else
 	unsigned int major, minor;
 	struct utsname info;
 
@@ -402,6 +406,7 @@ static inline int ksft_min_kernel_version(unsigned int min_major,
 		ksft_exit_fail_msg("Can't parse kernel version\n");
 
 	return major > min_major || (major == min_major && minor >= min_minor);
+#endif
 }
 
 #endif /* __KSELFTEST_H */

  reply	other threads:[~2024-04-12 14:58 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-16 12:30 [PATCH v6 1/2] posix-timers: Prefer delivery of signals to the current thread Marco Elver
2023-03-16 12:30 ` [PATCH v6 2/2] selftests/timers/posix_timers: Test delivery of signals across threads Marco Elver
2023-04-16  7:04   ` [tip: timers/core] " tip-bot2 for Dmitry Vyukov
2024-04-06 20:53   ` [PATCH v6 2/2] " Muhammad Usama Anjum
2024-04-06 21:13     ` Oleg Nesterov
2024-04-06 21:32       ` Muhammad Usama Anjum
2023-03-30 10:19 ` [PATCH v6 1/2] posix-timers: Prefer delivery of signals to the current thread Marco Elver
2023-04-06 14:12 ` Marco Elver
2023-04-06 15:13   ` Frederic Weisbecker
2023-04-06 20:22 ` Peter Zijlstra
2023-04-16  7:04 ` [tip: timers/core] " tip-bot2 for Dmitry Vyukov
2024-04-01 20:17 ` [PATCH v6 1/2] " John Stultz
2024-04-02  9:07   ` Dmitry Vyukov
2024-04-02 14:57   ` Thomas Gleixner
2024-04-02 17:23     ` John Stultz
2024-04-03 12:41       ` Thomas Gleixner
2024-04-03 15:03         ` Oleg Nesterov
2024-04-03 15:43           ` Thomas Gleixner
2024-04-03 16:32             ` Thomas Gleixner
2024-04-03 18:16               ` John Stultz
2024-04-03 19:09                 ` Thomas Gleixner
2024-04-03 19:35                   ` John Stultz
2024-04-03 22:24                     ` Thomas Gleixner
2024-04-04 14:54                       ` Oleg Nesterov
2024-04-04 18:08                         ` Thomas Gleixner
2024-04-06 15:09                           ` [PATCH] selftests/timers/posix_timers: reimplement check_timer_distribution() Oleg Nesterov
2024-04-06 15:10                             ` Oleg Nesterov
2024-04-06 22:00                               ` Thomas Gleixner
2024-04-08  8:30                               ` Dmitry Vyukov
2024-04-08 10:01                                 ` Thomas Gleixner
2024-04-08 10:26                                 ` Oleg Nesterov
2024-04-08 18:49                                   ` Oleg Nesterov
2024-04-08 22:17                                     ` Thomas Gleixner
2024-04-09 11:10                                       ` Oleg Nesterov
2024-04-09 11:45                                         ` Dmitry Vyukov
2024-04-09 12:02                                         ` Thomas Gleixner
2024-04-09 13:38                                           ` [PATCH v2] " Oleg Nesterov
2024-04-09 15:57                                             ` [tip: timers/urgent] selftests/timers/posix_timers: Reimplement check_timer_distribution() tip-bot2 for Oleg Nesterov
2024-04-10 22:21                                             ` [PATCH v2] selftests/timers/posix_timers: reimplement check_timer_distribution() John Stultz
2024-04-10 22:31                                               ` Thomas Gleixner
2024-04-10 22:33                                                 ` John Stultz
2024-04-11 12:41                             ` [PATCH] " Mark Brown
2024-04-11 15:33                               ` John Stultz
2024-04-11 12:44                             ` Mark Brown
2024-04-11 14:17                               ` Thomas Gleixner
2024-04-11 15:50                                 ` Oleg Nesterov
2024-04-11 16:03                                   ` Mark Brown
2024-04-12 12:35                               ` [PATCH] selftests: fix build failure with NOLIBC Oleg Nesterov
2024-04-12 14:58                                 ` tip-bot2 for Oleg Nesterov [this message]
2024-04-14  7:42                                 ` Mark Brown
2024-04-04  8:55             ` [PATCH v6 1/2] posix-timers: Prefer delivery of signals to the current thread Dmitry Vyukov
2024-04-04 13:43               ` Oleg Nesterov
2024-04-04 15:10                 ` Thomas Gleixner
2024-04-04 15:23                   ` Oleg Nesterov
2024-04-05  4:28                 ` Dmitry Vyukov

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=171293393654.10875.10737366810353639391.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=tglx@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.