From: Geliang Tang
This patchset adds post_socket_cb pointer together with 'struct
post_socket_opts cb_opts' into struct network_helper_opts to make
start_server_addr() helper more flexible. With these modifications,
many duplicate codes can be dropped.
Patches 1-3 address Martin's comments in t
From: Geliang Tang
Include network_helpers.h in prog_tests/sockopt_inherit.c, use public
helper start_server_addr() instead of the local defined function
start_server(). This can avoid duplicate code.
Add a helper custom_cb() to set SOL_CUSTOM sockopt looply, set it to
post_socket_cb pointer of
From: Geliang Tang
__start_server() sets SO_REUSPORT through setsockopt() when the parameter
'reuseport' is set. This patch makes it more flexible by adding a function
pointer post_socket_cb, together with 'struct post_socket_opts cb_opts'
for future extension into struct network_helper_opts. The
From: Geliang Tang
Include network_helpers.h in test_tcp_check_syncookie_user.c, use
public helper start_server_addr() in it instead of the local defined
function start_server(). This can avoid duplicate code.
Add two helpers v6only_true() and v6only_false() to set IPV6_V6ONLY
sockopt to true or
From: Geliang Tang
This patch uses public helper connect_to_fd() exported in network_helpers.h
instead of the local defined function connect_to_server() in
prog_tests/sockopt_inherit.c. This can avoid duplicate code.
Signed-off-by: Geliang Tang
---
.../bpf/prog_tests/sockopt_inherit.c
From: Geliang Tang
This patch uses public helper connect_to_fd() exported in network_helpers.h
instead of the local defined function connect_to_server() in
test_tcp_check_syncookie_user.c. This can avoid duplicate code.
Then the arguments "addr" and "len" of run_test() become useless, drop them
From: Geliang Tang
The arguments "addr" and "len" of run_test() have dropped. This makes
function get_port() useless. Drop it from test_tcp_check_syncookie_user.c.
Signed-off-by: Geliang Tang
---
.../bpf/test_tcp_check_syncookie_user.c | 21 +++
1 file changed, 3 insertio
From: Justin Stitt
> Sent: 01 May 2024 20:55
...
> > static unsigned long elf_hash(const unsigned char *name)
...
> Is it possible to just change the types of the parameters of vdso_sym()
> or does that trigger even more warnings on the callsites of vdso_sym()?
Isn't the problem the definition of
Add several new test cases which assert corner cases on the eventfd
mechanism, for example, the supplied buffer is less than 8 bytes,
attempting to write a value that is too large, etc.
./eventfd_test
# Starting 9 tests from 1 test cases.
# RUN global.eventfd01 .
On Fri, May 03, 2024 at 07:13:30PM -0700, John Hubbard wrote:
> dump_config_tree() is declared to return an int, but the compiler cannot
> prove that it always returns any value at all. This leads to a clang
> warning, when building via:
>
> make LLVM=1 -C tools/testing/selftests
>
> Fix this
On Fri, May 03, 2024 at 07:13:30PM -0700, John Hubbard wrote:
> dump_config_tree() is declared to return an int, but the compiler cannot
> prove that it always returns any value at all. This leads to a clang
> warning, when building via:
Though given that the function isn't referenced we could als
Hi,
This fix, originally intended for XFRM/IPsec, has been recommended by
Steffen Klassert to submit to the net tree.
The patch addresses a minor issue related to the IPv4 source address of
ICMP error messages, which originated from an old 2011 commit:
415b3334a21a ("icmp: Fix regression in nexth
When enabling support for XFRM lookup using reverse ICMP payload, we
have identified an issue where the source address of the IPv4,
e.g., "Destination Host Unreachable" message, is incorrect. The error message
received by the sender appears to originate from a
non-existing/unreachable host. IPv6 s
Add IPsec tunnel, aka xfrm state, tests with ICMP flags enabled.
IPv4 and IPv6, unreachable tests over xfrm/IPsec tunnels,
xfrm SA with "flag icmp" set.
Signed-off-by: Antony Antony
---
tools/testing/selftests/net/Makefile | 1 +
tools/testing/selftests/net/xfrm_state.sh | 624 +++
On 5/5/24 7:53 AM, Mark Brown wrote:
On Fri, May 03, 2024 at 07:13:30PM -0700, John Hubbard wrote:
dump_config_tree() is declared to return an int, but the compiler cannot
prove that it always returns any value at all. This leads to a clang
warning, when building via:
Though given that the fun
dump_config_tree() is declared to return an int, but the compiler cannot
prove that it always returns any value at all. This leads to a clang
warning, when building via:
make LLVM=1 -C tools/testing/selftests
Furthermore, Mark Brown noticed that dump_config_tree() isn't even used
anymore, so
When building with clang, via:
make LLVM=1 -C tools/testing/selftest
...clang warns about an unused irqcount variable. clang is correct: the
variable is incremented and then ignored.
Fix this by deleting the irqcount variable.
Signed-off-by: John Hubbard
---
tools/testing/selftests/timers
When building with clang, via:
make LLVM=1 -C tools/testing/selftest
...clang warns about "taking address of packed member 'write_index' ".
This is not particularly helpful, because the test code really wants to
write to exactly this location, and if it ends up being unaligned, then
the test
When building with clang, via:
make LLVM=1 -C tools/testing/selftest
...clang warns about using "int *" interchangeably with "socklen_t *".
clang is correct, so fix this by declaring len as a socklen_t, instead
of as an int.
Signed-off-by: John Hubbard
---
tools/testing/selftests/netfilte
When building with clang, via:
make LLVM=1 -C tools/testing/selftests
...clang warns, correctly, that several functions declared with an "int"
return type are not always returning values in all cases (or at least,
clang cannot prove that they always return a value).
Fix this by returning 0 f
When building either tools/bpf/bpftool, or tools/testing/selftests/hid,
(the same Makefile is used for these), clang generates many instances of
a warning that is useless here:
"clang: warning: -lLLVM-17: 'linker' input unused"
Silence this in both locations, by disabling that warning when bu
When building with clang, via:
make LLVM=1 -C tools/testing/selftest
...clang warns about several cases of using a signed integer for the
priority argument to mq_receive(3), which expects an unsigned int.
Fix this by declaring the type as unsigned int in all cases.
Signed-off-by: John Hubba
When building with clang, via:
make LLVM=1 -C tools/testing/selftest
...clang warns that "a variable sized type not at the end of a struct or
class is a GNU extension".
These cases are not easily changed, because they involve structs that
are part of the API. Fortunately, however, the tests
When building with clang, via:
make LLVM=1 -C tools/testing/selftest
...clang warns about three variables that are not initialized in all
cases:
1) The opt_ipproto_off variable is used uninitialized if "testname" is
not "ip". This seems like an actual bug.
2) The addr_len is used uninitiali
On 05/05/2024 22:56, John Hubbard wrote:
> When building either tools/bpf/bpftool, or tools/testing/selftests/hid,
> (the same Makefile is used for these), clang generates many instances of
> a warning that is useless here:
>
> "clang: warning: -lLLVM-17: 'linker' input unused"
>
> Silence th
On 5/5/24 3:36 PM, Quentin Monnet wrote:
On 05/05/2024 22:56, John Hubbard wrote:
...
Thanks! If possible, I'd rather keep the warning enabled, and fix the
command line instead. Looking at the error and the Makefile, we may not
need the -lLLVM in the CFLAGS at all, but only in $(LIBS). On
my se
On 05/05/2024 23:48, John Hubbard wrote:
> On 5/5/24 3:36 PM, Quentin Monnet wrote:
>> On 05/05/2024 22:56, John Hubbard wrote:
> ...
>> Thanks! If possible, I'd rather keep the warning enabled, and fix the
>> command line instead. Looking at the error and the Makefile, we may not
>> need the -lLLV
When building either tools/bpf/bpftool, or tools/testing/selftests/hid,
(the same Makefile is used for these), clang generates many instances of
the following:
"clang: warning: -lLLVM-17: 'linker' input unused"
Quentin points out that the LLVM version is only required in $(LIBS),
not in $(CFL
On 06/05/2024 00:00, John Hubbard wrote:
> When building either tools/bpf/bpftool, or tools/testing/selftests/hid,
> (the same Makefile is used for these), clang generates many instances of
> the following:
>
> "clang: warning: -lLLVM-17: 'linker' input unused"
>
> Quentin points out that the
On 2024-05-01 00:55, Christoph Hellwig wrote:
> On Fri, Apr 26, 2024 at 05:17:52PM -0700, David Wei wrote:
>> On 2024-04-02 5:20 pm, Mina Almasry wrote:
>>> @@ -69,20 +106,26 @@ net_iov_binding(const struct net_iov *niov)
>>> */
>>> typedef unsigned long __bitwise netmem_ref;
>>>
>>> +static i
On Sun, May 05, 2024 at 02:08:24PM -0700, John Hubbard wrote:
> dump_config_tree() is declared to return an int, but the compiler cannot
> prove that it always returns any value at all. This leads to a clang
> warning, when building via:
Reviewed-by: Mark Brown
signature.asc
Description: PGP si
Thanks for the patch!
On 5/4/24 10:09 PM, Amer Al Shanawany wrote:
> Fix the following warnings by adding return check and error handling.
>
> test_execve.c: In function ‘do_tests’:
> test_execve.c:100:17: warning: ignoring return value of
> ‘capng_get_caps_process’
> declared with attribute ‘w
32 matches
Mail list logo