[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240513.wo9coof8Dae4@digikod.net>
Date: Mon, 13 May 2024 07:11:31 +0200
From: Mickaël Salaün <mic@...ikod.net>
To: Edward Liaw <edliaw@...gle.com>
Cc: shuah@...nel.org, Günther Noack <gnoack@...gle.com>,
Christian Brauner <brauner@...nel.org>, Richard Cochran <richardcochran@...il.com>,
Paul Walmsley <paul.walmsley@...ive.com>, Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>, Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>, "David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, Jesper Dangaard Brouer <hawk@...nel.org>,
John Fastabend <john.fastabend@...il.com>, Muhammad Usama Anjum <usama.anjum@...labora.com>,
Andrew Morton <akpm@...ux-foundation.org>, linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
kernel-team@...roid.com, linux-security-module@...r.kernel.org, netdev@...r.kernel.org,
linux-riscv@...ts.infradead.org, bpf@...r.kernel.org, John Hubbard <jhubbard@...dia.com>
Subject: Re: [PATCH v3 27/68] selftests/landlock: Drop define _GNU_SOURCE
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@...dia.com>
> Reviewed-by: Muhammad Usama Anjum <usama.anjum@...labora.com>
> Signed-off-by: Edward Liaw <edliaw@...gle.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@...ikod.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@...ikod.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@...ikod.net>
> * Copyright © 2019-2020 ANSSI
> */
> -
> -#define _GNU_SOURCE
> #include <errno.h>
> #include <fcntl.h>
> #include <linux/landlock.h>
> --
> 2.45.0.118.g7fe29c98d7-goog
>
>
Powered by blists - more mailing lists