Re: [PATCH nf-next v3 1/2] netfilter: Make IP_NF_IPTABLES_LEGACY selectable

2024-08-29 Thread Breno Leitao
On Thu, Aug 29, 2024 at 07:53:03AM -0700, Jakub Kicinski wrote: > On Thu, 29 Aug 2024 03:08:01 -0700 Breno Leitao wrote: > > > There are various configs in the tree. Grep for the configs you convert > > > from select to depends on, they will all need updating. > > &g

Re: [PATCH nf-next v3 1/2] netfilter: Make IP_NF_IPTABLES_LEGACY selectable

2024-08-29 Thread Breno Leitao
Hello Jakub, On Wed, Aug 28, 2024 at 11:41:23AM -0700, Jakub Kicinski wrote: > On Wed, 28 Aug 2024 08:05:09 -0700 Breno Leitao wrote: > > On Wed, Aug 28, 2024 at 07:42:40AM -0700, Jakub Kicinski wrote: > > > On Tue, 27 Aug 2024 07:52:40 -0700 Breno Leitao wrote: > >

Re: [PATCH nf-next v3 1/2] netfilter: Make IP_NF_IPTABLES_LEGACY selectable

2024-08-28 Thread Breno Leitao
Hello Jakub, On Wed, Aug 28, 2024 at 07:42:40AM -0700, Jakub Kicinski wrote: > On Tue, 27 Aug 2024 07:52:40 -0700 Breno Leitao wrote: > > +++ b/tools/testing/selftests/net/config > > You gotta check all the configs, net is now fine, but bpf still breaks. > There may be more co

[PATCH nf-next v3 2/2] netfilter: Make IP6_NF_IPTABLES_LEGACY selectable

2024-08-27 Thread Breno Leitao
This option makes IP6_NF_IPTABLES_LEGACY user selectable, giving users the option to configure iptables without enabling any other config. Signed-off-by: Breno Leitao --- net/ipv6/netfilter/Kconfig | 22 -- tools/testing/selftests/net/config | 5 + 2 files

[PATCH nf-next v3 1/2] netfilter: Make IP_NF_IPTABLES_LEGACY selectable

2024-08-27 Thread Breno Leitao
This option makes IP_NF_IPTABLES_LEGACY user selectable, giving users the option to configure iptables without enabling any other config. Suggested-by: Florian Westphal Signed-off-by: Breno Leitao --- net/ipv4/netfilter/Kconfig | 19 +++ tools/testing/selftests/net

[PATCH nf-next v2 2/2] netfilter: Make IP6_NF_IPTABLES_LEGACY selectable

2024-08-23 Thread Breno Leitao
This option makes IP6_NF_IPTABLES_LEGACY user selectable, giving users the option to configure iptables without enabling any other config. Signed-off-by: Breno Leitao --- net/ipv6/netfilter/Kconfig | 22 -- tools/testing/selftests/net/config | 1 + 2 files changed

[PATCH nf-next v2 1/2] netfilter: Make IP_NF_IPTABLES_LEGACY selectable

2024-08-23 Thread Breno Leitao
This option makes IP_NF_IPTABLES_LEGACY user selectable, giving users the option to configure iptables without enabling any other config. Suggested-by: Florian Westphal Signed-off-by: Breno Leitao --- net/ipv4/netfilter/Kconfig | 19 +++ tools/testing/selftests/net

[PATCH net-next v7] net: netconsole: selftests: Create a new netconsole selftest

2024-08-22 Thread Breno Leitao
was received properly on the destination interface. Signed-off-by: Breno Leitao Acked-by: Matthieu Baerts (NGI0) --- Changelog: v7: * Fixed a typo (s/Skippig/Skipping) (Matthieu Baerts) v6: * Check for SRC and DST ip before starting the test (Jakub) * Revert the printk configuration at the end

[PATCH net-next v6] net: netconsole: selftests: Create a new netconsole selftest

2024-08-21 Thread Breno Leitao
was received properly on the destination interface. Signed-off-by: Breno Leitao --- Changelog: v6: * Check for SRC and DST ip before starting the test (Jakub) * Revert the printk configuration at the end of the test (Jakub) * Fix the modprobe stderr redirection (Jakub) v5: * Replace

Re: [PATCH net-next v5] net: netconsole: selftests: Create a new netconsole selftest

2024-08-21 Thread Breno Leitao
Hello Jakub, On Tue, Aug 20, 2024 at 04:06:36PM -0700, Jakub Kicinski wrote: > > +# == # > > +# Start here # > > +# == # > > +modprobe netdevsim 2> /dev/null || true > > +modprobe netconsole 2 > /dev/null || true > Main reason Im complaining, I see: > > [6.686720] netconsole:

[PATCH net-next v5] net: netconsole: selftests: Create a new netconsole selftest

2024-08-19 Thread Breno Leitao
was received properly on the destination interface. Signed-off-by: Breno Leitao Acked-by: Matthieu Baerts (NGI0) --- Changelog: v5: * Replace check_file_size() by "test -s" (Matthieu) v4: * Avoid sleeping in waiting for sockets and files (Matthieu Baerts) * Some other improvements

Re: [PATCH net-next v4] net: netconsole: selftests: Create a new netconsole selftest

2024-08-16 Thread Breno Leitao
On Fri, Aug 16, 2024 at 04:02:51PM +0200, Matthieu Baerts wrote: > Hi Breno, > > On 16/08/2024 15:24, Breno Leitao wrote: > > Adds a selftest that creates two virtual interfaces, assigns one to a > > new namespace, and assigns IP addresses to both. > > > > It lis

[PATCH net-next v4] net: netconsole: selftests: Create a new netconsole selftest

2024-08-16 Thread Breno Leitao
was received properly on the destination interface. Signed-off-by: Breno Leitao --- Changelog: v4: * Avoid sleeping in waiting for sockets and files (Matthieu Baerts) * Some other improvements (Matthieu Baerts) * Add configfs as a dependency (Jakub) v3: * Defined CONFIGs in config file (Jakub

Re: [PATCH net-next v3] net: netconsole: selftests: Create a new netconsole selftest

2024-08-16 Thread Breno Leitao
Hello Matthieu, On Thu, Aug 15, 2024 at 12:47:22PM +0200, Matthieu Baerts wrote: > On 15/08/2024 11:51, Breno Leitao wrote: > > Adds a selftest that creates two virtual interfaces, assigns one to a > > new namespace, and assigns IP addresses to both. > > > > It

[PATCH net-next v3] net: netconsole: selftests: Create a new netconsole selftest

2024-08-15 Thread Breno Leitao
was received properly on the destination interface. Signed-off-by: Breno Leitao --- Changelog: v3: * Defined CONFIGs in config file (Jakub) * Identention fixes (Petr Machata) * Use setup_ns in a better way (Matthieu Baerts) * Add dependencies in TEST_INCLUDES (Hangbin Liu) v2: * Change the

Re: [PATCH net-next v2] net: netconsole: selftests: Create a new netconsole selftest

2024-08-15 Thread Breno Leitao
On Thu, Aug 15, 2024 at 03:56:36PM +0800, Hangbin Liu wrote: > On Tue, Aug 13, 2024 at 11:38:16AM -0700, Breno Leitao wrote: > > Adds a selftest that creates two virtual interfaces, assigns one to a > > new namespace, and assigns IP addresses to both. > > > > It

Re: [PATCH net-next v2] net: netconsole: selftests: Create a new netconsole selftest

2024-08-14 Thread Breno Leitao
On Wed, Aug 14, 2024 at 12:24:46PM +0200, Petr Machata wrote: > > Breno Leitao writes: > > + fi > > + > > + if ! grep -q "${MSG}" "${TMPFILENAME}"; then > > + echo "FAIL: ${MSG} not found in ${TMPFILENAME}" >&2

Re: [PATCH net-next v2] net: netconsole: selftests: Create a new netconsole selftest

2024-08-14 Thread Breno Leitao
Hello Jakub, On Tue, Aug 13, 2024 at 03:37:16PM -0700, Jakub Kicinski wrote: > On Tue, 13 Aug 2024 11:38:16 -0700 Breno Leitao wrote: > > Adds a selftest that creates two virtual interfaces, assigns one to a > > new namespace, and assigns IP addresses to both. > >

[PATCH net-next v2] net: netconsole: selftests: Create a new netconsole selftest

2024-08-13 Thread Breno Leitao
was received properly on the destination interface. Signed-off-by: Breno Leitao --- Changelog: v2: * Change the location of the path (Jakub) * Move from veth to netdevsim * Other small changes in dependency checks and cleanup v1: * https://lore.kernel.org/all/zqyuhn770pjso...@gmail.com

Re: [PATCH net-next 1/6] net: netconsole: selftests: Create a new netconsole selftest

2024-08-02 Thread Breno Leitao
Hello Jakub, On Thu, Aug 01, 2024 at 09:53:22AM -0700, Jakub Kicinski wrote: > On Thu, 1 Aug 2024 09:11:58 -0700 Breno Leitao wrote: > > .../net/netconsole/basic_integration_test.sh | 153 ++ > > It needs to be included in a Makefile > If we only have one

[PATCH net-next 1/6] net: netconsole: selftests: Create a new netconsole selftest

2024-08-01 Thread Breno Leitao
was received properly on the destination interface. Signed-off-by: Breno Leitao --- MAINTAINERS | 1 + .../net/netconsole/basic_integration_test.sh | 153 ++ 2 files changed, 154 insertions(+) create mode 100755 tools/testing/selftests/net

Re: [PATCH net-next 2/2] selftests: net: tests net.core.{r,w}mem_{default,max} sysctls in a netns

2024-05-30 Thread Breno Leitao
On Tue, May 28, 2024 at 02:11:39PM +0200, Matteo Croce wrote: > Add a selftest which checks that the sysctl is present in a netns, > that the value is read from the init one, and that it's readonly. > > Signed-off-by: Matteo Croce > --- > tools/testing/selftests/net/Makefile| 1 + > too

[PATCH v2 2/2] selftests/mm: run_vmtests.sh: add hugetlb_madv_vs_map

2024-02-05 Thread Breno Leitao
hugetlb_madv_vs_map selftest was not part of the mm test-suite since we didn't have a fix for the problem it found. Now that the problem is already fixed (see previous commit), let's enable this selftest in the default test-suite. Signed-off-by: Breno Leitao --- tools/testing/se

[PATCH] selftests/mm: run_vmtests.sh: add hugetlb test category

2024-01-29 Thread Breno Leitao
The usage of run_vmtests.sh does not include hugetlb, which is a valid test category. Add the 'hugetlb' to the usage of run_vmtests.sh. Signed-off-by: Breno Leitao --- tools/testing/selftests/mm/run_vmtests.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/se

[PATCH 2/2] selftests/mm: run_vmtests.sh: add hugetlb_madv_vs_map

2024-01-17 Thread Breno Leitao
hugetlb_madv_vs_map selftest was not part of the mm test-suite since we didn't have a fix for the problem it found. Now that the problem is already fixed (see previous commit), let's enable this selftest in the default test-suite. Signed-off-by: Breno Leitao --- tools/testing/se

Re: [PATCH 1/1] selftests/mm: new test that steals pages

2024-01-10 Thread Breno Leitao
On Tue, Jan 09, 2024 at 09:47:31PM -0800, Andrew Morton wrote: > On Fri, 5 Jan 2024 07:54:19 -0800 Breno Leitao wrote: > > > This test stresses the race between of madvise(DONTNEED), a page fault > > and a parallel huge page mmap, which should fail due to lack of > >

Re: [PATCH 0/1] selftest/mm/hugetlb: SIGBUS on stolen page

2024-01-05 Thread Breno Leitao
On Fri, Jan 05, 2024 at 08:42:38AM -0800, Andrew Morton wrote: > On Fri, 5 Jan 2024 07:54:18 -0800 Breno Leitao wrote: > > > This test case triggers a race between madvise(MADV_DONTNEED) and > > mmap() in a single huge page, which got stolen (while reserved). > > &

[PATCH 1/1] selftests/mm: new test that steals pages

2024-01-05 Thread Breno Leitao
tra huge page (which is not available) thread 3 should never succeed in the allocation, since the only huge page was never unmapped, and should be reserved. Touching the old page after thread3 allocation will raise a SIGBUS. Signed-off-by: Breno Leitao --- tools/testing/selftests

[PATCH 0/1] selftest/mm/hugetlb: SIGBUS on stolen page

2024-01-05 Thread Breno Leitao
scripts, since this test fails at upstream. Breno Leitao (1): selftests/mm: add a new test for madv and hugetlb mmap tools/testing/selftests/mm/.gitignore | 1 + tools/testing/selftests/mm/Makefile | 1 + .../selftests/mm/hugetlb_madv_vs_map.c| 124

[PATCH 2/2] selftests/mm: Add hugetlb_fault_after_madv to .gitignore

2023-11-03 Thread Breno Leitao
s/mm: add a new test for madv and hugetlb") Reported-by: Ryan Roberts Closes: https://lore.kernel.org/all/662df57e-47f1-4c15-9b84-f2f2d587f...@arm.com/ Signed-off-by: Breno Leitao --- tools/testing/selftests/mm/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/s

[PATCH 1/2] selftests/mm: restore number of hugepages

2023-11-03 Thread Breno Leitao
restore it once the test finishes, so, further tests could run successfully. Fixes: 116d57303a05 ("selftests/mm: add a new test for madv and hugetlb") Reported-by: Ryan Roberts Closes: https://lore.kernel.org/all/662df57e-47f1-4c15-9b84-f2f2d587f...@arm.com/ Signed-off-by: Br

Re: [PATCH v2 2/2] selftests/mm: Add a new test for madv and hugetlb

2023-11-03 Thread Breno Leitao
Hello Ryan, On Thu, Nov 02, 2023 at 12:29:54PM +, Ryan Roberts wrote: > On 02/11/2023 12:24, Ryan Roberts wrote: > > On 05/10/2023 17:39, Breno Leitao wrote: > >> Create a selftest that exercises the race between page faults and > >> madvise(MADV_DONTNEED) in t

[PATCH v7 11/11] selftests/bpf/sockopt: Add io_uring support

2023-10-16 Thread Breno Leitao
exercise the io_uring subsystem: * getsockopt: read ctx->optlen * getsockopt: support smaller ctx->optlen Signed-off-by: Breno Leitao --- .../selftests/bpf/prog_tests/sockopt.c| 113 +- 1 file changed, 107 insertions(+), 6 deletions(-) diff --git a/tools/testing/selfte

[PATCH v7 07/11] selftests/net: Extract uring helpers to be reusable

2023-10-16 Thread Breno Leitao
make checkpatch happy. A follow-up test will use the same helpers in a BPF sockopt test. Signed-off-by: Breno Leitao --- tools/include/io_uring/mini_liburing.h| 282 ++ tools/testing/selftests/net/Makefile | 1 + .../selftests/net/io_uring_zerocopy_tx.c

[PATCH v2 2/2] selftests/mm: Add a new test for madv and hugetlb

2023-10-05 Thread Breno Leitao
s selftest goes together with the fix of the bug[1] itself. [1] https://lore.kernel.org/all/20231001005659.2185316-1-r...@surriel.com/#r Signed-off-by: Breno Leitao --- tools/testing/selftests/mm/Makefile | 1 + .../selftests/mm/hugetlb_fault_after_madv.c | 73 +++

[PATCH v2 1/2] selftests/mm: export get_free_hugepages()

2023-10-05 Thread Breno Leitao
get_free_hugepages() is helpful for other hugepage tests. Export it to the common file (vm_util.c) to be reused. Signed-off-by: Breno Leitao --- tools/testing/selftests/mm/hugetlb-madvise.c | 19 --- tools/testing/selftests/mm/vm_util.c | 19 +++ tools

Re: [PATCH 2/2] selftests/mm: Add a new test for madv and hugetlb

2023-10-05 Thread Breno Leitao
On Wed, Oct 04, 2023 at 08:22:08PM -0400, Rik van Riel wrote: > On Wed, 2023-10-04 at 10:11 -0700, Breno Leitao wrote: > > > > +char *huge_ptr; > > + > > +/* Touch the memory while it is being madvised() */ > > +void *touch(void *unused) > > +{ &

[PATCH 2/2] selftests/mm: Add a new test for madv and hugetlb

2023-10-04 Thread Breno Leitao
s selftest goes together with the fix of the bug[1] itself. [1] https://lore.kernel.org/all/20231001005659.2185316-1-r...@surriel.com/#r Signed-off-by: Breno Leitao --- tools/testing/selftests/mm/Makefile | 1 + .../selftests/mm/hugetlb_fault_after_madv.c | 82 +++

[PATCH 1/2] selftests/mm: export get_free_hugepages()

2023-10-04 Thread Breno Leitao
get_free_hugepages() is helpful for other hugepage tests. Export it to the common file (vm_util.c) to be reused. Signed-off-by: Breno Leitao --- tools/testing/selftests/mm/hugetlb-madvise.c | 19 --- tools/testing/selftests/mm/vm_util.c | 19 +++ tools

[PATCH v6 4/8] selftests/net: Extract uring helpers to be reusable

2023-09-13 Thread Breno Leitao
make checkpatch happy. A follow-up test will use the same helpers in a BPF sockopt test. Signed-off-by: Breno Leitao --- tools/include/io_uring/mini_liburing.h| 292 ++ tools/testing/selftests/net/Makefile | 1 + .../selftests/net/io_uring_zerocopy_tx.c

[PATCH v6 8/8] selftests/bpf/sockopt: Add io_uring support

2023-09-13 Thread Breno Leitao
parameter to run_test(), to specify if the test should be run using io_uring if the parameter is set, or via the regular system calls if false. Call *all* tests twice, using the regular io_uring path, and the new io_uring path. Signed-off-by: Breno Leitao --- .../selftests/bpf/prog_tests

[PATCH v5 8/8] selftests/bpf/sockopt: Add io_uring support

2023-09-11 Thread Breno Leitao
parameter to run_test(), to specify if the test should be run using io_uring if the parameter is set, or via the regular system calls if false. Call *all* tests twice, using the regular io_uring path, and the new io_uring path. Signed-off-by: Breno Leitao --- .../selftests/bpf/prog_tests

[PATCH v5 4/8] selftests/net: Extract uring helpers to be reusable

2023-09-11 Thread Breno Leitao
some minor improvements. A follow-up test will use the same helpers in a BPF sockopt test. Signed-off-by: Breno Leitao --- tools/include/io_uring/mini_liburing.h| 292 ++ tools/testing/selftests/net/Makefile | 1 + .../selftests/net/io_uring_zerocopy_tx.c