Message ID | 975ef1acdd3903f4e0fcb26dc1d0046762d99140.1742336487.git.pav@iki.fi (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [BlueZ] l2cap-tester: ensure SO_SNDBUF is large enough for the writes | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
tedd_an/BuildEll | success | Build ELL PASS |
tedd_an/BluezMake | success | Bluez Make PASS |
tedd_an/MakeCheck | success | Bluez Make Check PASS |
tedd_an/MakeDistcheck | success | Make Distcheck PASS |
tedd_an/CheckValgrind | success | Check Valgrind PASS |
tedd_an/CheckSmatch | success | CheckSparse PASS |
tedd_an/bluezmakeextell | success | Make External ELL PASS |
tedd_an/ScanBuild | success | Scan Build PASS |
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=945352 ---Test result--- Test Summary: CheckPatch PENDING 0.20 seconds GitLint PENDING 0.20 seconds BuildEll PASS 20.38 seconds BluezMake PASS 1472.88 seconds MakeCheck PASS 13.26 seconds MakeDistcheck PASS 158.31 seconds CheckValgrind PASS 213.97 seconds CheckSmatch PASS 283.23 seconds bluezmakeextell PASS 98.45 seconds IncrementalBuild PENDING 0.24 seconds ScanBuild PASS 865.27 seconds Details ############################## Test: CheckPatch - PENDING Desc: Run checkpatch.pl script Output: ############################## Test: GitLint - PENDING Desc: Run gitlint Output: ############################## Test: IncrementalBuild - PENDING Desc: Incremental build with the patches in the series Output: --- Regards, Linux Bluetooth
diff --git a/tools/l2cap-tester.c b/tools/l2cap-tester.c index e56773d13..3b3ffb6a7 100644 --- a/tools/l2cap-tester.c +++ b/tools/l2cap-tester.c @@ -1451,8 +1451,9 @@ static void l2cap_write_data(struct test_data *data, GIOChannel *io, const struct l2cap_data *l2data = data->test_data; struct bthost *bthost; ssize_t ret; - int sk; + int sk, size; unsigned int count; + socklen_t len = sizeof(size); sk = g_io_channel_unix_get_fd(io); @@ -1464,6 +1465,15 @@ static void l2cap_write_data(struct test_data *data, GIOChannel *io, l2cap_tx_timestamping(data, io); + /* Socket buffer needs to hold what we send, btdev doesn't flush now */ + ret = getsockopt(sk, SOL_SOCKET, SO_SNDBUF, &size, &len); + if (!ret) { + size += l2data->data_len * (l2data->repeat_send + 1); + ret = setsockopt(sk, SOL_SOCKET, SO_SNDBUF, &size, len); + } + if (ret) + tester_warn("Failed to set SO_SNDBUF = %d", size); + for (count = 0; count < l2data->repeat_send + 1; ++count) { ret = l2cap_send(sk, l2data->write_data, l2data->data_len, data->l2o.omtu);