Squash to "selftests/bpf: Add mptcp subflow subtest"
Subsystems (4)
Matthieu Baerts (NGI0)
maintainerPATCH 1/1 Squash to "selftests/bpf: Add mptcp subflow subtest"
Fix sleep() usage: sleep() takes an integer, not a float/double.
tools/testing/selftests/bpf/prog_tests/mptcp.c:373:9: error: implicit conversion from 'double' to 'unsigned int' changes value from 0.1 to 0 [-Werror,-Wliteral-conversion]
373 | sleep(0.1);
| ~~~~~ ^~~Use usleep() instead.
Signed-off-by Matthieu Baerts (NGI0) <[email protected]>
--- tools/testing/selftests/bpf/prog_tests/mptcp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/bpf/prog_tests/mptcp.c +2 -1
@@ -5,6 +5,7 @@#include <linux/const.h> #include <netinet/in.h> #include <test_progs.h> +#include <unistd.h> #include "cgroup_helpers.h" #include "network_helpers.h" #include "mptcp_sock.skel.h"
@@ -370,7 +371,7 @@ static void wait_for_new_subflows(int fd)if (!err && subflows >0 )break ; -sleep (0.1 ); +usleep (100000 );/* 0.1s */ } }
Signature · 1 line
2.45.2