Hi Sergio,
On Sun, Apr 27, 2025 at 09:10:09PM +0200, Sergio González Collado wrote:
> The kunit test that checks the longests symbol length [1], has triggered
> warnings in some CI pilelines when symbol prefixes are used [2]. The test
> is adjusted to depend on !CONFIG_PREFIX_SYMBOLS as sujested i
On Wed, Jul 03, 2024 at 08:04:52PM -0700, John Hubbard wrote:
> Current practice in the selftests Makefiles is to use $(LLVM) as a way
> to decide if clang is being used as the compiler (and/or the linker
> front end). Unfortunately, this does not cover all of the use cases:
>
> 1) CC could have b
On Fri, Jun 07, 2024 at 12:12:19PM +0100, Ryan Roberts wrote:
> On 04/06/2024 05:55, John Hubbard wrote:
> > On 6/3/24 3:47 PM, Nathan Chancellor wrote:
> >> Does CC=clang even work for the selftests? lib.mk here uses 'CC :=' so
> >> won't CC=clan
]
> 108 | #define LONG_MIN (-LONG_MAX - 1)
> | ^
> prebuilts/clang/host/linux-x86/clang-r522817/lib/clang/18/include/limits.h:52:9:
> note: previous definition is here
>52 | #define LONG_MIN (-__LONG_MAX__ -1L)
> | ^
>
> Signed-off-by: Edw
On Mon, Jun 03, 2024 at 04:32:30PM +0100, Mark Brown wrote:
> On Fri, May 31, 2024 at 11:37:50AM -0700, John Hubbard wrote:
> > The kselftests may be built in a couple different ways:
> > make LLVM=1
> > make CC=clang
> >
> > In order to handle both cases, set LLVM=1 if CC=clang. That way,
ght not be
> obvious.
>
> Cc: Ryan Roberts
> Signed-off-by: John Hubbard
Assuming that $(LLVM) is the correct conditional to test for:
Reviewed-by: Nathan Chancellor
> ---
> tools/testing/selftests/fchmodat2/Makefile | 11 ++-
> 1 file changed, 10 insertions(+),
;
> Fix this by using selftests/lib.mk facilities for tracking local header
> file dependencies: add them to LOCAL_HDRS, leaving only the .c files to
> be passed to the compiler.
>
> Reviewed-by: Ryan Roberts
> Signed-off-by: John Hubbard
Assuming that $(LLVM) is the correct condi
;
> Fix this by using selftests/lib.mk facilities for tracking local header
> file dependencies: add them to LOCAL_HDRS, leaving only the .c files to
> be passed to the compiler.
>
> Reviewed-by: Ryan Roberts
> Signed-off-by: John Hubbard
Assuming that $(LLVM) is the correct condi
ese files:
>
> ./net/af_unix/scm_rights.c
> ./net/timestamping.c
> ./net/ipsec.c
> ./user_events/perf_test.c
>
> Cc: Nathan Chancellor
> Signed-off-by: John Hubbard
This seems reasonable to me.
Acked-by: Nathan Chancellor
> ---
> tools/testing/
On Mon, May 27, 2024 at 02:36:41PM -0700, John Hubbard wrote:
> When building with clang, via:
>
> make LLVM=1 -C tools/testing/selftest
>
> ...clang warns that "a variable sized type not at the end of a struct or
> class is a GNU extension".
>
> These cases are not easily changed, because t
On Tue, May 28, 2024 at 01:28:33PM -0700, Nathan Chancellor wrote:
> Hi John,
>
> On Mon, May 27, 2024 at 02:47:04PM -0700, John Hubbard wrote:
> > When building with clang, via:
> >
> > make LLVM=1 -C tools/testing/selftest
> >
> > ...clang warns
Hi John,
On Mon, May 27, 2024 at 02:47:04PM -0700, John Hubbard wrote:
> When building with clang, via:
>
> make LLVM=1 -C tools/testing/selftest
>
> ...clang warns about "taking address of packed member 'write_index' ".
> This is not particularly helpful, because the test code really wants
ly in my opinion, as Python will
already be available (which is the only dependency of
gen_compile_commands.py as far as I am aware) and it should not take
that long to generate.
Reviewed-by: Nathan Chancellor
> ---
> tools/testing/kunit/kunit_kernel.py | 3 ++-
> 1 file changed, 2 insertions(+
nd a few
> errors (some tests have -Werror set).
>
> [1]
> https://lore.kernel.org/all/20240329-selftests-libmk-llvm-rfc-v1-1-2f9ed7d1c...@valentinobst.de/
>
> Cc: Valentin Obst
> Cc: Kees Cook
> Cc: Nick Desaulniers
> Cc: Nathan Chancellor
> Cc: Shuah Khan
rogram will terminate upon calling these functions
(which is what the comment alluded to as well).
Reviewed-by: Muhammad Usama Anjum
Reviewed-by: Thomas Gleixner
Signed-off-by: Nathan Chancellor
---
tools/testing/selftests/sync/sync_test.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
d
ned up
properly, change the types of the ksft_exit...() functions to void to
match their __noreturn nature.
Reviewed-by: Muhammad Usama Anjum
Reviewed-by: Thomas Gleixner
Signed-off-by: Nathan Chancellor
---
tools/testing/selftests/kselftest.h | 12 ++--
1 file changed, 6 insertions(+), 6
rogram will terminate upon calling these functions.
Reviewed-by: Muhammad Usama Anjum
Reviewed-by: Thomas Gleixner
Signed-off-by: Nathan Chancellor
---
tools/testing/selftests/x86/lam.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/x86/lam.c
b
the program will terminate upon calling these
functions.
Reviewed-by: Muhammad Usama Anjum
Reviewed-by: Thomas Gleixner
Signed-off-by: Nathan Chancellor
---
Cc: anna-ma...@linutronix.de
Cc: frede...@kernel.org
Cc: t...@linutronix.de
Cc: jstu...@google.com
Cc: sb...@kernel.org
---
tools/testing/se
rogram will terminate upon calling these
functions.
Reviewed-by: Muhammad Usama Anjum
Reviewed-by: Thomas Gleixner
Signed-off-by: Nathan Chancellor
---
Cc: fenghua...@intel.com
Cc: reinette.cha...@intel.com
---
tools/testing/selftests/resctrl/resctrl_tests.c | 6 +++---
1 file changed, 3 insertion
because the program will terminate
upon calling these functions.
Just removing 'return' would have resulted in
!ret ? ksft_exit_pass() : ksft_exit_fail();
so convert that into the more idiomatic
if (ret)
ksft_exit_fail();
ksft_exit_pass();
Reviewed-by: Muhammad Usama Anjum
R
the program will terminate upon calling these
functions.
Reviewed-by: Muhammad Usama Anjum
Reviewed-by: Thomas Gleixner
Signed-off-by: Nathan Chancellor
---
Cc: a...@linux-foundation.org
Cc: linux...@kvack.org
---
tools/testing/selftests/mm/compaction_test.c | 6 +++---
tools/testing
rogram will terminate upon calling these
functions.
Reviewed-by: Muhammad Usama Anjum
Reviewed-by: Thomas Gleixner
Signed-off-by: Nathan Chancellor
---
tools/testing/selftests/membarrier/membarrier_test_multi_thread.c | 2 +-
tools/testing/selftests/membarrier/membarrier_test_single_thread.c | 2
the program will terminate upon calling these
functions.
Reviewed-by: Muhammad Usama Anjum
Reviewed-by: Thomas Gleixner
Signed-off-by: Nathan Chancellor
---
tools/testing/selftests/ipc/msgque.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/tools/testing/selftests
view on patch split, as there
were no functional changes, please holler if this was inappropriate.
- Link to v1:
https://lore.kernel.org/r/20240417-ksft-exit-int-to-void-v1-1-eff48fdba...@kernel.org
---
Nathan Chancellor (10):
selftests/clone3: ksft_exit functions do not return
because the program will terminate
upon calling these functions.
Just removing 'return' would have resulted in
!ret ? ksft_exit_pass() : ksft_exit_fail();
so convert that into the more idiomatic
if (ret)
ksft_exit_fail();
ksft_exit_pass();
Reviewed-by: Muhammad Usama Anjum
R
On Wed, Apr 24, 2024 at 10:00:12AM -0600, Shuah Khan wrote:
> On 4/24/24 09:05, Nathan Chancellor wrote:
> > On Wed, Apr 24, 2024 at 07:44:31AM -0600, Shuah Khan wrote:
> > > On 4/17/24 09:37, Nathan Chancellor wrote:
> > > > Commit f7d5bcd35d42 ("selfte
On Wed, Apr 24, 2024 at 07:44:31AM -0600, Shuah Khan wrote:
> On 4/17/24 09:37, Nathan Chancellor wrote:
> > Commit f7d5bcd35d42 ("selftests: kselftest: Mark functions that
> > unconditionally call exit() as __noreturn") marked functions that call
> > exit() as __nor
ransform
return !ret ? ksft_exit_pass() : ksft_exit_fail();
into the more idiomatic
if (ret)
ksft_exit_fail();
ksft_exit_pass();
as well as a few style clean ups now that the code is shorter.
Signed-off-by: Nathan Chancellor
---
tools/testing/selftests/clone3/clone3_clear_sighand.c
Hi Christian,
I am looking at tools/testing/selftests/clone3/clone3_set_tid.c as part
of a patch to clean up the uses of 'return ksft_exit_...();' throughout
the selftests (as they call exit() so they do not return) and I noticed
that it seems to always pass even when there may have been an error?
ly have been marked as __noreturn.
>
> Signed-off-by: Muhammad Usama Anjum
Reviewed-by: Nathan Chancellor
> ---
> This patch has been suggested [1] and tested on top of the following
> patches:
> - f07041728422 ("selftests: add ksft_exit_fail_perror()"
On Fri, Apr 12, 2024 at 02:05:47PM +0200, Thomas Gleixner wrote:
> On Thu, Apr 11 2024 at 11:45, Nathan Chancellor wrote:
> > I have based this change on timers/urgent, as the commit that introduces
> > this particular warning is there and it is marked for stable, even
> > t
On Thu, Apr 11, 2024 at 11:11:59AM -0700, John Stultz wrote:
> On Thu, Apr 11, 2024 at 8:39 AM Nathan Chancellor wrote:
> > On Wed, Apr 10, 2024 at 04:26:29PM -0700, John Stultz wrote:
> > > Building with clang, I see the following warning:
> > >
> > > In
eturn__))', which clears up the
warning above and any future warnings that may appear for the same
reason.
Fixes: 6d029c25b71f ("selftests/timers/posix_timers: Reimplement
check_timer_distribution()")
Reported-by: John Stultz
Closes: https://lore.kernel.org/all/20240410232637.4135564-2-js
On Wed, Apr 10, 2024 at 04:26:29PM -0700, John Stultz wrote:
> Building with clang, I see the following warning:
>
> In file included from posix_timers.c:17:
> ./../kselftest.h:398:6: warning: variable 'major' is used uninitialized
> whenever '||' condition is true [-Wsometimes-uninitialized]
>
Hi Alexei,
On Thu, Jan 11, 2024 at 12:00:50PM -0800, Alexei Starovoitov wrote:
> On Thu, Jan 11, 2024 at 11:40 AM Nathan Chancellor wrote:
> >
> > Hi Yonghong,
> >
> > On Wed, Jan 10, 2024 at 08:05:36PM -0800, Yonghong Song wrote:
> > >
> > &g
Hi Yonghong,
On Wed, Jan 10, 2024 at 08:05:36PM -0800, Yonghong Song wrote:
>
> On 1/9/24 2:16 PM, Nathan Chancellor wrote:
> > reviews.llvm.org was LLVM's Phabricator instances for code review. It
> > has been abandoned in favor of GitHub pull requests. While the major
gs.llvm.org/show_bug.cgi?id=" links to the
"https://llvm.org/pr" shortlink so that the links show the most up
to date information. Each migrated issue links back to the Bugzilla
entry, so there should be no loss of fidelity of information here.
Signed-off-by: Nathan Chancellor
Link: https://discourse.llvm.org/t/update-on-github-pull-requests/71540/172
Signed-off-by: Nathan Chancellor
---
arch/arm64/Kconfig | 4 ++--
arch/riscv/Kconfig | 2 +-
arch/riscv/include/asm/ftrace.h | 2 +-
include/linux/compiler-clang.h | 2 +-
4 files changed, 5 inser
ation.
Additionally, fix a typo in the xdpwall.c print ("LLMV" -> "LLVM") while
in the area.
Link: https://discourse.llvm.org/t/update-on-github-pull-requests/71540/172
Signed-off-by: Nathan Chancellor
---
Cc: a...@kernel.org
Cc: dan...@iogearbox.net
Cc: and...@kernel.
al (famous
last words...).
---
Nathan Chancellor (3):
selftests/bpf: Update LLVM Phabricator links
arch and include: Update LLVM Phabricator links
treewide: Update LLVM Bugzilla links
arch/arm64/Kconfig | 4 +--
arch/powerp
ction_free+0x18/0x20
...
With this series applied with
https://lore.kernel.org/20231106172557.2963-1...@opensource.cirrus.com/,
all the tests pass for arm64 and x86_64 on my machine. I see no
remaining casts in the tree in this state. It seems like the
documentation in Documentation/dev-tools/
41 matches
Mail list logo