[PATCH 00/13] selftests: Fix problems seen when building with -Werror

Guenter Roeck posted 13 patches 2 months ago
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 00/13] selftests: Fix problems seen when building with -Werror
Posted by Guenter Roeck 2 months ago
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(-)
Re: [PATCH 00/13] selftests: Fix problems seen when building with -Werror
Posted by Jakub Kicinski 2 months ago
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 :|