From patchwork Thu May 9 19:57:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Edward Liaw X-Patchwork-Id: 13660316 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 29BAAC25B10 for ; Thu, 9 May 2024 20:01:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID: References:Mime-Version:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=6mSOXPaTtpZxmtfEO0KQSDDNEoovLvqNYYWG3DlsEEM=; b=Usq7HzHF5tCZYQlrDBP6rJduLF ESH5fZbsPDsmGzE6o0JfO7+7ysCXZRTVh52klxYsUB51pUPoL4ukrzIa5rBPpRjNFSFpMwvZgQ9L8 TUqay35lJilfnyQ1qCoauvRB9x0yKJl3kpG1S1XLqZLXZ79KvpyJFEqT6aUpe3oU6T//aRlJkC80P g9w6djQOBnFFJJh1c8Q+u96g9As0rd7Xbn4yJSNPW97zX0bTI0cYv3Md6xGCgeH0X8s85snGm7Knx LzglgKrurlPRIr4j2ZvSe1DUw/0Be819vwgkKfEVkpQWHPFpecXAoaFt9+RA4ut8szTyLcBt9xEtE Sxl1kadw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s59xM-00000002bAE-00B4; Thu, 09 May 2024 20:01:32 +0000 Received: from mail-pf1-x44a.google.com ([2607:f8b0:4864:20::44a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s59x3-00000002aqT-0Rnq for linux-riscv@lists.infradead.org; Thu, 09 May 2024 20:01:25 +0000 Received: by mail-pf1-x44a.google.com with SMTP id d2e1a72fcca58-6f467b9e948so1252516b3a.0 for ; Thu, 09 May 2024 13:01:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1715284867; x=1715889667; darn=lists.infradead.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=YbNfWdZqwCgP5Pz0h9FCkFX5FCC2CTEzcGds39PN8sE=; b=mgIv0FaZTzU6n/7ljJ85u4MTfnVV76HAoxcaGss39jJk2Z1NF69jS7vvIV/chypFWa IY6uMCAEJM3HFzg71kmMrJDy9lh3Ko/kxV1r3dX28xx6z2WY5xqY4I/f99gQ58mCURYb bHF/jXdNnjn1URno44ryV98c+ROEBYTSKOpzdlNDn3IRxni6XOYdL52NYI5eaJa7GM/o zc6l6pKHiYCvWSAgqxsPqFgTwP7I+fEDLvr3gRJvzdjcJn+FPdsUDtq3hXfYroIynx+3 Cl62OoTXtNTbfzyznd4lArmYqqkfWIoEEktzyO2evEF2HmmIbG00wJYAJiz8JwTAKq7w VcbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715284867; x=1715889667; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=YbNfWdZqwCgP5Pz0h9FCkFX5FCC2CTEzcGds39PN8sE=; b=fc9VmEOxVMLYfqqej9w0Rd7i1EsSOt4UES9ETBYPUjGtWI/NV+AtKsb2pCs20ST25G Kix7LSybIk3Km3b35U6uAr4csQkjFxpeI7mt0pbPl46P3y/m0DIrJQslYyxujuquPdGU ZJyEfGJvBn9+OgzstkvkdaZ2Tnqn+sMk6eqOmN1F+7/DkyJkzLPVALIrMS+8UECBGrWb wrDgSbK2wb3jhGLHJ8zraRwKqwAcOTCKrk5WeFidX1u8GFtU0P1xyAY5bG0Trrxf6+sy D3eQf8bFNfMUhTNUUAzjWckW36Yvtp+xOFB//mD9oQ0MWdc1WSG6kLgIetjxEjBEvt9s Oj7g== X-Forwarded-Encrypted: i=1; AJvYcCUvw9i1Toklq2VvCjmF/WjOrUQ0woruVDHKHI9va9aYNqdhdHxi19iNpHz5V7al8ACGnv3c12uA/01fWFkF23R4s+/+eOwRTNunTcvkmeTn X-Gm-Message-State: AOJu0YxTGuzuXzVGaZTSgV69JByGM3tpXNE/snerRJjsH7CgyUkP5YxT BwMfBFSrtuJHT4uejzITZIMUc10zWm7MFtsaVz3PxUi4LsRbzkjELey2kY/2GF1s7Z+JrgRDmuS Caw== X-Google-Smtp-Source: AGHT+IEWn0NJLdJVm8i3nXGNqhMT3erMoL6+SEwGmAotS98GMnAZKIncf6dhlt5bk6pE2nlhU8Kro/+E0ms= X-Received: from edliaw.c.googlers.com ([fda3:e722:ac3:cc00:24:72f4:c0a8:305d]) (user=edliaw job=sendgmr) by 2002:a05:6a00:3c91:b0:6ea:aafa:815c with SMTP id d2e1a72fcca58-6f4e0263dd0mr24703b3a.1.1715284867136; Thu, 09 May 2024 13:01:07 -0700 (PDT) Date: Thu, 9 May 2024 19:57:58 +0000 In-Reply-To: <20240509200022.253089-1-edliaw@google.com> Mime-Version: 1.0 References: <20240509200022.253089-1-edliaw@google.com> X-Mailer: git-send-email 2.45.0.118.g7fe29c98d7-goog Message-ID: <20240509200022.253089-7-edliaw@google.com> Subject: [PATCH v3 06/68] selftests/bpf: Drop define _GNU_SOURCE From: Edward Liaw To: shuah@kernel.org, " =?utf-8?q?Micka=C3=ABl_Sala=C3=BCn?= " , " =?utf-8?q?G?= =?utf-8?q?=C3=BCnther_Noack?= " , Christian Brauner , Richard Cochran , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexei Starovoitov , Daniel Borkmann , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , John Fastabend , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , " =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= " , Magnus Karlsson , Maciej Fijalkowski , Jonathan Lemon , Andrew Morton , Edward Liaw , Muhammad Usama Anjum Cc: 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240509_130113_317781_16E9683F X-CRM114-Status: GOOD ( 11.22 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org _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") Signed-off-by: Edward Liaw --- tools/testing/selftests/bpf/bench.c | 1 - tools/testing/selftests/bpf/benchs/bench_trigger.c | 1 - tools/testing/selftests/bpf/cgroup_helpers.c | 1 - tools/testing/selftests/bpf/map_tests/task_storage_map.c | 1 - tools/testing/selftests/bpf/network_helpers.c | 2 -- tools/testing/selftests/bpf/prog_tests/bind_perm.c | 1 - tools/testing/selftests/bpf/prog_tests/bpf_cookie.c | 1 - tools/testing/selftests/bpf/prog_tests/bpf_iter_setsockopt.c | 1 - tools/testing/selftests/bpf/prog_tests/bpf_obj_pinning.c | 1 - tools/testing/selftests/bpf/prog_tests/btf_endian.c | 1 - tools/testing/selftests/bpf/prog_tests/btf_skc_cls_ingress.c | 2 -- tools/testing/selftests/bpf/prog_tests/cgrp_kfunc.c | 2 -- tools/testing/selftests/bpf/prog_tests/cgrp_local_storage.c | 2 -- tools/testing/selftests/bpf/prog_tests/cls_redirect.c | 3 --- tools/testing/selftests/bpf/prog_tests/connect_ping.c | 2 -- tools/testing/selftests/bpf/prog_tests/core_retro.c | 1 - tools/testing/selftests/bpf/prog_tests/d_path.c | 1 - tools/testing/selftests/bpf/prog_tests/deny_namespace.c | 1 - tools/testing/selftests/bpf/prog_tests/fexit_sleep.c | 1 - .../testing/selftests/bpf/prog_tests/flow_dissector_reattach.c | 2 -- tools/testing/selftests/bpf/prog_tests/get_stack_raw_tp.c | 1 - tools/testing/selftests/bpf/prog_tests/htab_reuse.c | 1 - tools/testing/selftests/bpf/prog_tests/htab_update.c | 1 - tools/testing/selftests/bpf/prog_tests/map_in_map.c | 1 - tools/testing/selftests/bpf/prog_tests/ns_current_pid_tgid.c | 2 -- tools/testing/selftests/bpf/prog_tests/perf_branches.c | 1 - tools/testing/selftests/bpf/prog_tests/perf_buffer.c | 1 - tools/testing/selftests/bpf/prog_tests/perf_event_stackmap.c | 1 - tools/testing/selftests/bpf/prog_tests/perf_link.c | 1 - tools/testing/selftests/bpf/prog_tests/perf_skip.c | 2 -- tools/testing/selftests/bpf/prog_tests/preempted_bpf_ma_op.c | 1 - tools/testing/selftests/bpf/prog_tests/rcu_read_lock.c | 2 -- tools/testing/selftests/bpf/prog_tests/reg_bounds.c | 2 -- tools/testing/selftests/bpf/prog_tests/ringbuf.c | 1 - tools/testing/selftests/bpf/prog_tests/ringbuf_multi.c | 1 - tools/testing/selftests/bpf/prog_tests/setget_sockopt.c | 2 -- tools/testing/selftests/bpf/prog_tests/sk_assign.c | 2 -- tools/testing/selftests/bpf/prog_tests/sk_lookup.c | 2 -- tools/testing/selftests/bpf/prog_tests/sock_fields.c | 2 -- tools/testing/selftests/bpf/prog_tests/task_kfunc.c | 2 -- tools/testing/selftests/bpf/prog_tests/task_local_storage.c | 2 -- tools/testing/selftests/bpf/prog_tests/task_pt_regs.c | 1 - tools/testing/selftests/bpf/prog_tests/tcp_custom_syncookie.c | 2 -- tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c | 2 -- tools/testing/selftests/bpf/prog_tests/test_bpf_ma.c | 1 - .../testing/selftests/bpf/prog_tests/test_bpf_syscall_macro.c | 1 - tools/testing/selftests/bpf/prog_tests/test_bpffs.c | 1 - tools/testing/selftests/bpf/prog_tests/test_overhead.c | 1 - tools/testing/selftests/bpf/prog_tests/token.c | 1 - tools/testing/selftests/bpf/prog_tests/trace_ext.c | 2 -- tools/testing/selftests/bpf/prog_tests/trampoline_count.c | 1 - tools/testing/selftests/bpf/prog_tests/user_ringbuf.c | 2 -- tools/testing/selftests/bpf/prog_tests/xdp_bonding.c | 2 -- tools/testing/selftests/bpf/prog_tests/xdp_synproxy.c | 2 -- tools/testing/selftests/bpf/test_flow_dissector.c | 3 --- tools/testing/selftests/bpf/test_lru_map.c | 1 - tools/testing/selftests/bpf/test_progs.c | 1 - tools/testing/selftests/bpf/test_sock_addr.c | 3 --- tools/testing/selftests/bpf/test_tcpnotify_user.c | 1 - tools/testing/selftests/bpf/veristat.c | 1 - tools/testing/selftests/bpf/xskxceiver.c | 2 -- 61 files changed, 90 deletions(-) diff --git a/tools/testing/selftests/bpf/bench.c b/tools/testing/selftests/bpf/bench.c index 627b74ae041b..ab06bd67a22c 100644 --- a/tools/testing/selftests/bpf/bench.c +++ b/tools/testing/selftests/bpf/bench.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2020 Facebook */ -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/benchs/bench_trigger.c b/tools/testing/selftests/bpf/benchs/bench_trigger.c index 4b05539f167d..dc84469cbfa6 100644 --- a/tools/testing/selftests/bpf/benchs/bench_trigger.c +++ b/tools/testing/selftests/bpf/benchs/bench_trigger.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2020 Facebook */ -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/cgroup_helpers.c b/tools/testing/selftests/bpf/cgroup_helpers.c index 23bb9a9e6a7d..3040ba7cc9ba 100644 --- a/tools/testing/selftests/bpf/cgroup_helpers.c +++ b/tools/testing/selftests/bpf/cgroup_helpers.c @@ -1,5 +1,4 @@ // SPDX-License-Identifier: GPL-2.0 -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/map_tests/task_storage_map.c b/tools/testing/selftests/bpf/map_tests/task_storage_map.c index 7d050364efca..89ff4ed5c59b 100644 --- a/tools/testing/selftests/bpf/map_tests/task_storage_map.c +++ b/tools/testing/selftests/bpf/map_tests/task_storage_map.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2022. Huawei Technologies Co., Ltd */ -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/network_helpers.c b/tools/testing/selftests/bpf/network_helpers.c index 054d26e383e0..e4020cf19424 100644 --- a/tools/testing/selftests/bpf/network_helpers.c +++ b/tools/testing/selftests/bpf/network_helpers.c @@ -1,6 +1,4 @@ // SPDX-License-Identifier: GPL-2.0-only -#define _GNU_SOURCE - #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/bind_perm.c b/tools/testing/selftests/bpf/prog_tests/bind_perm.c index f7cd129cb82b..c3839f425ba5 100644 --- a/tools/testing/selftests/bpf/prog_tests/bind_perm.c +++ b/tools/testing/selftests/bpf/prog_tests/bind_perm.c @@ -1,5 +1,4 @@ // SPDX-License-Identifier: GPL-2.0 -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/bpf_cookie.c b/tools/testing/selftests/bpf/prog_tests/bpf_cookie.c index 4407ea428e77..a47f453dd7e8 100644 --- a/tools/testing/selftests/bpf/prog_tests/bpf_cookie.c +++ b/tools/testing/selftests/bpf/prog_tests/bpf_cookie.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2021 Facebook */ -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/bpf_iter_setsockopt.c b/tools/testing/selftests/bpf/prog_tests/bpf_iter_setsockopt.c index b52ff8ce34db..be8a401eb07a 100644 --- a/tools/testing/selftests/bpf/prog_tests/bpf_iter_setsockopt.c +++ b/tools/testing/selftests/bpf/prog_tests/bpf_iter_setsockopt.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2021 Facebook */ -#define _GNU_SOURCE #include #include #include "network_helpers.h" diff --git a/tools/testing/selftests/bpf/prog_tests/bpf_obj_pinning.c b/tools/testing/selftests/bpf/prog_tests/bpf_obj_pinning.c index ee0458a5ce78..e33129203194 100644 --- a/tools/testing/selftests/bpf/prog_tests/bpf_obj_pinning.c +++ b/tools/testing/selftests/bpf/prog_tests/bpf_obj_pinning.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2023 Meta Platforms, Inc. and affiliates. */ -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/btf_endian.c b/tools/testing/selftests/bpf/prog_tests/btf_endian.c index 5b9f84dbeb43..460b117507bb 100644 --- a/tools/testing/selftests/bpf/prog_tests/btf_endian.c +++ b/tools/testing/selftests/bpf/prog_tests/btf_endian.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2020 Facebook */ -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/btf_skc_cls_ingress.c b/tools/testing/selftests/bpf/prog_tests/btf_skc_cls_ingress.c index ef4d6a3ae423..1a90d6638147 100644 --- a/tools/testing/selftests/bpf/prog_tests/btf_skc_cls_ingress.c +++ b/tools/testing/selftests/bpf/prog_tests/btf_skc_cls_ingress.c @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2020 Facebook */ - -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/cgrp_kfunc.c b/tools/testing/selftests/bpf/prog_tests/cgrp_kfunc.c index adda85f97058..7f1a6ffdda98 100644 --- a/tools/testing/selftests/bpf/prog_tests/cgrp_kfunc.c +++ b/tools/testing/selftests/bpf/prog_tests/cgrp_kfunc.c @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2022 Meta Platforms, Inc. and affiliates. */ - -#define _GNU_SOURCE #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/cgrp_local_storage.c b/tools/testing/selftests/bpf/prog_tests/cgrp_local_storage.c index 747761572098..accd25c2b638 100644 --- a/tools/testing/selftests/bpf/prog_tests/cgrp_local_storage.c +++ b/tools/testing/selftests/bpf/prog_tests/cgrp_local_storage.c @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2022 Meta Platforms, Inc. and affiliates.*/ - -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/cls_redirect.c b/tools/testing/selftests/bpf/prog_tests/cls_redirect.c index 34b59f6baca1..598461560fa1 100644 --- a/tools/testing/selftests/bpf/prog_tests/cls_redirect.c +++ b/tools/testing/selftests/bpf/prog_tests/cls_redirect.c @@ -1,8 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause // Copyright (c) 2020 Cloudflare - -#define _GNU_SOURCE - #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/connect_ping.c b/tools/testing/selftests/bpf/prog_tests/connect_ping.c index 40fe571f2fe7..f315f09391f7 100644 --- a/tools/testing/selftests/bpf/prog_tests/connect_ping.c +++ b/tools/testing/selftests/bpf/prog_tests/connect_ping.c @@ -3,8 +3,6 @@ /* * Copyright 2022 Google LLC. */ - -#define _GNU_SOURCE #include #include "test_progs.h" diff --git a/tools/testing/selftests/bpf/prog_tests/core_retro.c b/tools/testing/selftests/bpf/prog_tests/core_retro.c index 4a2c256c8db6..bb1b2ae3502f 100644 --- a/tools/testing/selftests/bpf/prog_tests/core_retro.c +++ b/tools/testing/selftests/bpf/prog_tests/core_retro.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 // Copyright (c) 2020 Facebook -#define _GNU_SOURCE #include #include "test_core_retro.skel.h" diff --git a/tools/testing/selftests/bpf/prog_tests/d_path.c b/tools/testing/selftests/bpf/prog_tests/d_path.c index ccc768592e66..7f172296c4a1 100644 --- a/tools/testing/selftests/bpf/prog_tests/d_path.c +++ b/tools/testing/selftests/bpf/prog_tests/d_path.c @@ -1,5 +1,4 @@ // SPDX-License-Identifier: GPL-2.0 -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/deny_namespace.c b/tools/testing/selftests/bpf/prog_tests/deny_namespace.c index 1bc6241b755b..ff8d03a906a3 100644 --- a/tools/testing/selftests/bpf/prog_tests/deny_namespace.c +++ b/tools/testing/selftests/bpf/prog_tests/deny_namespace.c @@ -1,5 +1,4 @@ // SPDX-License-Identifier: GPL-2.0 -#define _GNU_SOURCE #include #include "test_deny_namespace.skel.h" #include diff --git a/tools/testing/selftests/bpf/prog_tests/fexit_sleep.c b/tools/testing/selftests/bpf/prog_tests/fexit_sleep.c index f949647dbbc2..4f58a08db082 100644 --- a/tools/testing/selftests/bpf/prog_tests/fexit_sleep.c +++ b/tools/testing/selftests/bpf/prog_tests/fexit_sleep.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2021 Facebook */ -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/flow_dissector_reattach.c b/tools/testing/selftests/bpf/prog_tests/flow_dissector_reattach.c index 9333f7346d15..1f64ffc9a036 100644 --- a/tools/testing/selftests/bpf/prog_tests/flow_dissector_reattach.c +++ b/tools/testing/selftests/bpf/prog_tests/flow_dissector_reattach.c @@ -2,8 +2,6 @@ /* * Tests for attaching, detaching, and replacing flow_dissector BPF program. */ - -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/get_stack_raw_tp.c b/tools/testing/selftests/bpf/prog_tests/get_stack_raw_tp.c index 858e0575f502..080a94cde2dc 100644 --- a/tools/testing/selftests/bpf/prog_tests/get_stack_raw_tp.c +++ b/tools/testing/selftests/bpf/prog_tests/get_stack_raw_tp.c @@ -1,5 +1,4 @@ // SPDX-License-Identifier: GPL-2.0 -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/htab_reuse.c b/tools/testing/selftests/bpf/prog_tests/htab_reuse.c index a742dd994d60..c80f97405cc2 100644 --- a/tools/testing/selftests/bpf/prog_tests/htab_reuse.c +++ b/tools/testing/selftests/bpf/prog_tests/htab_reuse.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2023. Huawei Technologies Co., Ltd */ -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/htab_update.c b/tools/testing/selftests/bpf/prog_tests/htab_update.c index 2bc85f4814f4..37fa7fd75858 100644 --- a/tools/testing/selftests/bpf/prog_tests/htab_update.c +++ b/tools/testing/selftests/bpf/prog_tests/htab_update.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2022. Huawei Technologies Co., Ltd */ -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/map_in_map.c b/tools/testing/selftests/bpf/prog_tests/map_in_map.c index d2a10eb4e5b5..51157f4f4ad6 100644 --- a/tools/testing/selftests/bpf/prog_tests/map_in_map.c +++ b/tools/testing/selftests/bpf/prog_tests/map_in_map.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2023. Huawei Technologies Co., Ltd */ -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/ns_current_pid_tgid.c b/tools/testing/selftests/bpf/prog_tests/ns_current_pid_tgid.c index e72d75d6baa7..fa8c570584d3 100644 --- a/tools/testing/selftests/bpf/prog_tests/ns_current_pid_tgid.c +++ b/tools/testing/selftests/bpf/prog_tests/ns_current_pid_tgid.c @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2020 Carlos Neira cneirabustos@gmail.com */ - -#define _GNU_SOURCE #include #include "test_ns_current_pid_tgid.skel.h" #include diff --git a/tools/testing/selftests/bpf/prog_tests/perf_branches.c b/tools/testing/selftests/bpf/prog_tests/perf_branches.c index bc24f83339d6..d7b6e9405260 100644 --- a/tools/testing/selftests/bpf/prog_tests/perf_branches.c +++ b/tools/testing/selftests/bpf/prog_tests/perf_branches.c @@ -1,5 +1,4 @@ // SPDX-License-Identifier: GPL-2.0 -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/perf_buffer.c b/tools/testing/selftests/bpf/prog_tests/perf_buffer.c index 5fc2b3a0711e..d3775af00b0b 100644 --- a/tools/testing/selftests/bpf/prog_tests/perf_buffer.c +++ b/tools/testing/selftests/bpf/prog_tests/perf_buffer.c @@ -1,5 +1,4 @@ // SPDX-License-Identifier: GPL-2.0 -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/perf_event_stackmap.c b/tools/testing/selftests/bpf/prog_tests/perf_event_stackmap.c index f4aad35afae1..5edbeaf45459 100644 --- a/tools/testing/selftests/bpf/prog_tests/perf_event_stackmap.c +++ b/tools/testing/selftests/bpf/prog_tests/perf_event_stackmap.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 // Copyright (c) 2020 Facebook -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/perf_link.c b/tools/testing/selftests/bpf/prog_tests/perf_link.c index 3a25f1c743a1..083680a47748 100644 --- a/tools/testing/selftests/bpf/prog_tests/perf_link.c +++ b/tools/testing/selftests/bpf/prog_tests/perf_link.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2021 Facebook */ -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/perf_skip.c b/tools/testing/selftests/bpf/prog_tests/perf_skip.c index 37d8618800e4..92bee9815834 100644 --- a/tools/testing/selftests/bpf/prog_tests/perf_skip.c +++ b/tools/testing/selftests/bpf/prog_tests/perf_skip.c @@ -1,6 +1,4 @@ // SPDX-License-Identifier: GPL-2.0 -#define _GNU_SOURCE - #include #include "test_perf_skip.skel.h" #include diff --git a/tools/testing/selftests/bpf/prog_tests/preempted_bpf_ma_op.c b/tools/testing/selftests/bpf/prog_tests/preempted_bpf_ma_op.c index 3a2ec3923fca..63356b8410e8 100644 --- a/tools/testing/selftests/bpf/prog_tests/preempted_bpf_ma_op.c +++ b/tools/testing/selftests/bpf/prog_tests/preempted_bpf_ma_op.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2023. Huawei Technologies Co., Ltd */ -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/rcu_read_lock.c b/tools/testing/selftests/bpf/prog_tests/rcu_read_lock.c index a1f7e7378a64..da4391d9105d 100644 --- a/tools/testing/selftests/bpf/prog_tests/rcu_read_lock.c +++ b/tools/testing/selftests/bpf/prog_tests/rcu_read_lock.c @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2022 Meta Platforms, Inc. and affiliates.*/ - -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/reg_bounds.c b/tools/testing/selftests/bpf/prog_tests/reg_bounds.c index eb74363f9f70..ba59d6ef1c57 100644 --- a/tools/testing/selftests/bpf/prog_tests/reg_bounds.c +++ b/tools/testing/selftests/bpf/prog_tests/reg_bounds.c @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2023 Meta Platforms, Inc. and affiliates. */ - -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/ringbuf.c b/tools/testing/selftests/bpf/prog_tests/ringbuf.c index 4c6f42dae409..0091a42f88ce 100644 --- a/tools/testing/selftests/bpf/prog_tests/ringbuf.c +++ b/tools/testing/selftests/bpf/prog_tests/ringbuf.c @@ -1,5 +1,4 @@ // SPDX-License-Identifier: GPL-2.0 -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/ringbuf_multi.c b/tools/testing/selftests/bpf/prog_tests/ringbuf_multi.c index 58522195081b..3dce8575fbb4 100644 --- a/tools/testing/selftests/bpf/prog_tests/ringbuf_multi.c +++ b/tools/testing/selftests/bpf/prog_tests/ringbuf_multi.c @@ -1,5 +1,4 @@ // SPDX-License-Identifier: GPL-2.0 -#define _GNU_SOURCE #include #include #include "test_ringbuf_multi.skel.h" diff --git a/tools/testing/selftests/bpf/prog_tests/setget_sockopt.c b/tools/testing/selftests/bpf/prog_tests/setget_sockopt.c index 7d4a9b3d3722..fc20202d87c8 100644 --- a/tools/testing/selftests/bpf/prog_tests/setget_sockopt.c +++ b/tools/testing/selftests/bpf/prog_tests/setget_sockopt.c @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (c) Meta Platforms, Inc. and affiliates. */ - -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/sk_assign.c b/tools/testing/selftests/bpf/prog_tests/sk_assign.c index 0b9bd1d6f7cc..da3e2e98a894 100644 --- a/tools/testing/selftests/bpf/prog_tests/sk_assign.c +++ b/tools/testing/selftests/bpf/prog_tests/sk_assign.c @@ -7,8 +7,6 @@ * socket, regardless of whether the port or address destination of the traffic * matches the port. */ - -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/sk_lookup.c b/tools/testing/selftests/bpf/prog_tests/sk_lookup.c index 597d0467a926..86d4831133db 100644 --- a/tools/testing/selftests/bpf/prog_tests/sk_lookup.c +++ b/tools/testing/selftests/bpf/prog_tests/sk_lookup.c @@ -13,8 +13,6 @@ * * Tests run in a dedicated network namespace. */ - -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/sock_fields.c b/tools/testing/selftests/bpf/prog_tests/sock_fields.c index 7d23166c77af..8159bcac07df 100644 --- a/tools/testing/selftests/bpf/prog_tests/sock_fields.c +++ b/tools/testing/selftests/bpf/prog_tests/sock_fields.c @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2019 Facebook */ - -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/task_kfunc.c b/tools/testing/selftests/bpf/prog_tests/task_kfunc.c index d4579f735398..a3964524120f 100644 --- a/tools/testing/selftests/bpf/prog_tests/task_kfunc.c +++ b/tools/testing/selftests/bpf/prog_tests/task_kfunc.c @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2022 Meta Platforms, Inc. and affiliates. */ - -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/task_local_storage.c b/tools/testing/selftests/bpf/prog_tests/task_local_storage.c index c33c05161a9e..6ba2ea723d4e 100644 --- a/tools/testing/selftests/bpf/prog_tests/task_local_storage.c +++ b/tools/testing/selftests/bpf/prog_tests/task_local_storage.c @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2021 Facebook */ - -#define _GNU_SOURCE /* See feature_test_macros(7) */ #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/task_pt_regs.c b/tools/testing/selftests/bpf/prog_tests/task_pt_regs.c index f000734a3d1f..87237ecdb3eb 100644 --- a/tools/testing/selftests/bpf/prog_tests/task_pt_regs.c +++ b/tools/testing/selftests/bpf/prog_tests/task_pt_regs.c @@ -1,5 +1,4 @@ // SPDX-License-Identifier: GPL-2.0 -#define _GNU_SOURCE #include #include "test_task_pt_regs.skel.h" diff --git a/tools/testing/selftests/bpf/prog_tests/tcp_custom_syncookie.c b/tools/testing/selftests/bpf/prog_tests/tcp_custom_syncookie.c index eaf441dc7e79..05f1b3aa5ebd 100644 --- a/tools/testing/selftests/bpf/prog_tests/tcp_custom_syncookie.c +++ b/tools/testing/selftests/bpf/prog_tests/tcp_custom_syncookie.c @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright Amazon.com Inc. or its affiliates. */ - -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c b/tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c index 56685fc03c7e..664d8c111c25 100644 --- a/tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c +++ b/tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2020 Facebook */ - -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/test_bpf_ma.c b/tools/testing/selftests/bpf/prog_tests/test_bpf_ma.c index ccae0b31ac6c..fbc510772bf8 100644 --- a/tools/testing/selftests/bpf/prog_tests/test_bpf_ma.c +++ b/tools/testing/selftests/bpf/prog_tests/test_bpf_ma.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2023. Huawei Technologies Co., Ltd */ -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/test_bpf_syscall_macro.c b/tools/testing/selftests/bpf/prog_tests/test_bpf_syscall_macro.c index 2900c5e9a016..fcc045e1942d 100644 --- a/tools/testing/selftests/bpf/prog_tests/test_bpf_syscall_macro.c +++ b/tools/testing/selftests/bpf/prog_tests/test_bpf_syscall_macro.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright 2022 Sony Group Corporation */ -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/test_bpffs.c b/tools/testing/selftests/bpf/prog_tests/test_bpffs.c index ea933fd151c3..c685d13bd6f8 100644 --- a/tools/testing/selftests/bpf/prog_tests/test_bpffs.c +++ b/tools/testing/selftests/bpf/prog_tests/test_bpffs.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2020 Facebook */ -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/test_overhead.c b/tools/testing/selftests/bpf/prog_tests/test_overhead.c index f27013e38d03..f9d9ee8f2fa4 100644 --- a/tools/testing/selftests/bpf/prog_tests/test_overhead.c +++ b/tools/testing/selftests/bpf/prog_tests/test_overhead.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-only /* Copyright (c) 2019 Facebook */ -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/token.c b/tools/testing/selftests/bpf/prog_tests/token.c index fc4a175d8d76..0b43aeda54a2 100644 --- a/tools/testing/selftests/bpf/prog_tests/token.c +++ b/tools/testing/selftests/bpf/prog_tests/token.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2023 Meta Platforms, Inc. and affiliates. */ -#define _GNU_SOURCE #include #include #include "cap_helpers.h" diff --git a/tools/testing/selftests/bpf/prog_tests/trace_ext.c b/tools/testing/selftests/bpf/prog_tests/trace_ext.c index aabdff7bea3e..f389bd922ef3 100644 --- a/tools/testing/selftests/bpf/prog_tests/trace_ext.c +++ b/tools/testing/selftests/bpf/prog_tests/trace_ext.c @@ -1,6 +1,4 @@ // SPDX-License-Identifier: GPL-2.0 - -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/trampoline_count.c b/tools/testing/selftests/bpf/prog_tests/trampoline_count.c index 6cd7349d4a2b..f21d7b7dd05e 100644 --- a/tools/testing/selftests/bpf/prog_tests/trampoline_count.c +++ b/tools/testing/selftests/bpf/prog_tests/trampoline_count.c @@ -1,5 +1,4 @@ // SPDX-License-Identifier: GPL-2.0-only -#define _GNU_SOURCE #include struct inst { diff --git a/tools/testing/selftests/bpf/prog_tests/user_ringbuf.c b/tools/testing/selftests/bpf/prog_tests/user_ringbuf.c index e51721df14fc..7532139c8dbd 100644 --- a/tools/testing/selftests/bpf/prog_tests/user_ringbuf.c +++ b/tools/testing/selftests/bpf/prog_tests/user_ringbuf.c @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2022 Meta Platforms, Inc. and affiliates. */ - -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/xdp_bonding.c b/tools/testing/selftests/bpf/prog_tests/xdp_bonding.c index 6d8b54124cb3..ca2e652a0716 100644 --- a/tools/testing/selftests/bpf/prog_tests/xdp_bonding.c +++ b/tools/testing/selftests/bpf/prog_tests/xdp_bonding.c @@ -8,8 +8,6 @@ * are correctly loaded onto the slave devices and XDP_TX'd * packets are balanced using bonding. */ - -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/prog_tests/xdp_synproxy.c b/tools/testing/selftests/bpf/prog_tests/xdp_synproxy.c index 8b50a992d233..9496b576e6f5 100644 --- a/tools/testing/selftests/bpf/prog_tests/xdp_synproxy.c +++ b/tools/testing/selftests/bpf/prog_tests/xdp_synproxy.c @@ -1,7 +1,5 @@ // SPDX-License-Identifier: LGPL-2.1 OR BSD-2-Clause /* Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. */ - -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/test_flow_dissector.c b/tools/testing/selftests/bpf/test_flow_dissector.c index 571cc076dd7d..e427c7e5dd94 100644 --- a/tools/testing/selftests/bpf/test_flow_dissector.c +++ b/tools/testing/selftests/bpf/test_flow_dissector.c @@ -6,9 +6,6 @@ * GRE/GUE/BARE outer layer 4, where bare is IPIP/SIT/IPv4-in-IPv6/.. * IPv4/IPv6 inner layer 3 */ - -#define _GNU_SOURCE - #include #include #include diff --git a/tools/testing/selftests/bpf/test_lru_map.c b/tools/testing/selftests/bpf/test_lru_map.c index 4d0650cfb5cd..82ca6df67eab 100644 --- a/tools/testing/selftests/bpf/test_lru_map.c +++ b/tools/testing/selftests/bpf/test_lru_map.c @@ -2,7 +2,6 @@ /* * Copyright (c) 2016 Facebook */ -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/test_progs.c b/tools/testing/selftests/bpf/test_progs.c index 89ff704e9dad..87b77f4f1ee5 100644 --- a/tools/testing/selftests/bpf/test_progs.c +++ b/tools/testing/selftests/bpf/test_progs.c @@ -1,7 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* Copyright (c) 2017 Facebook */ -#define _GNU_SOURCE #include "test_progs.h" #include "testing_helpers.h" #include "cgroup_helpers.h" diff --git a/tools/testing/selftests/bpf/test_sock_addr.c b/tools/testing/selftests/bpf/test_sock_addr.c index aa2198a0f24d..5c0a304ecd84 100644 --- a/tools/testing/selftests/bpf/test_sock_addr.c +++ b/tools/testing/selftests/bpf/test_sock_addr.c @@ -1,8 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 // Copyright (c) 2018 Facebook - -#define _GNU_SOURCE - #include #include #include diff --git a/tools/testing/selftests/bpf/test_tcpnotify_user.c b/tools/testing/selftests/bpf/test_tcpnotify_user.c index 595194453ff8..b415f6457a49 100644 --- a/tools/testing/selftests/bpf/test_tcpnotify_user.c +++ b/tools/testing/selftests/bpf/test_tcpnotify_user.c @@ -1,5 +1,4 @@ // SPDX-License-Identifier: GPL-2.0 -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/veristat.c b/tools/testing/selftests/bpf/veristat.c index b2854238d4a0..d720947a7896 100644 --- a/tools/testing/selftests/bpf/veristat.c +++ b/tools/testing/selftests/bpf/veristat.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) /* Copyright (c) 2022 Meta Platforms, Inc. and affiliates. */ -#define _GNU_SOURCE #include #include #include diff --git a/tools/testing/selftests/bpf/xskxceiver.c b/tools/testing/selftests/bpf/xskxceiver.c index 2eac0895b0a1..101e37a0cb1b 100644 --- a/tools/testing/selftests/bpf/xskxceiver.c +++ b/tools/testing/selftests/bpf/xskxceiver.c @@ -70,8 +70,6 @@ * To enable L2 - L4 headers and payload dump of each packet on STDOUT, add * parameter -D to params array in test_xsk.sh, i.e. params=("-S" "-D") */ - -#define _GNU_SOURCE #include #include #include