selftests: Fix problems seen when building with -Werror
Subsystems (9)
cover selftests: Fix problems seen when building with -Werror
This series fixes build errors observed when trying to build selftests with -Werror.
----------------------------------------------------------------
Guenter Roeck (13):
clone3: clone3_cap_checkpoint_restore: Fix build errors seen with -Werror
selftests: ntsync: Fix build errors -seen with -Werror selftests/filesystems: fclog: Fix build errors seen with -Werror selftests/filesystems: file_stressor: Fix build error seen with -Werror selftests/filesystems: anon_inode_test: Fix build error seen with -Werror
selftest: af_unix: Support compilers without flex-array-member-not-at-end support selftest/futex: Comment out test_futex_mpol
selftests: net: netlink-dumps: Avoid uninitialized variable error selftests/seccomp: Fix build error seen with -Werror
selftests: net: Work around build error seen with -Werror selftests/fs/mount-notify: Fix build failure seen with -Werror selftests/fs/mount-notify-ns: Fix build failures seen with -Werror
selftests: net: tfo: Fix build error seen with -Werror
tools/testing/selftests/clone3/clone3_cap_checkpoint_restore.c | 4 ---- tools/testing/selftests/drivers/ntsync/ntsync.c | 4 ++-- tools/testing/selftests/filesystems/anon_inode_test.c | 1 + tools/testing/selftests/filesystems/fclog.c | 1 + tools/testing/selftests/filesystems/file_stressor.c | 2 -- .../testing/selftests/filesystems/mount-notify/mount-notify_test.c | 3 ++- .../selftests/filesystems/mount-notify/mount-notify_test_ns.c | 3 ++- tools/testing/selftests/futex/functional/futex_numa_mpol.c | 2 ++ tools/testing/selftests/net/af_unix/Makefile | 2 +- tools/testing/selftests/net/lib/ksft.h | 6 ++++-- tools/testing/selftests/net/netlink-dumps.c | 2 +- tools/testing/selftests/net/tfo.c | 3 ++- tools/testing/selftests/seccomp/seccomp_bpf.c | 3 ++- 13 files changed, 20 insertions(+), 16 deletions(-)
PATCH 1/13 clone3: clone3_cap_checkpoint_restore: Fix build errors seen with -Werror
Fix:
clone3_cap_checkpoint_restore.c:56:7: error: unused variable 'ret'
56 | int ret;
| ^~~
clone3_cap_checkpoint_restore.c:57:8: error: unused variable 'tmp'
57 | char tmp = 0;
| ^~~
clone3_cap_checkpoint_restore.c:138:6: error: unused variable 'ret'
138 | int ret = 0;
by removing the unused variables.
--- .../testing/selftests/clone3/clone3_cap_checkpoint_restore.c | 4 ---- 1 file changed, 4 deletions(-)
tools/testing/selftests/clone3/clone3_cap_checkpoint_restore.c +0 -4
@@ -53,9 +53,6 @@ static int call_clone3_set_tid(struct __test_metadata *_metadata, }if (pid ==0 ) { -int ret; -char tmp =0 ; -TH_LOG ("I am the child, my PID is %d (expected %d)" ,getpid (), set_tid[0 ]);if (set_tid[0 ] !=getpid ())
@@ -135,7 +132,6 @@ TEST(clone3_cap_checkpoint_restore) {pid_t pid;int status; -int ret =0 ;pid_t set_tid[1 ];test_clone3_supported ();
Signature · 1 line
2.43.0
PATCH 2/13 selftests: ntsync: Fix build errors -seen with -Werror
In reply to Guenter RoeckFix
ntsync.c:1286:20: error: call to undeclared function 'gettid';
ISO C99 and later do not support implicit function declarations
1286 | wait_args.owner = gettid();
| ^
ntsync.c:1280:8: error: unused variable 'index'
1280 | __u32 index, count, i;
| ^~~~~ntsync.c:1281:6: error: unused variable 'ret'
1281 | int ret;
by adding the missing include file and removing the unused variables.
--- tools/testing/selftests/drivers/ntsync/ntsync.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/drivers/ntsync/ntsync.c +2 -2
@@ -11,6 +11,7 @@#include <fcntl.h> #include <time.h> #include <pthread.h> +#include <unistd.h> #include <linux/ntsync.h> #include "../../kselftest_harness.h"
@@ -1277,8 +1278,7 @@ static int stress_device, stress_start_event, stress_mutex;static void *stress_thread (void *arg) {struct ntsync_wait_args wait_args = {0 }; -__u32 index, count, i; -int ret; +__u32 count, i; wait_args.timeout =UINT64_MAX ; wait_args.count =1 ;
Signature · 1 line
2.43.0
PATCH 3/13 selftests/filesystems: fclog: Fix build errors seen with -Werror
In reply to Guenter RoeckFix
fclog.c:37:21: error: call to undeclared function 'open'
fclog.c:37:47: error: use of undeclared identifier 'O_RDONLY'; did you mean 'MS_RDONLY'? fclog.c:37:56: error: use of undeclared identifier 'O_CLOEXEC'
by adding the missing include file.
--- tools/testing/selftests/filesystems/fclog.c | 1 + 1 file changed, 1 insertion(+)
tools/testing/selftests/filesystems/fclog.c +1 -0
@@ -6,6 +6,7 @@#include <assert.h> #include <errno.h> +#include <fcntl.h> #include <sched.h> #include <stdio.h> #include <stdlib.h>
Signature · 1 line
2.43.0
PATCH 4/13 selftests/filesystems: file_stressor: Fix build error seen with -Werror
In reply to Guenter RoeckFix
file_stressor.c:112:9: error: unused variable 'pid_self'
by dropping the unused variable.
--- tools/testing/selftests/filesystems/file_stressor.c | 2 -- 1 file changed, 2 deletions(-)
tools/testing/selftests/filesystems/file_stressor.c +0 -2
@@ -109,8 +109,6 @@ FIXTURE_TEARDOWN(file_stressor) TEST_F_TIMEOUT(file_stressor, slab_typesafe_by_rcu, 900 * 2) {for (int i =0 ; i < self->nr_procs; i++) { -pid_t pid_self; - self->pids_openers[i] =fork ();ASSERT_GE (self->pids_openers[i],0 );
Signature · 1 line
2.43.0
PATCH 5/13 selftests/filesystems: anon_inode_test: Fix build error seen with -Werror
In reply to Guenter RoeckFix
anon_inode_test.c:45:12: error: call to undeclared function 'execveat'
by adding the missing include file.
---
This patch does not fix:
anon_inode_test.c: In function ‘anon_inode_no_exec’:
anon_inode_test.c:46:19: error: argument 3 null where non-null expected
because I have no idea how to do that.
tools/testing/selftests/filesystems/anon_inode_test.c | 1 + 1 file changed, 1 insertion(+)
tools/testing/selftests/filesystems/anon_inode_test.c +1 -0
@@ -4,6 +4,7 @@#include <fcntl.h> #include <stdio.h> +#include <unistd.h> #include <sys/stat.h> #include "../kselftest_harness.h"
Signature · 1 line
2.43.0
PATCH 6/13 selftest: af_unix: Support compilers without flex-array-member-not-at-end support
In reply to Guenter RoeckFix:
gcc: error: unrecognized command-line option ‘-Wflex-array-member-not-at-end’
by making the compiler option dependent on its support.
--- tools/testing/selftests/net/af_unix/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/net/af_unix/Makefile +1 -1
@@ -1,4 +1,4 @@ -CFLAGS += $(KHDR_INCLUDES) -Wall -Wflex-array-member-not-at-end +CFLAGS += $(KHDR_INCLUDES) -Wall $(call cc-option,-Wflex-array-member-not-at-end) TEST_GEN_PROGS := \ diag_uid \
Signature · 1 line
2.43.0
Jakub Kicinski
maintainerRe: [PATCH 06/13] selftest: af_unix: Support compilers without flex-array-member-not-at-end support
tools/testing/selftests/net/af_unix/Makefile line 1
Quoted 2 lines · On Thu, 4 Dec 2025 08:17:20 -0800 Guenter Roeck wrote:
tools/testing/selftests/net/af_unix/Makefile +1
-1-CFLAGS += $(KHDR_INCLUDES) -Wall -Wflex-array-member-not-at-end +CFLAGS += $(KHDR_INCLUDES) -Wall $(call cc-option,-Wflex-array-member-not-at-end)
Hm, the Claude code review we have hooked up to patchwork says:
Is cc-option available in the selftest build environment? Looking at tools/testing/selftests/lib.mk (included at line 14), it doesn't include scripts/Makefile.compiler where cc-option is defined. When cc-option is undefined, $(call cc-option,...) expands to an empty string, which means the -Wflex-array-member-not-at-end flag won't be added even on compilers that support it.
This defeats the purpose of commit 1838731f1072c which added the warning flag to catch flexible array issues.
For comparison, tools/testing/selftests/nolibc/Makefile explicitly includes scripts/Makefile.compiler before using cc-option.
Testing it:
$ make -C tools/testing/selftests/ TARGETS=net/af_unix Q= V=1 make: Entering directory '/home/kicinski/devel/linux/tools/testing/selftests' make[1]: Entering directory '/home/kicinski/devel/linux/tools/testing/selftests/net/af_unix' gcc -isystem /home/kicinski/devel/linux/usr/include -Wall -D_GNU_SOURCE= diag_uid.c -o /home/kicinski/devel/linux/tools/testing/selftests/net/af_unix/diag_uid
looks like the flag just disappears. Even tho:
gcc version 15.2.1
Re: [PATCH 06/13] selftest: af_unix: Support compilers without flex-array-member-not-at-end support
Quoted 21 lines · Jakub Kicinski
tools/testing/selftests/net/af_unix/Makefile line 1
Quoted 2 lines · On Thu, 4 Dec 2025 08:17:20 -0800 Guenter Roeck wrote:
tools/testing/selftests/net/af_unix/Makefile +1
-1-CFLAGS += $(KHDR_INCLUDES) -Wall -Wflex-array-member-not-at-end +CFLAGS += $(KHDR_INCLUDES) -Wall $(call cc-option,-Wflex-array-member-not-at-end)Hm, the Claude code review we have hooked up to patchwork says:
Is cc-option available in the selftest build environment? Looking at
tools/testing/selftests/lib.mk(included at line 14), it doesn't includescripts/Makefile.compilerwhere cc-option is defined. When cc-option is undefined, $(call cc-option,...) expands to an empty string, which means the -Wflex-array-member-not-at-end flag won't be added even on compilers that support it.This defeats the purpose of commit
1838731f1072cwhich added the warning flag to catch flexible array issues.For comparison,
tools/testing/selftests/nolibc/Makefileexplicitly includesscripts/Makefile.compilerbefore using cc-option.Testing it:
Quoted 8 lines
$ make -C tools/testing/selftests/ TARGETS=net/af_unix Q= V=1 make: Entering directory '/home/kicinski/devel/linux/tools/testing/selftests' make[1]: Entering directory '/home/kicinski/devel/linux/tools/testing/selftests/net/af_unix' gcc -isystem /home/kicinski/devel/linux/usr/include -Wall -D_GNU_SOURCE= diag_uid.c -o /home/kicinski/devel/linux/tools/testing/selftests/net/af_unix/diag_uidlooks like the flag just disappears. Even tho:
gcc version 15.2.1
Oops :). I didn't expect that, sorry. Thanks for finding!
... and I guess it's time to set up AI in my environment.
Guenter
PATCH 7/13 selftest/futex: Comment out test_futex_mpol
In reply to Guenter Roecktest_futex_mpol() is not called, resulting in
futex_numa_mpol.c:134:13: error: ‘test_futex_mpol’ defined but not used
if built with -Werror. Disable the function but keep it in case it was supposed to be used.
--- tools/testing/selftests/futex/functional/futex_numa_mpol.c | 2 ++ 1 file changed, 2 insertions(+)
tools/testing/selftests/futex/functional/futex_numa_mpol.c +2 -0
@@ -131,10 +131,12 @@ static void test_futex(void *futex_ptr, int err_value)__test_futex (futex_ptr, err_value,FUTEX2_SIZE_U32 |FUTEX_PRIVATE_FLAG |FUTEX2_NUMA ); } +#ifdef NOTUSED static void test_futex_mpol (void *futex_ptr,int err_value) {__test_futex (futex_ptr, err_value,FUTEX2_SIZE_U32 |FUTEX_PRIVATE_FLAG |FUTEX2_NUMA |FUTEX2_MPOL ); } +#endif TEST (futex_numa_mpol) {
Signature · 1 line
2.43.0
PATCH 8/13 selftests: net: netlink-dumps: Avoid uninitialized variable error
In reply to Guenter RoeckBuilding netlink-dumps with -Werror results in
netlink-dumps.c: In function ‘dump_extack’:../kselftest_harness.h:788:35: error: ‘ret’ may be used uninitialized
Problem is that the loop which initializes 'ret' may exit early without initializing the variable if recv() returns an error. Always initialize 'ret' to solve the problem.
--- tools/testing/selftests/net/netlink-dumps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/net/netlink-dumps.c +1 -1
@@ -112,7 +112,7 @@ static const struct {TEST (dump_extack) {int netlink_sock; -int i, cnt, ret; +int i, cnt, ret =FOUND_ERR ;char buf[8192 ];int one =1 ;ssize_t n;
Signature · 1 line
2.43.0
PATCH 9/13 selftests/seccomp: Fix build error seen with -Werror
In reply to Guenter RoeckFix:
seccomp_bpf.c: In function ‘UPROBE_setup’:
seccomp_bpf.c:5175:74: error: pointer type mismatch in conditional expression
by type casting the argument to get_uprobe_offset().
--- tools/testing/selftests/seccomp/seccomp_bpf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/seccomp/seccomp_bpf.c +2 -1
@@ -5172,7 +5172,8 @@ FIXTURE_SETUP(UPROBE)ASSERT_GE (bit,0 ); } - offset =get_uprobe_offset (variant->uretprobe ? probed_uretprobe : probed_uprobe); + offset =get_uprobe_offset (variant->uretprobe ? + (void *)probed_uretprobe : (void *)probed_uprobe);ASSERT_GE (offset,0 );if (variant->uretprobe)
Signature · 1 line
2.43.0
PATCH 10/13 selftests: net: Work around build error seen with -Werror
In reply to Guenter RoeckFix
ksft.h: In function ‘ksft_ready’:
ksft.h:27:9: error: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
ksft.h: In function ‘ksft_wait’:
ksft.h:51:9: error: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
by checking and then ignoring the return value of the affected functions.
--- tools/testing/selftests/net/lib/ksft.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
tools/testing/selftests/net/lib/ksft.h +4 -2
@@ -24,7 +24,8 @@ static inline void ksft_ready(void) fd =STDOUT_FILENO ; } -write (fd, msg,sizeof (msg)); +if (write (fd, msg,sizeof (msg))) + ;if (fd !=STDOUT_FILENO )close (fd); }
@@ -48,7 +49,8 @@ static inline void ksft_wait(void) fd =STDIN_FILENO ; } -read (fd, &byte,sizeof (byte)); +if (read (fd, &byte,sizeof (byte))) + ;if (fd !=STDIN_FILENO )close (fd); }
Signature · 1 line
2.43.0
Jakub Kicinski
maintainerRe: [PATCH 10/13] selftests: net: Work around build error seen with -Werror
tools/testing/selftests/net/lib/ksft.h static inline void ksft_ready(void) · line 28
Quoted 3 lines · On Thu, 4 Dec 2025 08:17:24 -0800 Guenter Roeck wrote:
tools/testing/selftests/net/lib/ksft.h +2
-1-write (fd, msg,sizeof (msg)); +if (write (fd, msg,sizeof (msg))) + ;
At least add an perror here ?
Re: [PATCH 10/13] selftests: net: Work around build error seen with -Werror
Quoted 6 lines · Jakub Kicinski
tools/testing/selftests/net/lib/ksft.h static inline void ksft_ready(void) · line 28
Quoted 3 lines · On Thu, 4 Dec 2025 08:17:24 -0800 Guenter Roeck wrote:
tools/testing/selftests/net/lib/ksft.h +2
-1-write (fd, msg,sizeof (msg)); +if (write (fd, msg,sizeof (msg))) + ;At least add an perror here ?
Makes sense. I'll do that in all patches unless someone has a better idea.
Thanks,
Guenter
PATCH 11/13 selftests/fs/mount-notify: Fix build failure seen with -Werror
In reply to Guenter RoeckFix
mount-notify_test.c: In function ‘fanotify_rmdir’:
mount-notify_test.c:467:17: error:
ignoring return value of ‘chdir’ declared with attribute ‘warn_unused_result’
by checking and then ignoring the return value of chdir().
--- .../selftests/filesystems/mount-notify/mount-notify_test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c +2 -1
@@ -464,7 +464,8 @@ TEST_F(fanotify, rmdir)ASSERT_GE (ret,0 );if (ret ==0 ) { -chdir ("/" ); +if (chdir ("/" )) + ;unshare (CLONE_NEWNS );mount ("" ,"/" ,NULL ,MS_REC |MS_PRIVATE ,NULL );umount2 ("/a" ,MNT_DETACH );
Signature · 1 line
2.43.0
PATCH 12/13 selftests/fs/mount-notify-ns: Fix build failures seen with -Werror
In reply to Guenter RoeckFix
mount-notify_test_ns.c: In function ‘fanotify_rmdir’:
mount-notify_test_ns.c:494:17: error:
ignoring return value of ‘chdir’ declared with attribute ‘warn_unused_result’
by checking and then ignoring the return value of chdir().
--- .../selftests/filesystems/mount-notify/mount-notify_test_ns.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/filesystems/mount-notify/mount-notify_test_ns.c +2 -1
@@ -491,7 +491,8 @@ TEST_F(fanotify, rmdir)ASSERT_GE (ret,0 );if (ret ==0 ) { -chdir ("/" ); +if (chdir ("/" )) + ;unshare (CLONE_NEWNS );mount ("" ,"/" ,NULL ,MS_REC |MS_PRIVATE ,NULL );umount2 ("/a" ,MNT_DETACH );
Signature · 1 line
2.43.0
PATCH 13/13 selftests: net: tfo: Fix build error seen with -Werror
In reply to Guenter RoeckFix
tfo.c: In function ‘run_server’:
tfo.c:84:9: error: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
by evaluating and then ignoring the return value from the read() call.
--- tools/testing/selftests/net/tfo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/net/tfo.c +2 -1
@@ -81,7 +81,8 @@ static void run_server(void)if (getsockopt (connfd,SOL_SOCKET ,SO_INCOMING_NAPI_ID , &opt, &len) <0 )error (1 , errno,"getsockopt(SO_INCOMING_NAPI_ID)" ); -read (connfd, buf,64 ); +if (read (connfd, buf,64 )) + ;fprintf (outfile,"%d\n" , opt);fclose (outfile);
Signature · 1 line
2.43.0
Jakub Kicinski
maintainerQuoted 2 lines · On Thu, 4 Dec 2025 08:17:14 -0800 Guenter Roeck wrote:
This series fixes build errors observed when trying to build selftests with -Werror.
If your intention is to make -Werror the default please stop. Defaulting WERROR to enabled is one of the silliest things we have done in recent past.
People will try to use new compilers on a kernel after it has already been released. Not being able to build the kernel because of some false positive warning in another subsystem is so annoying :|
Quoted 8 lines · Jakub Kicinski
Quoted 2 lines · On Thu, 4 Dec 2025 08:17:14 -0800 Guenter Roeck wrote:
This series fixes build errors observed when trying to build selftests with -Werror.
If your intention is to make -Werror the default please stop. Defaulting WERROR to enabled is one of the silliest things we have done in recent past.
No, that is not the idea, and not the intention.
The Google infrastructure builds the kernel, including selftests, with -Werror enabled. This triggers a number of build errors when trying to build selftests with the 6.18 kernel. That means I have three options:
1) Disable -Werror in selftest builds and accept that some real problems will slip through. Not really a good option, and not acceptable.
2) Fix the problems in the upstream kernel and backport.
3) Fix the problems downstream only. Not really a good option but I guess we'll have to do it if this series (and/or follow-up patches needed to support glibc older than 2.36) is rejected.
We'll have to carry the patches downstream if 2) is rejected, but at the very least I wanted to give it a try.
Guenter
Jakub Kicinski
maintainerQuoted 21 lines · On Thu, 4 Dec 2025 09:16:16 -0800 Guenter Roeck wrote:
Quoted 7 lines · Jakub Kicinski
Quoted 2 lines · On Thu, 4 Dec 2025 08:17:14 -0800 Guenter Roeck wrote:
This series fixes build errors observed when trying to build selftests with -Werror.
If your intention is to make -Werror the default please stop. Defaulting WERROR to enabled is one of the silliest things we have done in recent past.
No, that is not the idea, and not the intention.
The Google infrastructure builds the kernel, including selftests, with -Werror enabled. This triggers a number of build errors when trying to build selftests with the 6.18 kernel. That means I have three options:
1) Disable -Werror in selftest builds and accept that some real problems will slip through. Not really a good option, and not acceptable.
2) Fix the problems in the upstream kernel and backport.
3) Fix the problems downstream only. Not really a good option but I guess we'll have to do it if this series (and/or follow-up patches needed to support glibc older than 2.36) is rejected.
Quoted 2 lines
We'll have to carry the patches downstream if 2) is rejected, but at the very least I wanted to give it a try.
Understood, of course we should fix the warnings!
If we're fixing warnings, tho, I wouldn't have mentioned -Werror in the _subject_. It doesn't affect which warnings are enabled, AFAIK?
Quoted 22 lines · Jakub Kicinski
Quoted 21 lines · On Thu, 4 Dec 2025 09:16:16 -0800 Guenter Roeck wrote:
Quoted 7 lines · Jakub Kicinski
Quoted 2 lines · On Thu, 4 Dec 2025 08:17:14 -0800 Guenter Roeck wrote:
This series fixes build errors observed when trying to build selftests with -Werror.
If your intention is to make -Werror the default please stop. Defaulting WERROR to enabled is one of the silliest things we have done in recent past.
No, that is not the idea, and not the intention.
The Google infrastructure builds the kernel, including selftests, with -Werror enabled. This triggers a number of build errors when trying to build selftests with the 6.18 kernel. That means I have three options:
1) Disable -Werror in selftest builds and accept that some real problems will slip through. Not really a good option, and not acceptable.
2) Fix the problems in the upstream kernel and backport.
3) Fix the problems downstream only. Not really a good option but I guess we'll have to do it if this series (and/or follow-up patches needed to support glibc older than 2.36) is rejected.
Quoted 6 lines
Quoted 2 lines
We'll have to carry the patches downstream if 2) is rejected, but at the very least I wanted to give it a try.
Understood, of course we should fix the warnings!
If we're fixing warnings, tho, I wouldn't have mentioned -Werror in the _subject_. It doesn't affect which warnings are enabled, AFAIK?
I'll update the subjects and descriptions accordingly.
Thanks,
Guenter
Kees Cook
maintainerQuoted 10 lines · Guenter Roeck
Quoted 8 lines · Jakub Kicinski
Quoted 2 lines · On Thu, 4 Dec 2025 08:17:14 -0800 Guenter Roeck wrote:
This series fixes build errors observed when trying to build selftests with -Werror.
If your intention is to make -Werror the default please stop. Defaulting WERROR to enabled is one of the silliest things we have done in recent past.
Quoted 8 lines
No, that is not the idea, and not the intention.
The Google infrastructure builds the kernel, including selftests, with -Werror enabled. This triggers a number of build errors when trying to build selftests with the 6.18 kernel. That means I have three options:
1) Disable -Werror in selftest builds and accept that some real problems will slip through. Not really a good option, and not acceptable.
2) Fix the problems in the upstream kernel and backport.
The series fixes build warnings that appear regardless of -Werror, yes? That on its face is an improvement, so maybe just adjust the Subject/changelogs?
Signature · 1 line
Kees Cook
Quoted 20 lines · Kees Cook
Quoted 10 lines · Guenter Roeck
Quoted 8 lines · Jakub Kicinski
Quoted 2 lines · On Thu, 4 Dec 2025 08:17:14 -0800 Guenter Roeck wrote:
This series fixes build errors observed when trying to build selftests with -Werror.
If your intention is to make -Werror the default please stop. Defaulting WERROR to enabled is one of the silliest things we have done in recent past.
Quoted 8 lines
No, that is not the idea, and not the intention.
The Google infrastructure builds the kernel, including selftests, with -Werror enabled. This triggers a number of build errors when trying to build selftests with the 6.18 kernel. That means I have three options:
1) Disable -Werror in selftest builds and accept that some real problems will slip through. Not really a good option, and not acceptable.
2) Fix the problems in the upstream kernel and backport.
Quoted 4 lines
The series fixes build warnings that appear regardless of -Werror, yes? That on its face is an improvement, so maybe just adjust the Subject/changelogs?
Yes, I'll do that.
Thanks,
Guenter