From: Vitaly Chikunov <vt@altlinux.org>
To: Edward Liaw <edliaw@google.com>, Mark Brown <broonie@kernel.org>
Cc: shuah@kernel.org, "Mickaël Salaün" <mic@digikod.net>,
"Günther Noack" <gnoack@google.com>,
"Christian Brauner" <brauner@kernel.org>,
"Richard Cochran" <richardcochran@gmail.com>,
"Paul Walmsley" <paul.walmsley@sifive.com>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Albert Ou" <aou@eecs.berkeley.edu>,
"Alexei Starovoitov" <ast@kernel.org>,
"Daniel Borkmann" <daniel@iogearbox.net>,
"David S. Miller" <davem@davemloft.net>,
"Jakub Kicinski" <kuba@kernel.org>,
"Jesper Dangaard Brouer" <hawk@kernel.org>,
"John Fastabend" <john.fastabend@gmail.com>,
"Kees Cook" <keescook@chromium.org>,
"Andy Lutomirski" <luto@amacapital.net>,
"Will Drewry" <wad@chromium.org>,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
kernel-team@android.com, linux-security-module@vger.kernel.org,
netdev@vger.kernel.org, linux-riscv@lists.infradead.org,
bpf@vger.kernel.org
Subject: Re: [PATCH v5 02/68] kselftest: Desecalate reporting of missing _GNU_SOURCE
Date: Wed, 22 May 2024 04:10:31 +0300 [thread overview]
Message-ID: <20240522011031.nps5dejrgk5b442y@altlinux.org> (raw)
In-Reply-To: <20240522005913.3540131-3-edliaw@google.com>
On Wed, May 22, 2024 at 12:56:48AM +0000, Edward Liaw wrote:
> From: Mark Brown <broonie@kernel.org>
>
> Commit daef47b89efd0b7 ("selftests: Compile kselftest headers with
> -D_GNU_SOURCE") adds a static_assert() which means that things which
> would be warnings about undeclared functions get escalated into build
> failures. While we do actually want _GNU_SOURCE to be defined for users
> of kselftest_harness we haven't actually done that yet and this is
> causing widespread build breaks which were previously warnings about
> uses of asprintf() without prototypes, including causing other test
> programs in the same directory to fail to build.
>
> Since the build failures that are introduced cause additional issues due
> to make stopping builds early replace the static_assert() with a
> missing without making the error more severe than it already was. This
> will be moot once the issue is fixed properly but reduces the disruption
> while that happens.
>
> Signed-off-by: Mark Brown <broonie@kernel.org>
> Reviewed-by: Kees Cook <keescook@chromium.org>
> ---
> tools/testing/selftests/kselftest_harness.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/kselftest_harness.h b/tools/testing/selftests/kselftest_harness.h
> index b634969cbb6f..8e53686b71cb 100644
> --- a/tools/testing/selftests/kselftest_harness.h
> +++ b/tools/testing/selftests/kselftest_harness.h
> @@ -51,7 +51,7 @@
> #define __KSELFTEST_HARNESS_H
>
> #ifndef _GNU_SOURCE
> -#define _GNU_SOURCE
> +#warning kselftest harness requires _GNU_SOURCE to be defined
Maybe this should be `#error` if it really requires?
Thanks,
> #endif
> #include <asm/types.h>
> #include <ctype.h>
> --
> 2.45.1.288.g0e0cd299f1-goog
>
next prev parent reply other threads:[~2024-05-22 1:19 UTC|newest]
Thread overview: 89+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-22 0:56 [PATCH v5 00/68] Define _GNU_SOURCE for sources using Edward Liaw
2024-05-22 0:56 ` [PATCH v5 01/68] selftests: Compile with -D_GNU_SOURCE when including lib.mk Edward Liaw
2024-05-22 0:56 ` [PATCH v5 02/68] kselftest: Desecalate reporting of missing _GNU_SOURCE Edward Liaw
2024-05-22 1:10 ` Vitaly Chikunov [this message]
2024-05-22 11:21 ` Mark Brown
2024-05-22 17:46 ` Edward Liaw
2024-05-23 2:28 ` John Hubbard
2024-05-23 18:01 ` Shuah Khan
2024-05-23 18:12 ` Edward Liaw
2024-05-23 19:11 ` Shuah Khan
2024-05-22 0:56 ` [PATCH v5 03/68] selftests/arm64: Drop define _GNU_SOURCE Edward Liaw
2024-05-22 0:56 ` [PATCH v5 04/68] selftests/arm64: Drop duplicate -D_GNU_SOURCE Edward Liaw
2024-05-22 0:56 ` [PATCH v5 05/68] selftests/bpf: Drop define _GNU_SOURCE Edward Liaw
2024-05-22 0:56 ` [PATCH v5 06/68] selftests/breakpoints: " Edward Liaw
2024-05-22 0:56 ` [PATCH v5 07/68] selftests/cachestat: " Edward Liaw
2024-05-22 0:56 ` [PATCH v5 08/68] selftests/capabilities: " Edward Liaw
2024-05-22 0:56 ` [PATCH v5 09/68] selftests/cgroup: " Edward Liaw
2024-05-22 0:56 ` [PATCH v5 10/68] selftests/clone3: " Edward Liaw
2024-05-22 0:56 ` [PATCH v5 11/68] selftests/core: " Edward Liaw
2024-05-22 0:56 ` [PATCH v5 12/68] selftests/damon: " Edward Liaw
2024-05-22 0:56 ` [PATCH v5 13/68] selftests/drivers: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 14/68] selftests/exec: Drop duplicate -D_GNU_SOURCE Edward Liaw
2024-05-22 0:57 ` [PATCH v5 15/68] selftests/fchmodat2: Drop define _GNU_SOURCE Edward Liaw
2024-05-22 0:57 ` [PATCH v5 16/68] selftests/filelock: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 17/68] selftests/filesystems: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 18/68] selftests/firmware: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 19/68] selftests/fpu: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 20/68] selftests/futex: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 21/68] selftests/futex: Drop duplicate -D_GNU_SOURCE Edward Liaw
2024-05-22 0:57 ` [PATCH v5 22/68] selftests/intel_pstate: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 23/68] selftests/iommu: " Edward Liaw
2024-05-22 12:45 ` Jason Gunthorpe
2024-05-22 0:57 ` [PATCH v5 24/68] selftests/ipc: Drop define _GNU_SOURCE Edward Liaw
2024-05-22 0:57 ` [PATCH v5 25/68] selftests/kcmp: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 26/68] selftests/landlock: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 27/68] selftests/lsm: " Edward Liaw
2024-05-22 1:37 ` Casey Schaufler
2024-05-22 0:57 ` [PATCH v5 28/68] selftests/membarrier: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 29/68] selftests/memfd: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 30/68] selftests/mincore: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 31/68] selftests/mm: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 32/68] selftests/mount: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 33/68] selftests/mount_setattr: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 34/68] selftests/move_mount_set_group: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 35/68] selftests/mqueue: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 36/68] selftests/net: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 37/68] selftests/net: Drop duplicate -D_GNU_SOURCE Edward Liaw
2024-05-22 0:57 ` [PATCH v5 38/68] selftests/nsfs: Drop define _GNU_SOURCE Edward Liaw
2024-05-22 0:57 ` [PATCH v5 39/68] selftests/openat2: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 40/68] selftests/perf_events: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 41/68] selftests/pid_namespace: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 42/68] selftests/pidfd: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 43/68] selftests/ptrace: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 44/68] selftests/powerpc: " Edward Liaw
2024-05-22 11:39 ` Michael Ellerman
2024-05-22 0:57 ` [PATCH v5 45/68] selftests/proc: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 46/68] selftests/proc: Drop duplicate -D_GNU_SOURCE Edward Liaw
2024-05-22 0:57 ` [PATCH v5 47/68] selftests/ptp: Drop define _GNU_SOURCE Edward Liaw
2024-05-22 0:57 ` [PATCH v5 48/68] selftests/resctrl: Drop duplicate -D_GNU_SOURCE Edward Liaw
2024-05-22 0:57 ` [PATCH v5 49/68] selftests/riscv: Drop define _GNU_SOURCE Edward Liaw
2024-05-22 0:57 ` [PATCH v5 50/68] selftests/riscv: Drop duplicate -D_GNU_SOURCE Edward Liaw
2024-05-22 0:57 ` [PATCH v5 51/68] selftests/rlimits: Drop define _GNU_SOURCE Edward Liaw
2024-05-22 0:57 ` [PATCH v5 52/68] selftests/rseq: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 53/68] selftests/safesetid: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 54/68] selftests/sched: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 55/68] selftests/seccomp: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 56/68] selftests/sigaltstack: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 57/68] selftests/sgx: Compile with -D_GNU_SOURCE Edward Liaw
2024-05-22 12:02 ` Jarkko Sakkinen
2024-05-22 0:57 ` [PATCH v5 58/68] selftests/splice: Drop define _GNU_SOURCE Edward Liaw
2024-05-22 0:57 ` [PATCH v5 59/68] selftests/syscall_user_dispatch: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 60/68] selftests/thermal: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 61/68] selftests/timens: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 62/68] selftests/tmpfs: Drop duplicate -D_GNU_SOURCE Edward Liaw
2024-05-22 0:57 ` [PATCH v5 63/68] selftests/uevent: Drop define _GNU_SOURCE Edward Liaw
2024-05-22 0:57 ` [PATCH v5 64/68] selftests/user_events: " Edward Liaw
2024-05-22 0:57 ` [PATCH v5 65/68] selftests/vDSO: Append to CFLAGS in Makefile Edward Liaw
2024-05-22 0:57 ` [PATCH v5 66/68] selftests/vDSO: Drop define _GNU_SOURCE Edward Liaw
2024-05-22 0:57 ` [PATCH v5 67/68] selftests/x86: Append to CFLAGS in Makefile Edward Liaw
2024-05-22 0:57 ` [PATCH v5 68/68] selftests/x86: Drop define _GNU_SOURCE Edward Liaw
2024-05-22 7:42 ` [PATCH v5 00/68] Define _GNU_SOURCE for sources using Paolo Abeni
2024-05-22 16:35 ` Shuah Khan
2024-05-22 16:19 ` Shuah Khan
2024-05-22 17:13 ` Jakub Kicinski
2024-05-22 17:44 ` Edward Liaw
2024-05-22 18:40 ` Shuah Khan
2024-05-22 23:32 ` patchwork-bot+linux-riscv
2024-05-22 23:36 ` Shuah Khan
2024-05-23 18:08 ` Shuah Khan
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=20240522011031.nps5dejrgk5b442y@altlinux.org \
--to=vt@altlinux.org \
--cc=aou@eecs.berkeley.edu \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=brauner@kernel.org \
--cc=broonie@kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edliaw@google.com \
--cc=gnoack@google.com \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=keescook@chromium.org \
--cc=kernel-team@android.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-security-module@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mic@digikod.net \
--cc=netdev@vger.kernel.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=richardcochran@gmail.com \
--cc=shuah@kernel.org \
--cc=wad@chromium.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