Linux-kselftest Archive mirror
 help / color / mirror / Atom feed
From: "Mickaël Salaün" <mic@digikod.net>
To: Edward Liaw <edliaw@google.com>
Cc: shuah@kernel.org, "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>,
	"Muhammad Usama Anjum" <usama.anjum@collabora.com>,
	"Andrew Morton" <akpm@linux-foundation.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, "John Hubbard" <jhubbard@nvidia.com>
Subject: Re: [PATCH v3 27/68] selftests/landlock: Drop define _GNU_SOURCE
Date: Mon, 13 May 2024 07:11:31 +0200	[thread overview]
Message-ID: <20240513.wo9coof8Dae4@digikod.net> (raw)
In-Reply-To: <20240509200022.253089-28-edliaw@google.com>

On Thu, May 09, 2024 at 07:58:19PM +0000, Edward Liaw wrote:
> _GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent
> redefinition warnings.
> 
> Fixes: 809216233555 ("selftests/harness: remove use of LINE_MAX")
> Reviewed-by: John Hubbard <jhubbard@nvidia.com>
> Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
> Signed-off-by: Edward Liaw <edliaw@google.com>

Please only remove lines with _GNU_SOURCE, not the empty lines.  I think
it would be better to not change such style choice for other subsystems
too.
With this change for the Landlock selftests:
Acked-by: Mickaël Salaün <mic@digikod.net>

> ---
>  tools/testing/selftests/landlock/base_test.c   | 2 --
>  tools/testing/selftests/landlock/fs_test.c     | 2 --
>  tools/testing/selftests/landlock/net_test.c    | 2 --
>  tools/testing/selftests/landlock/ptrace_test.c | 2 --
>  4 files changed, 8 deletions(-)
> 
> diff --git a/tools/testing/selftests/landlock/base_test.c b/tools/testing/selftests/landlock/base_test.c
> index 3c1e9f35b531..c86e6f87b398 100644
> --- a/tools/testing/selftests/landlock/base_test.c
> +++ b/tools/testing/selftests/landlock/base_test.c
> @@ -5,8 +5,6 @@
>   * Copyright © 2017-2020 Mickaël Salaün <mic@digikod.net>
>   * Copyright © 2019-2020 ANSSI
>   */
> -
> -#define _GNU_SOURCE
>  #include <errno.h>
>  #include <fcntl.h>
>  #include <linux/landlock.h>
> diff --git a/tools/testing/selftests/landlock/fs_test.c b/tools/testing/selftests/landlock/fs_test.c
> index 6b5a9ff88c3d..eec0d9a44d50 100644
> --- a/tools/testing/selftests/landlock/fs_test.c
> +++ b/tools/testing/selftests/landlock/fs_test.c
> @@ -6,8 +6,6 @@
>   * Copyright © 2020 ANSSI
>   * Copyright © 2020-2022 Microsoft Corporation
>   */
> -
> -#define _GNU_SOURCE
>  #include <asm/termbits.h>
>  #include <fcntl.h>
>  #include <libgen.h>
> diff --git a/tools/testing/selftests/landlock/net_test.c b/tools/testing/selftests/landlock/net_test.c
> index f21cfbbc3638..eed040adcbac 100644
> --- a/tools/testing/selftests/landlock/net_test.c
> +++ b/tools/testing/selftests/landlock/net_test.c
> @@ -5,8 +5,6 @@
>   * Copyright © 2022-2023 Huawei Tech. Co., Ltd.
>   * Copyright © 2023 Microsoft Corporation
>   */
> -
> -#define _GNU_SOURCE
>  #include <arpa/inet.h>
>  #include <errno.h>
>  #include <fcntl.h>
> diff --git a/tools/testing/selftests/landlock/ptrace_test.c b/tools/testing/selftests/landlock/ptrace_test.c
> index a19db4d0b3bd..c831e6d03b02 100644
> --- a/tools/testing/selftests/landlock/ptrace_test.c
> +++ b/tools/testing/selftests/landlock/ptrace_test.c
> @@ -5,8 +5,6 @@
>   * Copyright © 2017-2020 Mickaël Salaün <mic@digikod.net>
>   * Copyright © 2019-2020 ANSSI
>   */
> -
> -#define _GNU_SOURCE
>  #include <errno.h>
>  #include <fcntl.h>
>  #include <linux/landlock.h>
> -- 
> 2.45.0.118.g7fe29c98d7-goog
> 
> 

  reply	other threads:[~2024-05-13  5:11 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-09 19:57 [PATCH v3 00/68] Define _GNU_SOURCE for sources using Edward Liaw
2024-05-09 19:57 ` [PATCH v3 01/68] selftests: Compile kselftest headers with -D_GNU_SOURCE Edward Liaw
2024-05-09 19:57 ` [PATCH v3 02/68] selftests/sgx: Include KHDR_INCLUDES in Makefile Edward Liaw
2024-05-09 19:57 ` [PATCH v3 03/68] selftests: Compile with -D_GNU_SOURCE when including lib.mk Edward Liaw
2024-05-09 21:25   ` John Hubbard
2024-05-09 22:58     ` Edward Liaw
2024-05-09 19:57 ` [PATCH v3 04/68] selftests/arm64: Drop define _GNU_SOURCE Edward Liaw
2024-05-09 19:57 ` [PATCH v3 05/68] selftests/arm64: Drop duplicate -D_GNU_SOURCE Edward Liaw
2024-05-09 19:57 ` [PATCH v3 06/68] selftests/bpf: Drop define _GNU_SOURCE Edward Liaw
2024-05-09 19:57 ` [PATCH v3 07/68] selftests/breakpoints: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 08/68] selftests/cachestat: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 09/68] selftests/capabilities: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 10/68] selftests/cgroup: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 11/68] selftests/clone3: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 12/68] selftests/core: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 13/68] selftests/damon: " Edward Liaw
2024-05-09 20:31   ` SeongJae Park
2024-05-09 21:19     ` Edward Liaw
2024-05-09 19:58 ` [PATCH v3 14/68] selftests/drivers: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 15/68] selftests/exec: Drop duplicate -D_GNU_SOURCE Edward Liaw
2024-05-09 19:58 ` [PATCH v3 16/68] selftests/fchmodat2: Drop define _GNU_SOURCE Edward Liaw
2024-05-09 19:58 ` [PATCH v3 17/68] selftests/filelock: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 18/68] selftests/filesystems: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 19/68] selftests/firmware: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 20/68] selftests/fpu: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 21/68] selftests/futex: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 22/68] selftests/futex: Drop duplicate -D_GNU_SOURCE Edward Liaw
2024-05-09 19:58 ` [PATCH v3 23/68] selftests/intel_pstate: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 24/68] selftests/iommu: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 25/68] selftests/ipc: Drop define _GNU_SOURCE Edward Liaw
2024-05-09 19:58 ` [PATCH v3 26/68] selftests/kcmp: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 27/68] selftests/landlock: " Edward Liaw
2024-05-13  5:11   ` Mickaël Salaün [this message]
2024-05-09 19:58 ` [PATCH v3 28/68] selftests/lsm: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 29/68] selftests/membarrier: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 30/68] selftests/memfd: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 31/68] selftests/mincore: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 32/68] selftests/mm: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 33/68] selftests/mount: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 34/68] selftests/mount_setattr: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 35/68] selftests/move_mount_set_group: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 36/68] selftests/mqueue: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 37/68] selftests/net: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 38/68] selftests/net: Drop duplicate -D_GNU_SOURCE Edward Liaw
2024-05-09 19:58 ` [PATCH v3 39/68] selftests/nolibc: Drop define _GNU_SOURCE Edward Liaw
2024-05-09 19:58 ` [PATCH v3 40/68] selftests/nsfs: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 41/68] selftests/openat2: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 42/68] selftests/perf_events: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 43/68] selftests/pid_namespace: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 44/68] selftests/pidfd: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 45/68] selftests/ptrace: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 46/68] selftests/powerpc: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 47/68] selftests/proc: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 48/68] selftests/proc: Drop duplicate -D_GNU_SOURCE Edward Liaw
2024-05-09 19:58 ` [PATCH v3 49/68] selftests/ptp: Drop define _GNU_SOURCE Edward Liaw
2024-05-09 19:58 ` [PATCH v3 50/68] selftests/resctrl: Drop duplicate -D_GNU_SOURCE Edward Liaw
2024-05-09 22:22   ` Reinette Chatre
2024-05-09 19:58 ` [PATCH v3 51/68] selftests/riscv: Drop define _GNU_SOURCE Edward Liaw
2024-05-09 19:58 ` [PATCH v3 52/68] selftests/riscv: Drop duplicate -D_GNU_SOURCE Edward Liaw
2024-05-09 19:58 ` [PATCH v3 53/68] selftests/rlimits: Drop define _GNU_SOURCE Edward Liaw
2024-05-09 19:58 ` [PATCH v3 54/68] selftests/rseq: " Edward Liaw
2024-05-09 20:16   ` Mathieu Desnoyers
2024-05-09 21:19     ` Edward Liaw
2024-05-09 19:58 ` [PATCH v3 55/68] selftests/safesetid: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 56/68] selftests/sched: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 57/68] selftests/seccomp: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 58/68] selftests/sigaltstack: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 59/68] selftests/splice: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 60/68] selftests/syscall_user_dispatch: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 61/68] selftests/thermal: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 62/68] selftests/timens: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 63/68] selftests/tmpfs: Drop duplicate -D_GNU_SOURCE Edward Liaw
2024-05-09 19:58 ` [PATCH v3 64/68] selftests/uevent: Drop define _GNU_SOURCE Edward Liaw
2024-05-09 19:58 ` [PATCH v3 65/68] selftests/user_events: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 66/68] selftests/vDSO: " Edward Liaw
2024-05-09 19:58 ` [PATCH v3 67/68] selftests/wireguard: " Edward Liaw
2024-05-09 19:59 ` [PATCH v3 68/68] selftests/x86: " Edward Liaw

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=20240513.wo9coof8Dae4@digikod.net \
    --to=mic@digikod.net \
    --cc=akpm@linux-foundation.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=brauner@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edliaw@google.com \
    --cc=gnoack@google.com \
    --cc=hawk@kernel.org \
    --cc=jhubbard@nvidia.com \
    --cc=john.fastabend@gmail.com \
    --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=netdev@vger.kernel.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=richardcochran@gmail.com \
    --cc=shuah@kernel.org \
    --cc=usama.anjum@collabora.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).