[PATCH v2 0/3] Fixes for compaction_test

2024-05-21 Thread Dev Jain
The compaction_test memory selftest introduces fragmentation in memory and then tries to allocate as many hugepages as possible. This series addresses some problems. On Aarch64, if nr_hugepages == 0, then the test trivially succeeds since compaction_index becomes 0, which is less than 3, due to no

[PATCH v2 1/3] selftests/mm: compaction_test: Fix bogus test success on Aarch64

2024-05-21 Thread Dev Jain
Currently, if at runtime we are not able to allocate a huge page, the test will trivially pass on Aarch64 due to no exception being raised on division by zero while computing compaction_index. Fix that by checking for nr_hugepages == 0. Anyways, in general, avoid a division by zero by exiting the p

[PATCH v2 2/3] selftests/mm: compaction_test: Fix incorrect write of zero to nr_hugepages

2024-05-21 Thread Dev Jain
Currently, the test tries to set nr_hugepages to zero, but that is not actually done because the file offset is not reset after read(). Fix that using lseek(). Fixes: bd67d5c15cc1 ("Test compaction of mlocked memory") Cc: sta...@vger.kernel.org Signed-off-by: Dev Jain --- tools/testing/selftests

[PATCH v2 3/3] selftests/mm: compaction_test: Fix bogus test success and reduce probability of OOM-killer invocation

2024-05-21 Thread Dev Jain
Reset nr_hugepages to zero before the start of the test. If a non-zero number of hugepages is already set before the start of the test, the following problems arise: - The probability of the test getting OOM-killed increases. Proof: The test wants to run on 80% of available memory to prevent OOM

Re: [PATCH v5 07/16] riscv: add ISA extensions validation callback

2024-05-21 Thread Clément Léger
On 17/05/2024 18:44, Conor Dooley wrote: > On Fri, May 17, 2024 at 04:52:47PM +0200, Clément Léger wrote: >> Since a few extensions (Zicbom/Zicboz) already needs validation and >> future ones will need it as well (Zc*) add a validate() callback to >> struct riscv_isa_ext_data. This require to re

[PATCH net] selftests: hsr: Fix "File exists" errors for hsr_ping

2024-05-21 Thread Geliang Tang
From: Geliang Tang The hsr_ping test reports the following errors: INFO: preparing interfaces for HSRv0. INFO: Initial validation ping. INFO: Longer ping test. INFO: Cutting one link. INFO: Delay the link and drop a few packages. INFO: All good. INFO: preparing interfaces for HSRv1. RTNE

[PATCH v5 3/5] cgroup/pids: Add pids.events.local

2024-05-21 Thread Michal Koutný
Hierarchical counting of events is not practical for watching when a particular pids.max is being hit. Therefore introduce .local flavor of events file (akin to memory controller) that collects only events relevant to given cgroup. The file is only added to the default hierarchy. Signed-off-by: M

[PATCH v5 1/5] cgroup/pids: Separate semantics of pids.events related to pids.max

2024-05-21 Thread Michal Koutný
Currently, when pids.max limit is breached in the hierarchy, the event is counted and reported in the cgroup where the forking task resides. This decouples the limit and the notification caused by the limit making it hard to detect when the actual limit was effected. Redefine the pids.events:max

[PATCH v5 0/5] pids controller events rework

2024-05-21 Thread Michal Koutný
This makes pids.events:max affine to pids.max limit. How are the new events supposed to be useful? - pids.events.local:max - tells that cgroup's limit is hit (too tight?) - pids.events:* - "only" directs top-down search to cgroups of interest Changes from v4 (https://lore.kernel.org/r/20240

[PATCH v5 4/5] selftests: cgroup: Lexicographic order in Makefile

2024-05-21 Thread Michal Koutný
This will reduce number of conflicts when modifying the lists. Signed-off-by: Michal Koutný --- tools/testing/selftests/cgroup/.gitignore | 10 +- tools/testing/selftests/cgroup/Makefile | 23 --- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/tool

[PATCH v5 2/5] cgroup/pids: Make event counters hierarchical

2024-05-21 Thread Michal Koutný
The pids.events file should honor the hierarchy, so make the events propagate from their origin up to the root on the unified hierarchy. The legacy behavior remains non-hierarchical. Signed-off-by: Michal Koutný --- Documentation/admin-guide/cgroup-v2.rst | 9 +++-- kernel/cgroup/pids.c

[PATCH v5 5/5] selftests: cgroup: Add basic tests for pids controller

2024-05-21 Thread Michal Koutný
This commit adds (and wires in) new test program for checking basic pids controller functionality -- restricting tasks in a cgroup and correct event counting. Signed-off-by: Michal Koutný --- tools/testing/selftests/cgroup/.gitignore | 1 + tools/testing/selftests/cgroup/Makefile| 2 +

Re: [PATCH 0/3] kci-gitlab: Introducing GitLab-CI Pipeline for Kernel Testing

2024-05-21 Thread Jarkko Sakkinen
On Thu Feb 29, 2024 at 12:55 AM EET, Helen Koike wrote: > Dear Kernel Community, > > This patch introduces a `.gitlab-ci` file along with a `ci/` folder, defining > a > basic test pipeline triggered by code pushes to a GitLab-CI instance. This > initial version includes static checks (checkpatch a

Re: [PATCHv2 net] selftests/net: use tc rule to filter the na packet

2024-05-21 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (main) by Paolo Abeni : On Fri, 17 May 2024 09:03:27 +0800 you wrote: > Test arp_ndisc_untracked_subnets use tcpdump to filter the unsolicited > and untracked na messages. It set -e before calling tcpdump. But if > tcpdump filters 0 packet, it will

Re: [PATCH] selftests/mm: va_high_addr_switch: Do not skip test and give warning message post FEAT_LPA2

2024-05-21 Thread Dev Jain
On 5/20/24 05:18, Andrew Morton wrote: On Thu, 16 May 2024 09:26:33 +0530 Dev Jain wrote: Post FEAT_LPA2, Aarch64 extends the 4KB and 16KB translation granule to large virtual addresses. Currently, the test is being skipped for said granule sizes, because the page sizes have been statically

Re: [PATCH] tracing/selftests: Fix kprobe event name test for .isra. functions

2024-05-21 Thread Shuah Khan
On 5/20/24 19:51, Steven Rostedt wrote: On Tue, 21 May 2024 10:49:19 +0900 Masami Hiramatsu (Google) wrote: It is listed twice. This causes the attached kprobe to it to fail which in turn fails the test. Instead of just picking the function function that is found in available_filter_functions,

Re: [PATCH v10 0/5] Introduce mseal

2024-05-21 Thread Liam R. Howlett
TL;DR for Andrew (and to save his page down key): Reviewed-by: Liam R. Howlett * Jeff Xu [240515 20:59]: > On Wed, May 15, 2024 at 3:19 PM Liam R. Howlett > wrote: > > > > * Jeff Xu [240515 13:18]: > > ... > > > > > The current mseal patch does up-front checking in two different > > > si

Re: [PATCH bpf-next v2 1/4] selftests/bpf: Use post_socket_cb in connect_to_fd_opts

2024-05-21 Thread Martin KaFai Lau
On 5/14/24 9:20 PM, Geliang Tang wrote: From: Geliang Tang Since the post_socket_cb() callback is added in struct network_helper_opts, it's make sense to use it not only in __start_server(), but also in connect_to_fd_opts(). Then it can be used to set TCP_CONGESTION sockopt. Add a post_socket_

Re: [PATCH bpf-next v2 2/4] selftests/bpf: Use start_server_addr in bpf_tcp_ca

2024-05-21 Thread Martin KaFai Lau
On 5/14/24 9:20 PM, Geliang Tang wrote: From: Geliang Tang This patch uses start_server_addr() in do_test() in prog_tests/bpf_tcp_ca.c to accept a struct network_helper_opts argument instead of using start_server() and settcpca(). Then change the type of the first paramenter of do_test() into a

[PATCH] kselftest/arm64: Include kernel mode NEON in fp-stress

2024-05-21 Thread Mark Brown
Currently fp-stress only covers userspace use of floating point, it does not cover any kernel mode uses. Since currently kernel mode floating point usage can't be preempted and there are explicit preemption points in the existing implementations this isn't so important for fp-stress but when we re

Re: [PATCH bpf-next] selftests/bpf: Fix prog numbers in test_sockmap

2024-05-21 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to bpf/bpf-next.git (master) by Andrii Nakryiko : On Fri, 17 May 2024 14:21:46 +0800 you wrote: > From: Geliang Tang > > bpf_prog5 and bpf_prog7 are removed from progs/test_sockmap_kern.h in > commit d79a32129b21 ("bpf: Selftests, remove prints from sockmap tests")

Re: [PATCH v5 08/16] riscv: add ISA parsing for Zca, Zcf, Zcd and Zcb

2024-05-21 Thread Conor Dooley
On Fri, May 17, 2024 at 04:52:48PM +0200, Clément Léger wrote: > +static int riscv_ext_zca_depends(const struct riscv_isa_ext_data *data, > + const unsigned long *isa_bitmap) > +{ > + return __riscv_isa_extension_available(isa_bitmap, RISCV_ISA_EXT_ZCA) ? > 0 : -E

Re: [PATCH 1/2] KVM: selftests: Fix nx_huge_pages_test for default_hugepagesz=1G

2024-05-21 Thread Zhang, Dongsheng X
Hi, Shuah, Any comment on this series? Thanks, don On 4/24/2024 3:44 PM, Dongsheng Zhang wrote: > From: donsheng > > If the host was booted with the "default_hugepagesz=1G" kernel command-line > parameter, running the NX hugepage test will fail with error "Invalid > argument" > at the TEST_A

Re: [PATCH v10 0/5] Introduce mseal

2024-05-21 Thread Jeff Xu
On Tue, May 21, 2024 at 9:00 AM Liam R. Howlett wrote: > > > TL;DR for Andrew (and to save his page down key): > > Reviewed-by: Liam R. Howlett > Many thanks! -Jeff

[PATCH v5 00/68] Define _GNU_SOURCE for sources using

2024-05-21 Thread Edward Liaw
move Fixes tag from patches that drop _GNU_SOURCE definition. - Restore space between comment and includes for selftests/damon. v5: - Rebase onto linux-next 20240521 - Drop initial patches that modify KHDR_INCLUDES. - Incorporate Mark Brown's patch to replace static_assert with warning

[PATCH v5 01/68] selftests: Compile with -D_GNU_SOURCE when including lib.mk

2024-05-21 Thread Edward Liaw
lib.mk will add -D_GNU_SOURCE to CFLAGS by default. This will make it unnecessary to add #define _GNU_SOURCE in the source code. Suggested-by: John Hubbard Signed-off-by: Edward Liaw --- tools/testing/selftests/lib.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/selftes

[PATCH v5 02/68] kselftest: Desecalate reporting of missing _GNU_SOURCE

2024-05-21 Thread Edward Liaw
From: Mark Brown 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 o

[PATCH v5 03/68] selftests/arm64: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/arm64/fp/fp-ptrace.c | 3 --- tools/testing/selftests/arm64/fp/fp-stress.c | 2 -- tools/testing/selftests/arm64/fp/vlset.

[PATCH v5 04/68] selftests/arm64: Drop duplicate -D_GNU_SOURCE

2024-05-21 Thread Edward Liaw
-D_GNU_SOURCE can be de-duplicated here, as it is added by lib.mk. Signed-off-by: Edward Liaw --- tools/testing/selftests/arm64/signal/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/arm64/signal/Makefile b/tools/testing/selftests/arm64/signa

[PATCH v5 05/68] selftests/bpf: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. 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/cgro

[PATCH v5 06/68] selftests/breakpoints: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/breakpoints/breakpoint_test_arm64.c | 3 --- tools/testing/selftests/breakpoints/step_after_suspend_test.c | 3 --- 2 files changed, 6 deletions(-

[PATCH v5 07/68] selftests/cachestat: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Reviewed-by: John Hubbard Reviewed-by: Muhammad Usama Anjum Signed-off-by: Edward Liaw --- tools/testing/selftests/cachestat/test_cachestat.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/

[PATCH v5 08/68] selftests/capabilities: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Reviewed-by: John Hubbard Reviewed-by: Muhammad Usama Anjum Signed-off-by: Edward Liaw --- tools/testing/selftests/capabilities/test_execve.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/

[PATCH v5 09/68] selftests/cgroup: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/cgroup/cgroup_util.c| 3 --- tools/testing/selftests/cgroup/test_core.c | 2 -- tools/testing/selftests/cgroup/test_cpu.c

[PATCH v5 10/68] selftests/clone3: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Reviewed-by: John Hubbard Reviewed-by: Muhammad Usama Anjum Signed-off-by: Edward Liaw --- tools/testing/selftests/clone3/clone3.c| 2 -- tools/testing/selftests/clone3/clone3_c

[PATCH v5 11/68] selftests/core: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Reviewed-by: John Hubbard Reviewed-by: Muhammad Usama Anjum Signed-off-by: Edward Liaw --- tools/testing/selftests/core/close_range_test.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/tes

[PATCH v5 12/68] selftests/damon: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Reviewed-by: SeongJae Park Signed-off-by: Edward Liaw --- tools/testing/selftests/damon/debugfs_target_ids_pid_leak.c | 2 -- .../damon/debugfs_target_ids_read_before_terminate_race.c | 1 - 2

[PATCH v5 13/68] selftests/drivers: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Reviewed-by: John Hubbard Reviewed-by: Muhammad Usama Anjum Signed-off-by: Edward Liaw --- tools/testing/selftests/drivers/dma-buf/udmabuf.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/tes

[PATCH v5 14/68] selftests/exec: Drop duplicate -D_GNU_SOURCE

2024-05-21 Thread Edward Liaw
-D_GNU_SOURCE can be de-duplicated here, as it is added by lib.mk. Acked-by: Kees Cook Signed-off-by: Edward Liaw --- tools/testing/selftests/exec/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/exec/Makefile b/tools/testing/selftests/exec/Makefile index fb4

[PATCH v5 15/68] selftests/fchmodat2: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Reviewed-by: John Hubbard Reviewed-by: Muhammad Usama Anjum Signed-off-by: Edward Liaw --- tools/testing/selftests/fchmodat2/fchmodat2_test.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/

[PATCH v5 16/68] selftests/filelock: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/filelock/ofdlocks.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/testing/selftests/filelock/ofdlocks.c b/tools/testing/selftests/file

[PATCH v5 17/68] selftests/filesystems: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Reviewed-by: John Hubbard Reviewed-by: Muhammad Usama Anjum Signed-off-by: Edward Liaw --- tools/testing/selftests/filesystems/binderfs/binderfs_test.c | 2 -- tools/testing/selftests/filesystems/dev

[PATCH v5 18/68] selftests/firmware: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/firmware/fw_namespace.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/firmware/fw_namespace.c b/tools/testing/selftest

[PATCH v5 19/68] selftests/fpu: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/fpu/test_fpu.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/testing/selftests/fpu/test_fpu.c b/tools/testing/selftests/fpu/test_fpu.c

[PATCH v5 20/68] selftests/futex: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Reviewed-by: John Hubbard Reviewed-by: Muhammad Usama Anjum Signed-off-by: Edward Liaw --- tools/testing/selftests/futex/functional/futex_requeue_pi.c | 3 --- 1 file changed, 3 deletions(-) diff --gi

[PATCH v5 21/68] selftests/futex: Drop duplicate -D_GNU_SOURCE

2024-05-21 Thread Edward Liaw
-D_GNU_SOURCE can be de-duplicated here, as it is added by lib.mk. Reviewed-by: John Hubbard Reviewed-by: Muhammad Usama Anjum Signed-off-by: Edward Liaw --- tools/testing/selftests/futex/functional/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/self

[PATCH v5 22/68] selftests/intel_pstate: Drop duplicate -D_GNU_SOURCE

2024-05-21 Thread Edward Liaw
-D_GNU_SOURCE can be de-duplicated here, as it is added by lib.mk. Signed-off-by: Edward Liaw --- tools/testing/selftests/intel_pstate/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/intel_pstate/Makefile b/tools/testing/selftests/intel_pstat

[PATCH v5 23/68] selftests/iommu: Drop duplicate -D_GNU_SOURCE

2024-05-21 Thread Edward Liaw
-D_GNU_SOURCE can be de-duplicated here, as it is added by lib.mk. Reviewed-by: John Hubbard Reviewed-by: Muhammad Usama Anjum Signed-off-by: Edward Liaw --- tools/testing/selftests/iommu/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/testing/selftests/iommu/Makefile b/to

[PATCH v5 24/68] selftests/ipc: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Reviewed-by: John Hubbard Reviewed-by: Muhammad Usama Anjum Signed-off-by: Edward Liaw --- tools/testing/selftests/ipc/msgque.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftest

[PATCH v5 25/68] selftests/kcmp: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Reviewed-by: John Hubbard Reviewed-by: Muhammad Usama Anjum Signed-off-by: Edward Liaw --- tools/testing/selftests/kcmp/kcmp_test.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/testing/se

[PATCH v5 26/68] selftests/landlock: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Reviewed-by: John Hubbard Reviewed-by: Muhammad Usama Anjum Signed-off-by: Edward Liaw --- tools/testing/selftests/landlock/base_test.c | 2 -- tools/testing/selftests/landlock/fs_test.c | 2 --

[PATCH v5 27/68] selftests/lsm: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Reviewed-by: John Hubbard Reviewed-by: Muhammad Usama Anjum Signed-off-by: Edward Liaw --- tools/testing/selftests/lsm/common.c | 2 -- tools/testing/selftests/lsm/lsm_get_self_attr_tes

[PATCH v5 28/68] selftests/membarrier: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Reviewed-by: John Hubbard Reviewed-by: Muhammad Usama Anjum Signed-off-by: Edward Liaw --- tools/testing/selftests/membarrier/membarrier_test_impl.h| 1 - .../testing/selftests/membarrier/memba

[PATCH v5 29/68] selftests/memfd: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Reviewed-by: John Hubbard Reviewed-by: Muhammad Usama Anjum Signed-off-by: Edward Liaw --- tools/testing/selftests/memfd/common.c | 1 - tools/testing/selftests/memfd/fuse_test.c | 2 -- tools/tes

[PATCH v5 30/68] selftests/mincore: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/mincore/mincore_selftest.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/testing/selftests/mincore/mincore_selftest.c b/tools/testing

[PATCH v5 31/68] selftests/mm: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/mm/cow.c | 1 - tools/testing/selftests/mm/gup_longterm.c | 1 - tools/testing/selftests/mm/hugepage-mmap.c | 1 -

[PATCH v5 32/68] selftests/mount: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/mount/nosymfollow-test.c | 1 - tools/testing/selftests/mount/unprivileged-remount-test.c | 1 - 2 files changed, 2 deletions(-) diff --gi

[PATCH v5 33/68] selftests/mount_setattr: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Reviewed-by: John Hubbard Reviewed-by: Muhammad Usama Anjum Signed-off-by: Edward Liaw --- tools/testing/selftests/mount_setattr/mount_setattr_test.c | 1 - 1 file changed, 1 deletion(-) diff --git a/

[PATCH v5 34/68] selftests/move_mount_set_group: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Reviewed-by: John Hubbard Reviewed-by: Muhammad Usama Anjum Signed-off-by: Edward Liaw --- .../selftests/move_mount_set_group/move_mount_set_group_test.c | 1 - 1 file changed, 1 deletion(-) diff --

[PATCH v5 35/68] selftests/mqueue: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/mqueue/mq_perf_tests.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/mqueue/mq_perf_tests.c b/tools/testing/selftests/

[PATCH v5 36/68] selftests/net: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/net/af_unix/diag_uid.c | 2 -- tools/testing/selftests/net/af_unix/scm_pidfd.c | 1 - tools/testing/selftests/net/af_unix

[PATCH v5 37/68] selftests/net: Drop duplicate -D_GNU_SOURCE

2024-05-21 Thread Edward Liaw
-D_GNU_SOURCE can be de-duplicated here, as it is added by lib.mk. Reviewed-by: John Hubbard Reviewed-by: Muhammad Usama Anjum Signed-off-by: Edward Liaw --- tools/testing/selftests/net/tcp_ao/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/

[PATCH v5 38/68] selftests/nsfs: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/nsfs/owner.c | 1 - tools/testing/selftests/nsfs/pidns.c | 1 - 2 files changed, 2 deletions(-) diff --git a/tools/testing/selftests/nsfs/owner.c

[PATCH v5 39/68] selftests/openat2: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/openat2/helpers.c| 2 -- tools/testing/selftests/openat2/helpers.h| 1 - tools/testing/selftests/openat2/openat2_test.c

[PATCH v5 40/68] selftests/perf_events: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/perf_events/remove_on_exec.c | 2 -- tools/testing/selftests/perf_events/sigtrap_threads.c | 2 -- tools/testing/selftests/perf_events/watermark_

[PATCH v5 41/68] selftests/pid_namespace: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Reviewed-by: John Hubbard Reviewed-by: Muhammad Usama Anjum Signed-off-by: Edward Liaw --- tools/testing/selftests/pid_namespace/regression_enomem.c | 1 - 1 file changed, 1 deletion(-) diff --git a/t

[PATCH v5 42/68] selftests/pidfd: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Reviewed-by: John Hubbard Reviewed-by: Muhammad Usama Anjum Signed-off-by: Edward Liaw --- tools/testing/selftests/pidfd/pidfd.h | 1 - tools/testing/selftests/pidfd/pidfd_fdinfo_test.c | 2

[PATCH v5 43/68] selftests/ptrace: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Reviewed-by: John Hubbard Reviewed-by: Muhammad Usama Anjum Signed-off-by: Edward Liaw --- tools/testing/selftests/ptrace/get_set_sud.c | 1 - tools/testing/selftests/ptrace/peeksiginfo.c | 1 - 2 file

[PATCH v5 44/68] selftests/powerpc: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/powerpc/benchmarks/context_switch.c| 2 -- tools/testing/selftests/powerpc/benchmarks/exec_target.c | 2 -- tools/testing/selftests/powerp

[PATCH v5 45/68] selftests/proc: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/proc/proc-empty-vm.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/testing/selftests/proc/proc-empty-vm.c b/tools/testing/selftests/p

[PATCH v5 46/68] selftests/proc: Drop duplicate -D_GNU_SOURCE

2024-05-21 Thread Edward Liaw
-D_GNU_SOURCE can be de-duplicated here, as it is added by lib.mk. Signed-off-by: Edward Liaw --- tools/testing/selftests/proc/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/proc/Makefile b/tools/testing/selftests/proc/Makefile index cd95369254c0..25c34cc923

[PATCH v5 47/68] selftests/ptp: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/ptp/testptp.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/ptp/testptp.c b/tools/testing/selftests/ptp/testptp.c inde

[PATCH v5 48/68] selftests/resctrl: Drop duplicate -D_GNU_SOURCE

2024-05-21 Thread Edward Liaw
-D_GNU_SOURCE can be de-duplicated here, as it is added by lib.mk. Reviewed-by: John Hubbard Reviewed-by: Muhammad Usama Anjum Acked-by: Reinette Chatre Signed-off-by: Edward Liaw --- tools/testing/selftests/resctrl/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[PATCH v5 49/68] selftests/riscv: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/riscv/hwprobe/cbo.c| 1 - tools/testing/selftests/riscv/hwprobe/which-cpus.c | 1 - 2 files changed, 2 deletions(-) diff --git a/tools/test

[PATCH v5 50/68] selftests/riscv: Drop duplicate -D_GNU_SOURCE

2024-05-21 Thread Edward Liaw
-D_GNU_SOURCE can be de-duplicated here, as it is added by lib.mk. Signed-off-by: Edward Liaw --- tools/testing/selftests/riscv/mm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/riscv/mm/Makefile b/tools/testing/selftests/riscv/mm/Makefile i

[PATCH v5 51/68] selftests/rlimits: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/rlimits/rlimits-per-userns.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/rlimits/rlimits-per-userns.c b/tools/testin

[PATCH v5 52/68] selftests/rseq: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Reviewed-by: John Hubbard Reviewed-by: Muhammad Usama Anjum Signed-off-by: Edward Liaw --- tools/testing/selftests/rseq/basic_percpu_ops_test.c | 1 - tools/testing/selftests/rseq/basic_test.c

[PATCH v5 53/68] selftests/safesetid: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/safesetid/safesetid-test.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/safesetid/safesetid-test.c b/tools/testing/se

[PATCH v5 54/68] selftests/sched: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/sched/cs_prctl_test.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/testing/selftests/sched/cs_prctl_test.c b/tools/testing/selftests/

[PATCH v5 55/68] selftests/seccomp: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Reviewed-by: John Hubbard Reviewed-by: Muhammad Usama Anjum Acked-by: Kees Cook Signed-off-by: Edward Liaw --- tools/testing/selftests/seccomp/seccomp_benchmark.c | 1 - tools/testing/selftests/seccom

[PATCH v5 56/68] selftests/sigaltstack: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/sigaltstack/sas.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/testing/selftests/sigaltstack/sas.c b/tools/testing/selftests/sigaltst

[PATCH v5 57/68] selftests/sgx: Compile with -D_GNU_SOURCE

2024-05-21 Thread Edward Liaw
Add -D_GNU_SOURCE to HOST_CFLAGS and remove #define _GNU_SOURCE. Fixes: 809216233555 ("selftests/harness: remove use of LINE_MAX") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202404301040.3bea5782-oliver.s...@intel.com Signed-off-by: Edward Liaw --- tools/testing/self

[PATCH v5 58/68] selftests/splice: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/splice/default_file_splice_read.c | 1 - tools/testing/selftests/splice/splice_read.c | 1 - 2 files changed, 2 deletions(-) diff --gi

[PATCH v5 59/68] selftests/syscall_user_dispatch: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/syscall_user_dispatch/sud_benchmark.c | 2 -- tools/testing/selftests/syscall_user_dispatch/sud_test.c | 2 -- 2 files changed, 4 deletions(-)

[PATCH v5 60/68] selftests/thermal: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- .../selftests/thermal/intel/power_floor/power_floor_test.c | 3 --- .../selftests/thermal/intel/workload_hint/workload_hint_test.c | 3 --- 2 files changed, 6 deletions

[PATCH v5 61/68] selftests/timens: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/timens/clock_nanosleep.c | 1 - tools/testing/selftests/timens/exec.c| 1 - tools/testing/selftests/timens/futex.c | 1 - tool

[PATCH v5 62/68] selftests/tmpfs: Drop duplicate -D_GNU_SOURCE

2024-05-21 Thread Edward Liaw
-D_GNU_SOURCE can be de-duplicated here, as it is added by lib.mk. Signed-off-by: Edward Liaw --- tools/testing/selftests/tmpfs/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/tmpfs/Makefile b/tools/testing/selftests/tmpfs/Makefile index aa11ccc92e5b..3be931e

[PATCH v5 63/68] selftests/uevent: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/uevent/uevent_filtering.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/testing/selftests/uevent/uevent_filtering.c b/tools/testing/se

[PATCH v5 64/68] selftests/user_events: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Reviewed-by: John Hubbard Reviewed-by: Muhammad Usama Anjum Signed-off-by: Edward Liaw --- tools/testing/selftests/user_events/abi_test.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/test

[PATCH v5 65/68] selftests/vDSO: Append to CFLAGS in Makefile

2024-05-21 Thread Edward Liaw
Instead of overwriting the CFLAGS that is imported from lib.mk, append to it instead. Signed-off-by: Edward Liaw --- tools/testing/selftests/vDSO/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/vDSO/Makefile b/tools/testing/selftests/vDSO/Mak

[PATCH v5 66/68] selftests/vDSO: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw --- tools/testing/selftests/vDSO/vdso_test_abi.c | 1 - tools/testing/selftests/vDSO/vdso_test_clock_getres.c | 2 -- tools/testing/selftests/vDSO/vdso_test_correctnes

[PATCH v5 67/68] selftests/x86: Append to CFLAGS in Makefile

2024-05-21 Thread Edward Liaw
Instead of overwriting the CFLAGS that is imported from lib.mk, append to it instead. Signed-off-by: Edward Liaw --- tools/testing/selftests/x86/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/x86/Makefile b/tools/testing/selftests/x86/Makefi

[PATCH v5 68/68] selftests/x86: Drop define _GNU_SOURCE

2024-05-21 Thread Edward Liaw
_GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Drop #define __USE_GNU too, as it is bad practice and the GNU extensions aren't actually being used in test_FCMOV, etc. where it is being defined. Reviewed-by: John Hubbard Reviewed-by: Muhammad Usama An

Re: [PATCH v5 02/68] kselftest: Desecalate reporting of missing _GNU_SOURCE

2024-05-21 Thread Vitaly Chikunov
On Wed, May 22, 2024 at 12:56:48AM +, Edward Liaw wrote: > From: Mark Brown > > 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 > f

Re: [PATCH v5 27/68] selftests/lsm: Drop define _GNU_SOURCE

2024-05-21 Thread Casey Schaufler
On 5/21/2024 5:57 PM, Edward Liaw wrote: > _GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent > redefinition warnings. > > Reviewed-by: John Hubbard > Reviewed-by: Muhammad Usama Anjum > Signed-off-by: Edward Liaw Acked-by: Casey Schaufler > --- > tools/testing/selftests/l

Re: [PATCH net] selftests: hsr: Fix "File exists" errors for hsr_ping

2024-05-21 Thread Hangbin Liu
On Tue, May 21, 2024 at 04:49:44PM +0800, Geliang Tang wrote: > From: Geliang Tang > > The hsr_ping test reports the following errors: > > INFO: preparing interfaces for HSRv0. > INFO: Initial validation ping. > INFO: Longer ping test. > INFO: Cutting one link. > INFO: Delay the link and dr