* [PATCH mptcp-next 1/2] Squash to "selftests: mptcp: check IP_TOS in/out are the same"
@ 2021-12-02 17:32 Matthieu Baerts
2021-12-02 17:32 ` [PATCH mptcp-next 2/2] Squash to "selftests: mptcp: add inq test case" Matthieu Baerts
2021-12-02 17:52 ` [PATCH mptcp-next 1/2] Squash to "selftests: mptcp: check IP_TOS in/out are the same" Mat Martineau
0 siblings, 2 replies; 5+ messages in thread
From: Matthieu Baerts @ 2021-12-02 17:32 UTC (permalink / raw)
To: mptcp; +Cc: Matthieu Baerts
Fixing a -Wunused-result error:
$ make -C tools/testing/selftests/net/mptcp
(...)
gcc -Wall -Wl,--no-as-needed -O2 -g -I../../../../../usr/include mptcp_sockopt.c -o tools/testing/selftests/net/mptcp/mptcp_sockopt
mptcp_sockopt.c: In function 'init_rng':
mptcp_sockopt.c:695:9: warning: ignoring return value of 'read', declared with attribute warn_unused_result [-Wunused-result]
695 | (void)read(fd, &foo, sizeof(foo));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
It seems adding "(void)" is not enough. As a workaround, we can also
simply the output of 'read()'.
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
---
Notes:
to be squashed in "selftests: mptcp: check IP_TOS in/out are the same"
tools/testing/selftests/net/mptcp/mptcp_sockopt.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_sockopt.c b/tools/testing/selftests/net/mptcp/mptcp_sockopt.c
index 5b87e162e704..ac9a4d9c1764 100644
--- a/tools/testing/selftests/net/mptcp/mptcp_sockopt.c
+++ b/tools/testing/selftests/net/mptcp/mptcp_sockopt.c
@@ -690,9 +690,11 @@ static void init_rng(void)
if (fd >= 0) {
unsigned int foo;
+ ssize_t ret;
/* can't fail */
- (void)read(fd, &foo, sizeof(foo));
+ ret = read(fd, &foo, sizeof(foo));
+ assert(ret == sizeof(foo));
close(fd);
srand(foo);
--
2.32.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH mptcp-next 2/2] Squash to "selftests: mptcp: add inq test case"
2021-12-02 17:32 [PATCH mptcp-next 1/2] Squash to "selftests: mptcp: check IP_TOS in/out are the same" Matthieu Baerts
@ 2021-12-02 17:32 ` Matthieu Baerts
2021-12-02 17:52 ` Mat Martineau
2021-12-02 17:52 ` [PATCH mptcp-next 1/2] Squash to "selftests: mptcp: check IP_TOS in/out are the same" Mat Martineau
1 sibling, 1 reply; 5+ messages in thread
From: Matthieu Baerts @ 2021-12-02 17:32 UTC (permalink / raw)
To: mptcp; +Cc: Matthieu Baerts
Fixing a -Wunused-result error:
$ make -C tools/testing/selftests/net/mptcp
(...)
$ gcc -Wall -Wl,--no-as-needed -O2 -g -I../../../../../usr/include mptcp_inq.c -o tools/testing/selftests/net/mptcp/mptcp_inq
mptcp_inq.c: In function 'connect_one_server':
mptcp_inq.c:303:2: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
303 | write(fd, buf, 1);
| ^~~~~~~~~~~~~~~~~
It seems adding "(void)" is not enough. As a workaround, we can also
simply the output of 'write()'.
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
---
Notes:
to be squashed in "selftests: mptcp: add inq test case"
tools/testing/selftests/net/mptcp/mptcp_inq.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_inq.c b/tools/testing/selftests/net/mptcp/mptcp_inq.c
index 07670f649327..b8debd4fb5ed 100644
--- a/tools/testing/selftests/net/mptcp/mptcp_inq.c
+++ b/tools/testing/selftests/net/mptcp/mptcp_inq.c
@@ -300,7 +300,8 @@ static void connect_one_server(int fd, int unixfd)
wait_for_ack(fd, 5000, sent);
- write(fd, buf, 1);
+ ret = write(fd, buf, 1);
+ assert(ret == 1);
close(fd);
ret = write(unixfd, "closed", 6);
assert(ret == 6);
--
2.32.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH mptcp-next 1/2] Squash to "selftests: mptcp: check IP_TOS in/out are the same"
2021-12-02 17:32 [PATCH mptcp-next 1/2] Squash to "selftests: mptcp: check IP_TOS in/out are the same" Matthieu Baerts
2021-12-02 17:32 ` [PATCH mptcp-next 2/2] Squash to "selftests: mptcp: add inq test case" Matthieu Baerts
@ 2021-12-02 17:52 ` Mat Martineau
1 sibling, 0 replies; 5+ messages in thread
From: Mat Martineau @ 2021-12-02 17:52 UTC (permalink / raw)
To: Matthieu Baerts; +Cc: mptcp
On Thu, 2 Dec 2021, Matthieu Baerts wrote:
> Fixing a -Wunused-result error:
>
> $ make -C tools/testing/selftests/net/mptcp
> (...)
> gcc -Wall -Wl,--no-as-needed -O2 -g -I../../../../../usr/include mptcp_sockopt.c -o tools/testing/selftests/net/mptcp/mptcp_sockopt
> mptcp_sockopt.c: In function 'init_rng':
> mptcp_sockopt.c:695:9: warning: ignoring return value of 'read', declared with attribute warn_unused_result [-Wunused-result]
> 695 | (void)read(fd, &foo, sizeof(foo));
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> It seems adding "(void)" is not enough. As a workaround, we can also
> simply the output of 'read()'.
>
> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
> ---
>
> Notes:
> to be squashed in "selftests: mptcp: check IP_TOS in/out are the same"
>
Looks good to squash, thanks.
-Mat
> tools/testing/selftests/net/mptcp/mptcp_sockopt.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_sockopt.c b/tools/testing/selftests/net/mptcp/mptcp_sockopt.c
> index 5b87e162e704..ac9a4d9c1764 100644
> --- a/tools/testing/selftests/net/mptcp/mptcp_sockopt.c
> +++ b/tools/testing/selftests/net/mptcp/mptcp_sockopt.c
> @@ -690,9 +690,11 @@ static void init_rng(void)
>
> if (fd >= 0) {
> unsigned int foo;
> + ssize_t ret;
>
> /* can't fail */
> - (void)read(fd, &foo, sizeof(foo));
> + ret = read(fd, &foo, sizeof(foo));
> + assert(ret == sizeof(foo));
>
> close(fd);
> srand(foo);
> --
> 2.32.0
>
>
>
--
Mat Martineau
Intel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH mptcp-next 2/2] Squash to "selftests: mptcp: add inq test case"
2021-12-02 17:32 ` [PATCH mptcp-next 2/2] Squash to "selftests: mptcp: add inq test case" Matthieu Baerts
@ 2021-12-02 17:52 ` Mat Martineau
2021-12-03 17:08 ` Matthieu Baerts
0 siblings, 1 reply; 5+ messages in thread
From: Mat Martineau @ 2021-12-02 17:52 UTC (permalink / raw)
To: Matthieu Baerts; +Cc: mptcp
On Thu, 2 Dec 2021, Matthieu Baerts wrote:
> Fixing a -Wunused-result error:
>
> $ make -C tools/testing/selftests/net/mptcp
> (...)
> $ gcc -Wall -Wl,--no-as-needed -O2 -g -I../../../../../usr/include mptcp_inq.c -o tools/testing/selftests/net/mptcp/mptcp_inq
> mptcp_inq.c: In function 'connect_one_server':
> mptcp_inq.c:303:2: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
> 303 | write(fd, buf, 1);
> | ^~~~~~~~~~~~~~~~~
>
> It seems adding "(void)" is not enough. As a workaround, we can also
> simply the output of 'write()'.
>
> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
> ---
>
> Notes:
> to be squashed in "selftests: mptcp: add inq test case"
>
Also ok to squash this one.
-Mat
> tools/testing/selftests/net/mptcp/mptcp_inq.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_inq.c b/tools/testing/selftests/net/mptcp/mptcp_inq.c
> index 07670f649327..b8debd4fb5ed 100644
> --- a/tools/testing/selftests/net/mptcp/mptcp_inq.c
> +++ b/tools/testing/selftests/net/mptcp/mptcp_inq.c
> @@ -300,7 +300,8 @@ static void connect_one_server(int fd, int unixfd)
>
> wait_for_ack(fd, 5000, sent);
>
> - write(fd, buf, 1);
> + ret = write(fd, buf, 1);
> + assert(ret == 1);
> close(fd);
> ret = write(unixfd, "closed", 6);
> assert(ret == 6);
> --
> 2.32.0
>
>
>
--
Mat Martineau
Intel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH mptcp-next 2/2] Squash to "selftests: mptcp: add inq test case"
2021-12-02 17:52 ` Mat Martineau
@ 2021-12-03 17:08 ` Matthieu Baerts
0 siblings, 0 replies; 5+ messages in thread
From: Matthieu Baerts @ 2021-12-03 17:08 UTC (permalink / raw)
To: Mat Martineau; +Cc: mptcp
Hi Mat,
On 02/12/2021 18:52, Mat Martineau wrote:
> On Thu, 2 Dec 2021, Matthieu Baerts wrote:
>
>> Fixing a -Wunused-result error:
>>
>> $ make -C tools/testing/selftests/net/mptcp
>> (...)
>> $ gcc -Wall -Wl,--no-as-needed -O2 -g
>> -I../../../../../usr/include mptcp_inq.c -o
>> tools/testing/selftests/net/mptcp/mptcp_inq
>> mptcp_inq.c: In function 'connect_one_server':
>> mptcp_inq.c:303:2: warning: ignoring return value of 'write',
>> declared with attribute warn_unused_result [-Wunused-result]
>> 303 | write(fd, buf, 1);
>> | ^~~~~~~~~~~~~~~~~
>>
>> It seems adding "(void)" is not enough. As a workaround, we can also
>> simply the output of 'write()'.
>>
>> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
>> ---
>>
>> Notes:
>> to be squashed in "selftests: mptcp: add inq test case"
>>
>
> Also ok to squash this one.
Thank you for the reviews!
- 17b56c543ab5: "squashed" patch 1/2 in "selftests: mptcp: check IP_TOS
in/out are the same"
- 6680d9b3e2bd: "squashed" patch 2/2 in "selftests: mptcp: add inq test
case"
- Results: 89018cadd36b..9b3f10607961
(For both patches, I removed the automatically added 'Co-dev' tags as I
guess it doesn't make sense for this kind of fix :) )
Builds and tests are now in progress:
https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20211203T170803
https://github.com/multipath-tcp/mptcp_net-next/actions/workflows/build-validation.yml?query=branch:export
Cheers,
Matt
--
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-12-03 17:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-02 17:32 [PATCH mptcp-next 1/2] Squash to "selftests: mptcp: check IP_TOS in/out are the same" Matthieu Baerts
2021-12-02 17:32 ` [PATCH mptcp-next 2/2] Squash to "selftests: mptcp: add inq test case" Matthieu Baerts
2021-12-02 17:52 ` Mat Martineau
2021-12-03 17:08 ` Matthieu Baerts
2021-12-02 17:52 ` [PATCH mptcp-next 1/2] Squash to "selftests: mptcp: check IP_TOS in/out are the same" Mat Martineau
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.