All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
To: mptcp@lists.linux.dev
Cc: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
Subject: [PATCH mptcp-next] Squash to "selftests/bpf: Add mptcp subflow subtest"
Date: Tue, 10 Sep 2024 17:29:08 +0200	[thread overview]
Message-ID: <20240910152907.2538-2-matttbe@kernel.org> (raw)

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.

Link: https://github.com/kernel-patches/bpf/actions/runs/10794529238/job/29939101033
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
 tools/testing/selftests/bpf/prog_tests/mptcp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/bpf/prog_tests/mptcp.c b/tools/testing/selftests/bpf/prog_tests/mptcp.c
index c30f032edaca..c76a0d8c8f93 100644
--- a/tools/testing/selftests/bpf/prog_tests/mptcp.c
+++ b/tools/testing/selftests/bpf/prog_tests/mptcp.c
@@ -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 */
 	}
 }
 
-- 
2.45.2


             reply	other threads:[~2024-09-10 15:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-10 15:29 Matthieu Baerts (NGI0) [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-09-07  3:45 [PATCH mptcp-next] Squash to "selftests/bpf: Add mptcp subflow subtest" Geliang Tang
2024-09-07  4:38 ` MPTCP CI
2024-09-09  1:59 ` Geliang Tang
2024-07-25  1:58 Geliang Tang
2024-07-25  2:47 ` MPTCP CI
2024-07-26  9:18 ` Matthieu Baerts
2024-07-27  1:12   ` Geliang Tang
2024-08-01 10:51     ` Matthieu Baerts
2024-05-11 10:41 Geliang Tang
2024-05-11 11:34 ` MPTCP CI
2024-05-11 13:50 ` Matthieu Baerts
2024-05-11 23:17   ` Geliang Tang
2024-05-12  9:14     ` Matthieu Baerts
2024-05-12 11:45       ` Geliang Tang
2024-05-12 12:42         ` Matthieu Baerts

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240910152907.2538-2-matttbe@kernel.org \
    --to=matttbe@kernel.org \
    --cc=mptcp@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.