linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH BlueZ v2 1/3] tools/tester: test COMPLETION timestamps
@ 2025-03-18 19:07 Pauli Virtanen
  2025-03-18 19:07 ` [PATCH BlueZ v2 2/3] l2cap-tester: add test for stream socket TX timestamping Pauli Virtanen
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Pauli Virtanen @ 2025-03-18 19:07 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Pauli Virtanen

Add support for SOF_TIMESTAMPING_TX_COMPLETION also in cases where
errqueue.h is old and doesn't define it.

Support timestamps of different types arriving out of order, as multiple
SND may well arrive before COMPLETION.  Also allow TX timestamp arriving
before bthost receives data, as that may well happen.

Remove tests SCHED timestamps, as those won't be generated for now.

Don't test COMPLETION for SCO, since it's not supported now either.

Add test:

SCO CVSD Send No Flowctl - TX Timestamping
---
 configure.ac         |  7 +++++++
 tools/iso-tester.c   | 36 +++++++++++-------------------------
 tools/l2cap-tester.c | 14 ++++++++------
 tools/sco-tester.c   | 23 +++++++++++++++++++----
 tools/tester.h       | 44 ++++++++++++++++++++++++++++++++++++--------
 5 files changed, 81 insertions(+), 43 deletions(-)

diff --git a/configure.ac b/configure.ac
index a016c993f..0fa49f686 100644
--- a/configure.ac
+++ b/configure.ac
@@ -389,6 +389,13 @@ AC_ARG_ENABLE(testing, AS_HELP_STRING([--enable-testing],
 					[enable_testing=${enableval}])
 AM_CONDITIONAL(TESTING, test "${enable_testing}" = "yes")
 
+if (test "${enable_testing}" = "yes"); then
+   AC_CHECK_DECLS([SOF_TIMESTAMPING_TX_COMPLETION, SCM_TSTAMP_COMPLETION],
+	[], [], [[#include <time.h>
+		#include <linux/errqueue.h>
+		#include <linux/net_tstamp.h>]])
+fi
+
 AC_ARG_ENABLE(experimental, AS_HELP_STRING([--enable-experimental],
 			[enable experimental tools]),
 					[enable_experimental=${enableval}])
diff --git a/tools/iso-tester.c b/tools/iso-tester.c
index c30c44ce9..b5e638808 100644
--- a/tools/iso-tester.c
+++ b/tools/iso-tester.c
@@ -1066,28 +1066,19 @@ static const struct iso_client_data connect_send_tx_timestamping = {
 	.send = &send_16_2_1,
 	.so_timestamping = (SOF_TIMESTAMPING_SOFTWARE |
 					SOF_TIMESTAMPING_OPT_ID |
-					SOF_TIMESTAMPING_TX_SOFTWARE),
+					SOF_TIMESTAMPING_TX_SOFTWARE |
+					SOF_TIMESTAMPING_TX_COMPLETION),
 	.repeat_send = 1,
 	.repeat_send_pre_ts = 2,
 };
 
-static const struct iso_client_data connect_send_tx_sched_timestamping = {
-	.qos = QOS_16_2_1,
-	.expect_err = 0,
-	.send = &send_16_2_1,
-	.so_timestamping = (SOF_TIMESTAMPING_SOFTWARE |
-					SOF_TIMESTAMPING_TX_SOFTWARE |
-					SOF_TIMESTAMPING_OPT_TSONLY |
-					SOF_TIMESTAMPING_TX_SCHED),
-	.repeat_send = 1,
-};
-
 static const struct iso_client_data connect_send_tx_cmsg_timestamping = {
 	.qos = QOS_16_2_1,
 	.expect_err = 0,
 	.send = &send_16_2_1,
 	.so_timestamping = (SOF_TIMESTAMPING_SOFTWARE |
-					SOF_TIMESTAMPING_TX_SOFTWARE),
+					SOF_TIMESTAMPING_OPT_TSONLY |
+					SOF_TIMESTAMPING_TX_COMPLETION),
 	.repeat_send = 1,
 	.cmsg_timestamping = true,
 };
@@ -1097,7 +1088,7 @@ static const struct iso_client_data connect_send_tx_no_poll_timestamping = {
 	.expect_err = 0,
 	.send = &send_16_2_1,
 	.so_timestamping = (SOF_TIMESTAMPING_SOFTWARE |
-					SOF_TIMESTAMPING_TX_SOFTWARE),
+					SOF_TIMESTAMPING_TX_COMPLETION),
 	.repeat_send = 1,
 	.no_poll_errqueue = true,
 };
@@ -2241,10 +2232,10 @@ static gboolean iso_recv_errqueue(GIOChannel *io, GIOCondition cond,
 	err = tx_tstamp_recv(&data->tx_ts, sk, isodata->send->iov_len);
 	if (err > 0)
 		return TRUE;
-	else if (!err && !data->step)
-		tester_test_passed();
-	else
+	else if (err)
 		tester_test_failed();
+	else if (!data->step)
+		tester_test_passed();
 
 	data->io_id[2] = 0;
 	return FALSE;
@@ -2289,7 +2280,7 @@ static void iso_tx_timestamping(struct test_data *data, GIOChannel *io)
 	int err;
 	unsigned int count;
 
-	if (!(isodata->so_timestamping & SOF_TIMESTAMPING_TX_RECORD_MASK))
+	if (!(isodata->so_timestamping & TS_TX_RECORD_MASK))
 		return;
 
 	tester_print("Enabling TX timestamping");
@@ -2336,7 +2327,7 @@ static void iso_tx_timestamping(struct test_data *data, GIOChannel *io)
 	}
 
 	if (isodata->cmsg_timestamping)
-		so &= ~SOF_TIMESTAMPING_TX_RECORD_MASK;
+		so &= ~TS_TX_RECORD_MASK;
 
 	err = setsockopt(sk, SOL_SOCKET, SO_TIMESTAMPING, &so, sizeof(so));
 	if (err < 0) {
@@ -2374,7 +2365,7 @@ static void iso_send_data(struct test_data *data, GIOChannel *io)
 		cmsg->cmsg_len = CMSG_LEN(sizeof(uint32_t));
 
 		*((uint32_t *)CMSG_DATA(cmsg)) = (isodata->so_timestamping &
-					SOF_TIMESTAMPING_TX_RECORD_MASK);
+					TS_TX_RECORD_MASK);
 	}
 
 	ret = sendmsg(sk, &msg, 0);
@@ -3645,11 +3636,6 @@ int main(int argc, char *argv[])
 	test_iso("ISO Send - TX Timestamping", &connect_send_tx_timestamping,
 						setup_powered, test_connect);
 
-	/* Test schedule-time TX timestamps are emitted */
-	test_iso("ISO Send - TX Sched Timestamping",
-			&connect_send_tx_sched_timestamping, setup_powered,
-			test_connect);
-
 	/* Test TX timestamping with flags set via per-packet CMSG */
 	test_iso("ISO Send - TX CMSG Timestamping",
 			&connect_send_tx_cmsg_timestamping, setup_powered,
diff --git a/tools/l2cap-tester.c b/tools/l2cap-tester.c
index 1780c9fbd..7f3be6c0f 100644
--- a/tools/l2cap-tester.c
+++ b/tools/l2cap-tester.c
@@ -381,7 +381,8 @@ static const struct l2cap_data client_connect_tx_timestamping_test = {
 	.data_len = sizeof(l2_data),
 	.so_timestamping = (SOF_TIMESTAMPING_SOFTWARE |
 					SOF_TIMESTAMPING_OPT_ID |
-					SOF_TIMESTAMPING_TX_SOFTWARE),
+					SOF_TIMESTAMPING_TX_SOFTWARE |
+					SOF_TIMESTAMPING_TX_COMPLETION),
 	.repeat_send = 2,
 };
 
@@ -594,7 +595,8 @@ static const struct l2cap_data le_client_connect_tx_timestamping_test = {
 	.data_len = sizeof(l2_data),
 	.so_timestamping = (SOF_TIMESTAMPING_SOFTWARE |
 					SOF_TIMESTAMPING_OPT_ID |
-					SOF_TIMESTAMPING_TX_SOFTWARE),
+					SOF_TIMESTAMPING_TX_SOFTWARE |
+					SOF_TIMESTAMPING_TX_COMPLETION),
 };
 
 static const struct l2cap_data le_client_connect_adv_success_test_1 = {
@@ -1345,10 +1347,10 @@ static gboolean recv_errqueue(GIOChannel *io, GIOCondition cond,
 	err = tx_tstamp_recv(&data->tx_ts, sk, l2data->data_len);
 	if (err > 0)
 		return TRUE;
-	else if (!err && !data->step)
-		tester_test_passed();
-	else
+	else if (err)
 		tester_test_failed();
+	else if (!data->step)
+		tester_test_passed();
 
 	data->err_io_id = 0;
 	return FALSE;
@@ -1362,7 +1364,7 @@ static void l2cap_tx_timestamping(struct test_data *data, GIOChannel *io)
 	int err;
 	unsigned int count;
 
-	if (!(l2data->so_timestamping & SOF_TIMESTAMPING_TX_RECORD_MASK))
+	if (!(l2data->so_timestamping & TS_TX_RECORD_MASK))
 		return;
 
 	sk = g_io_channel_unix_get_fd(io);
diff --git a/tools/sco-tester.c b/tools/sco-tester.c
index b88631d89..7a4d684be 100644
--- a/tools/sco-tester.c
+++ b/tools/sco-tester.c
@@ -314,6 +314,17 @@ static const struct sco_client_data connect_send_success = {
 };
 
 static const struct sco_client_data connect_send_tx_timestamping = {
+	.expect_err = 0,
+	.data_len = sizeof(data),
+	.send_data = data,
+	.so_timestamping = (SOF_TIMESTAMPING_SOFTWARE |
+					SOF_TIMESTAMPING_OPT_ID |
+					SOF_TIMESTAMPING_TX_SOFTWARE |
+					SOF_TIMESTAMPING_TX_COMPLETION),
+	.repeat_send = 2,
+};
+
+static const struct sco_client_data connect_send_no_flowctl_tx_timestamping = {
 	.expect_err = 0,
 	.data_len = sizeof(data),
 	.send_data = data,
@@ -738,10 +749,10 @@ static gboolean recv_errqueue(GIOChannel *io, GIOCondition cond,
 	err = tx_tstamp_recv(&data->tx_ts, sk, scodata->data_len);
 	if (err > 0)
 		return TRUE;
-	else if (!err && !data->step)
-		tester_test_passed();
-	else
+	else if (err)
 		tester_test_failed();
+	else if (!data->step)
+		tester_test_passed();
 
 	data->err_io_id = 0;
 	return FALSE;
@@ -755,7 +766,7 @@ static void sco_tx_timestamping(struct test_data *data, GIOChannel *io)
 	int err;
 	unsigned int count;
 
-	if (!(scodata->so_timestamping & SOF_TIMESTAMPING_TX_RECORD_MASK))
+	if (!(scodata->so_timestamping & TS_TX_RECORD_MASK))
 		return;
 
 	sk = g_io_channel_unix_get_fd(io);
@@ -1142,6 +1153,10 @@ int main(int argc, char *argv[])
 					&connect_send_tx_timestamping,
 					setup_powered, test_connect);
 
+	test_sco_no_flowctl("SCO CVSD Send No Flowctl - TX Timestamping",
+				&connect_send_no_flowctl_tx_timestamping,
+				setup_powered, test_connect);
+
 	test_sco_11("SCO CVSD 1.1 Send - Success", &connect_send_success,
 					setup_powered, test_connect);
 
diff --git a/tools/tester.h b/tools/tester.h
index b6de084a4..802c92e96 100644
--- a/tools/tester.h
+++ b/tools/tester.h
@@ -20,6 +20,15 @@
 #define SEC_NSEC(_t)  ((_t) * 1000000000LL)
 #define TS_NSEC(_ts)  (SEC_NSEC((_ts)->tv_sec) + (_ts)->tv_nsec)
 
+#if !HAVE_DECL_SOF_TIMESTAMPING_TX_COMPLETION
+#define SOF_TIMESTAMPING_TX_COMPLETION	(1 << 18)
+#endif
+#if !HAVE_DECL_SCM_TSTAMP_COMPLETION
+#define SCM_TSTAMP_COMPLETION		(SCM_TSTAMP_ACK + 1)
+#endif
+#define TS_TX_RECORD_MASK		(SOF_TIMESTAMPING_TX_RECORD_MASK | \
+						SOF_TIMESTAMPING_TX_COMPLETION)
+
 struct tx_tstamp_data {
 	struct {
 		uint32_t id;
@@ -59,6 +68,13 @@ static inline int tx_tstamp_expect(struct tx_tstamp_data *data)
 		pos++;
 	}
 
+	if (data->so_timestamping & SOF_TIMESTAMPING_TX_COMPLETION) {
+		g_assert(pos < ARRAY_SIZE(data->expect));
+		data->expect[pos].type = SCM_TSTAMP_COMPLETION;
+		data->expect[pos].id = data->sent;
+		pos++;
+	}
+
 	data->sent++;
 
 	steps = pos - data->count;
@@ -77,6 +93,7 @@ static inline int tx_tstamp_recv(struct tx_tstamp_data *data, int sk, int len)
 	struct scm_timestamping *tss = NULL;
 	struct sock_extended_err *serr = NULL;
 	struct timespec now;
+	unsigned int i;
 
 	iov.iov_base = buf;
 	iov.iov_len = sizeof(buf);
@@ -89,7 +106,7 @@ static inline int tx_tstamp_recv(struct tx_tstamp_data *data, int sk, int len)
 
 	ret = recvmsg(sk, &msg, MSG_ERRQUEUE);
 	if (ret < 0) {
-		if (ret == EAGAIN || ret == EWOULDBLOCK)
+		if (errno == EAGAIN || errno == EWOULDBLOCK)
 			return data->count - data->pos;
 
 		tester_warn("Failed to read from errqueue: %s (%d)",
@@ -147,18 +164,29 @@ static inline int tx_tstamp_recv(struct tx_tstamp_data *data, int sk, int len)
 		return -EINVAL;
 	}
 
-	if ((data->so_timestamping & SOF_TIMESTAMPING_OPT_ID) &&
-				serr->ee_data != data->expect[data->pos].id) {
-		tester_warn("Bad timestamp id %u", serr->ee_data);
-		return -EINVAL;
-	}
+	/* Find first unreceived timestamp of the right type */
+	for (i = 0; i < data->count; ++i) {
+		if (data->expect[i].type >= 0xffff)
+			continue;
 
-	if (serr->ee_info != data->expect[data->pos].type) {
+		if (serr->ee_info == data->expect[i].type) {
+			data->expect[i].type = 0xffff;
+			break;
+		}
+	}
+	if (i == data->count) {
 		tester_warn("Bad timestamp type %u", serr->ee_info);
 		return -EINVAL;
 	}
 
-	tester_print("Got valid TX timestamp %u", data->pos);
+	if ((data->so_timestamping & SOF_TIMESTAMPING_OPT_ID) &&
+				serr->ee_data != data->expect[i].id) {
+		tester_warn("Bad timestamp id %u", serr->ee_data);
+		return -EINVAL;
+	}
+
+	tester_print("Got valid TX timestamp %u (type %u, id %u)", i,
+						serr->ee_info, serr->ee_data);
 
 	++data->pos;
 
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH BlueZ v2 2/3] l2cap-tester: add test for stream socket TX timestamping
  2025-03-18 19:07 [PATCH BlueZ v2 1/3] tools/tester: test COMPLETION timestamps Pauli Virtanen
@ 2025-03-18 19:07 ` Pauli Virtanen
  2025-03-18 19:07 ` [PATCH BlueZ v2 3/3] tools/tester: enable TX timestamping tests by default Pauli Virtanen
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Pauli Virtanen @ 2025-03-18 19:07 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Pauli Virtanen

Stream socket TX timestamp ids shall refer to the byte positions.
Add test:

L2CAP BR/EDR Client - Stream TX Timestamping
---
 tools/iso-tester.c   |  4 ++--
 tools/l2cap-tester.c | 32 ++++++++++++++++++++++++++++----
 tools/sco-tester.c   |  4 ++--
 tools/tester.h       | 12 +++++++++---
 4 files changed, 41 insertions(+), 11 deletions(-)

diff --git a/tools/iso-tester.c b/tools/iso-tester.c
index b5e638808..ad0738091 100644
--- a/tools/iso-tester.c
+++ b/tools/iso-tester.c
@@ -2285,10 +2285,10 @@ static void iso_tx_timestamping(struct test_data *data, GIOChannel *io)
 
 	tester_print("Enabling TX timestamping");
 
-	tx_tstamp_init(&data->tx_ts, isodata->so_timestamping);
+	tx_tstamp_init(&data->tx_ts, isodata->so_timestamping, false);
 
 	for (count = 0; count < isodata->repeat_send + 1; ++count)
-		data->step += tx_tstamp_expect(&data->tx_ts);
+		data->step += tx_tstamp_expect(&data->tx_ts, 0);
 
 	sk = g_io_channel_unix_get_fd(io);
 
diff --git a/tools/l2cap-tester.c b/tools/l2cap-tester.c
index 7f3be6c0f..395e76dbc 100644
--- a/tools/l2cap-tester.c
+++ b/tools/l2cap-tester.c
@@ -102,6 +102,9 @@ struct l2cap_data {
 
 	/* Number of additional packets to send. */
 	unsigned int repeat_send;
+
+	/* Socket type (0 means SOCK_SEQPACKET) */
+	int sock_type;
 };
 
 static void print_debug(const char *str, void *user_data)
@@ -386,6 +389,19 @@ static const struct l2cap_data client_connect_tx_timestamping_test = {
 	.repeat_send = 2,
 };
 
+static const struct l2cap_data client_connect_stream_tx_timestamping_test = {
+	.client_psm = 0x1001,
+	.server_psm = 0x1001,
+	.write_data = l2_data,
+	.data_len = sizeof(l2_data),
+	.so_timestamping = (SOF_TIMESTAMPING_SOFTWARE |
+					SOF_TIMESTAMPING_OPT_ID |
+					SOF_TIMESTAMPING_TX_SOFTWARE |
+					SOF_TIMESTAMPING_TX_COMPLETION),
+	.repeat_send = 2,
+	.sock_type = SOCK_STREAM,
+};
+
 static const struct l2cap_data client_connect_shut_wr_success_test = {
 	.client_psm = 0x1001,
 	.server_psm = 0x1001,
@@ -1371,10 +1387,11 @@ static void l2cap_tx_timestamping(struct test_data *data, GIOChannel *io)
 
 	tester_print("Enabling TX timestamping");
 
-	tx_tstamp_init(&data->tx_ts, l2data->so_timestamping);
+	tx_tstamp_init(&data->tx_ts, l2data->so_timestamping,
+					l2data->sock_type == SOCK_STREAM);
 
 	for (count = 0; count < l2data->repeat_send + 1; ++count)
-		data->step += tx_tstamp_expect(&data->tx_ts);
+		data->step += tx_tstamp_expect(&data->tx_ts, l2data->data_len);
 
 	err = setsockopt(sk, SOL_SOCKET, SO_TIMESTAMPING, &so, sizeof(so));
 	if (err < 0) {
@@ -1523,9 +1540,12 @@ static int create_l2cap_sock(struct test_data *data, uint16_t psm,
 	const uint8_t *central_bdaddr;
 	struct sockaddr_l2 addr;
 	int sk, err;
+	int sock_type = SOCK_SEQPACKET;
 
-	sk = socket(PF_BLUETOOTH, SOCK_SEQPACKET | SOCK_NONBLOCK,
-							BTPROTO_L2CAP);
+	if (l2data && l2data->sock_type)
+		sock_type = l2data->sock_type;
+
+	sk = socket(PF_BLUETOOTH, sock_type | SOCK_NONBLOCK, BTPROTO_L2CAP);
 	if (sk < 0) {
 		err = -errno;
 		tester_warn("Can't create socket: %s (%d)", strerror(errno),
@@ -2523,6 +2543,10 @@ int main(int argc, char *argv[])
 					&client_connect_tx_timestamping_test,
 					setup_powered_client, test_connect);
 
+	test_l2cap_bredr("L2CAP BR/EDR Client - Stream TX Timestamping",
+				&client_connect_stream_tx_timestamping_test,
+				setup_powered_client, test_connect);
+
 	test_l2cap_bredr("L2CAP BR/EDR Client - Invalid PSM 1",
 					&client_connect_nval_psm_test_1,
 					setup_powered_client, test_connect);
diff --git a/tools/sco-tester.c b/tools/sco-tester.c
index 7a4d684be..145506321 100644
--- a/tools/sco-tester.c
+++ b/tools/sco-tester.c
@@ -773,10 +773,10 @@ static void sco_tx_timestamping(struct test_data *data, GIOChannel *io)
 
 	tester_print("Enabling TX timestamping");
 
-	tx_tstamp_init(&data->tx_ts, scodata->so_timestamping);
+	tx_tstamp_init(&data->tx_ts, scodata->so_timestamping, false);
 
 	for (count = 0; count < scodata->repeat_send + 1; ++count)
-		data->step += tx_tstamp_expect(&data->tx_ts);
+		data->step += tx_tstamp_expect(&data->tx_ts, 0);
 
 	err = setsockopt(sk, SOL_SOCKET, SO_TIMESTAMPING, &so, sizeof(so));
 	if (err < 0) {
diff --git a/tools/tester.h b/tools/tester.h
index 802c92e96..4e7d7226b 100644
--- a/tools/tester.h
+++ b/tools/tester.h
@@ -38,22 +38,27 @@ struct tx_tstamp_data {
 	unsigned int count;
 	unsigned int sent;
 	uint32_t so_timestamping;
+	bool stream;
 };
 
 static inline void tx_tstamp_init(struct tx_tstamp_data *data,
-				uint32_t so_timestamping)
+				uint32_t so_timestamping, bool stream)
 {
 	memset(data, 0, sizeof(*data));
 	memset(data->expect, 0xff, sizeof(data->expect));
 
 	data->so_timestamping = so_timestamping;
+	data->stream = stream;
 }
 
-static inline int tx_tstamp_expect(struct tx_tstamp_data *data)
+static inline int tx_tstamp_expect(struct tx_tstamp_data *data, size_t len)
 {
 	unsigned int pos = data->count;
 	int steps;
 
+	if (data->stream && len)
+		data->sent += len - 1;
+
 	if (data->so_timestamping & SOF_TIMESTAMPING_TX_SCHED) {
 		g_assert(pos < ARRAY_SIZE(data->expect));
 		data->expect[pos].type = SCM_TSTAMP_SCHED;
@@ -75,7 +80,8 @@ static inline int tx_tstamp_expect(struct tx_tstamp_data *data)
 		pos++;
 	}
 
-	data->sent++;
+	if (!data->stream || len)
+		data->sent++;
 
 	steps = pos - data->count;
 	data->count = pos;
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH BlueZ v2 3/3] tools/tester: enable TX timestamping tests by default
  2025-03-18 19:07 [PATCH BlueZ v2 1/3] tools/tester: test COMPLETION timestamps Pauli Virtanen
  2025-03-18 19:07 ` [PATCH BlueZ v2 2/3] l2cap-tester: add test for stream socket TX timestamping Pauli Virtanen
@ 2025-03-18 19:07 ` Pauli Virtanen
  2025-03-18 20:08 ` [BlueZ,v2,1/3] tools/tester: test COMPLETION timestamps bluez.test.bot
  2025-03-18 22:00 ` [PATCH BlueZ v2 1/3] " patchwork-bot+bluetooth
  3 siblings, 0 replies; 5+ messages in thread
From: Pauli Virtanen @ 2025-03-18 19:07 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Pauli Virtanen

---
 tools/iso-tester.c   | 2 +-
 tools/l2cap-tester.c | 6 ------
 tools/sco-tester.c   | 6 ------
 3 files changed, 1 insertion(+), 13 deletions(-)

diff --git a/tools/iso-tester.c b/tools/iso-tester.c
index ad0738091..640692b77 100644
--- a/tools/iso-tester.c
+++ b/tools/iso-tester.c
@@ -691,7 +691,7 @@ static void test_pre_setup(const void *test_data)
 	struct test_data *data = tester_get_data();
 	const struct iso_client_data *isodata = test_data;
 
-	if (isodata && isodata->so_timestamping) {
+	if (isodata && isodata->no_poll_errqueue) {
 		if (tester_pre_setup_skip_by_default())
 			return;
 	}
diff --git a/tools/l2cap-tester.c b/tools/l2cap-tester.c
index 395e76dbc..e56773d13 100644
--- a/tools/l2cap-tester.c
+++ b/tools/l2cap-tester.c
@@ -221,12 +221,6 @@ static void read_index_list_callback(uint8_t status, uint16_t length,
 static void test_pre_setup(const void *test_data)
 {
 	struct test_data *data = tester_get_data();
-	const struct l2cap_data *l2data = test_data;
-
-	if (l2data && l2data->so_timestamping) {
-		if (tester_pre_setup_skip_by_default())
-			return;
-	}
 
 	data->mgmt = mgmt_new_default();
 	if (!data->mgmt) {
diff --git a/tools/sco-tester.c b/tools/sco-tester.c
index 145506321..650f8bab3 100644
--- a/tools/sco-tester.c
+++ b/tools/sco-tester.c
@@ -212,12 +212,6 @@ static void read_index_list_callback(uint8_t status, uint16_t length,
 static void test_pre_setup(const void *test_data)
 {
 	struct test_data *data = tester_get_data();
-	const struct sco_client_data *scodata = test_data;
-
-	if (scodata && scodata->so_timestamping) {
-		if (tester_pre_setup_skip_by_default())
-			return;
-	}
 
 	data->mgmt = mgmt_new_default();
 	if (!data->mgmt) {
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* RE: [BlueZ,v2,1/3] tools/tester: test COMPLETION timestamps
  2025-03-18 19:07 [PATCH BlueZ v2 1/3] tools/tester: test COMPLETION timestamps Pauli Virtanen
  2025-03-18 19:07 ` [PATCH BlueZ v2 2/3] l2cap-tester: add test for stream socket TX timestamping Pauli Virtanen
  2025-03-18 19:07 ` [PATCH BlueZ v2 3/3] tools/tester: enable TX timestamping tests by default Pauli Virtanen
@ 2025-03-18 20:08 ` bluez.test.bot
  2025-03-18 22:00 ` [PATCH BlueZ v2 1/3] " patchwork-bot+bluetooth
  3 siblings, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2025-03-18 20:08 UTC (permalink / raw)
  To: linux-bluetooth, pav

[-- Attachment #1: Type: text/plain, Size: 1869 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=945297

---Test result---

Test Summary:
CheckPatch                    PENDING   0.18 seconds
GitLint                       PENDING   0.20 seconds
BuildEll                      PASS      20.42 seconds
BluezMake                     PASS      1524.88 seconds
MakeCheck                     PASS      13.55 seconds
MakeDistcheck                 PASS      158.10 seconds
CheckValgrind                 PASS      213.59 seconds
CheckSmatch                   WARNING   287.66 seconds
bluezmakeextell               PASS      97.90 seconds
IncrementalBuild              PENDING   0.26 seconds
ScanBuild                     PASS      862.45 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
tools/sco-tester.c: note: in included file:./lib/bluetooth.h:232:15: warning: array of flexible structures./lib/bluetooth.h:237:31: warning: array of flexible structurestools/sco-tester.c: note: in included file:./lib/bluetooth.h:232:15: warning: array of flexible structures./lib/bluetooth.h:237:31: warning: array of flexible structurestools/sco-tester.c: note: in included file:./lib/bluetooth.h:232:15: warning: array of flexible structures./lib/bluetooth.h:237:31: warning: array of flexible structures
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH BlueZ v2 1/3] tools/tester: test COMPLETION timestamps
  2025-03-18 19:07 [PATCH BlueZ v2 1/3] tools/tester: test COMPLETION timestamps Pauli Virtanen
                   ` (2 preceding siblings ...)
  2025-03-18 20:08 ` [BlueZ,v2,1/3] tools/tester: test COMPLETION timestamps bluez.test.bot
@ 2025-03-18 22:00 ` patchwork-bot+bluetooth
  3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+bluetooth @ 2025-03-18 22:00 UTC (permalink / raw)
  To: Pauli Virtanen; +Cc: linux-bluetooth

Hello:

This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Tue, 18 Mar 2025 21:07:08 +0200 you wrote:
> Add support for SOF_TIMESTAMPING_TX_COMPLETION also in cases where
> errqueue.h is old and doesn't define it.
> 
> Support timestamps of different types arriving out of order, as multiple
> SND may well arrive before COMPLETION.  Also allow TX timestamp arriving
> before bthost receives data, as that may well happen.
> 
> [...]

Here is the summary with links:
  - [BlueZ,v2,1/3] tools/tester: test COMPLETION timestamps
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=c89e18fa55e2
  - [BlueZ,v2,2/3] l2cap-tester: add test for stream socket TX timestamping
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=fe5a5f509e0c
  - [BlueZ,v2,3/3] tools/tester: enable TX timestamping tests by default
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=f4b6a649ccdd

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-03-18 21:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-18 19:07 [PATCH BlueZ v2 1/3] tools/tester: test COMPLETION timestamps Pauli Virtanen
2025-03-18 19:07 ` [PATCH BlueZ v2 2/3] l2cap-tester: add test for stream socket TX timestamping Pauli Virtanen
2025-03-18 19:07 ` [PATCH BlueZ v2 3/3] tools/tester: enable TX timestamping tests by default Pauli Virtanen
2025-03-18 20:08 ` [BlueZ,v2,1/3] tools/tester: test COMPLETION timestamps bluez.test.bot
2025-03-18 22:00 ` [PATCH BlueZ v2 1/3] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).