* [PATCH BlueZ 1/2] 6lowpan-tester: add test for header compression
@ 2025-11-01 12:10 Pauli Virtanen
2025-11-01 12:10 ` [PATCH BlueZ 2/2] 6lowpan-tester: re-enable previously crashing test Pauli Virtanen
2025-11-01 13:41 ` [BlueZ,1/2] 6lowpan-tester: add test for header compression bluez.test.bot
0 siblings, 2 replies; 3+ messages in thread
From: Pauli Virtanen @ 2025-11-01 12:10 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Pauli Virtanen
Add smoke test for IPV6 header compression:
Client Recv IPHC Dgram - Success
Client Recv IPHC Raw - Success
---
tools/6lowpan-tester.c | 61 +++++++++++++++++++++++++++++++++++++++---
1 file changed, 57 insertions(+), 4 deletions(-)
diff --git a/tools/6lowpan-tester.c b/tools/6lowpan-tester.c
index e1d23d552..7fdacefeb 100644
--- a/tools/6lowpan-tester.c
+++ b/tools/6lowpan-tester.c
@@ -70,6 +70,10 @@ struct client_data {
const void *send_data;
uint16_t send_data_len;
+ /* Data to expect to be received as kernel client */
+ const void *send_expect_data;
+ uint16_t send_expect_data_len;
+
/* Interface listener socket type, SOCK_RAW / DGRAM */
int sk_type;
};
@@ -320,6 +324,8 @@ static const uint8_t dgram_data[64+1] = {
static const struct client_data client_recv_dgram = {
.send_data = dgram_data,
.send_data_len = sizeof(dgram_data),
+ .send_expect_data = dgram_data + 1,
+ .send_expect_data_len = sizeof(dgram_data) - 1,
.sk_type = SOCK_DGRAM,
.disconnect = true,
};
@@ -327,11 +333,49 @@ static const struct client_data client_recv_dgram = {
static const struct client_data client_recv_raw = {
.send_data = dgram_data,
.send_data_len = sizeof(dgram_data),
+ .send_expect_data = dgram_data + 1,
+ .send_expect_data_len = sizeof(dgram_data) - 1,
.sk_type = SOCK_RAW,
.disconnect = true,
.skip_by_default_reason = "kernel BUG at net/core/skbuff.c:212"
};
+static const uint8_t iphc_dgram_data[64+2] = {
+ /* IPHC dispatch: TF=11, NH=0, HLIM=00; see draft-ietf-6lowpan-hc-11 */
+ 0x78,
+ /* CID=0, SAC=0, SAM=00, M=0, DAC=0, DAM=00 */
+ 0x00,
+ /* rest of ipv6 fields (nh, hlim, src, dst) + data */
+ 0xde, 0xad, 0xbe, 0xef
+};
+
+static const uint8_t iphc_uncompressed_dgram_data[70] = {
+ /* IPv6 (version, tc, fl) */
+ 0x60, 0x00, 0x00, 0x00,
+ /* payload size */
+ 0x00, sizeof(iphc_dgram_data) - 2 - (2 + 2*16),
+ /* rest of ipv6 fields + data */
+ 0xde, 0xad, 0xbe, 0xef
+};
+
+static const struct client_data client_recv_iphc_dgram = {
+ .send_data = iphc_dgram_data,
+ .send_data_len = sizeof(iphc_dgram_data),
+ .send_expect_data = iphc_uncompressed_dgram_data,
+ .send_expect_data_len = sizeof(iphc_uncompressed_dgram_data),
+ .sk_type = SOCK_DGRAM,
+ .disconnect = true,
+};
+
+static const struct client_data client_recv_iphc_raw = {
+ .send_data = iphc_dgram_data,
+ .send_data_len = sizeof(iphc_dgram_data),
+ .send_expect_data = iphc_uncompressed_dgram_data,
+ .send_expect_data_len = sizeof(iphc_uncompressed_dgram_data),
+ .sk_type = SOCK_RAW,
+ .disconnect = true,
+};
+
static void client_cmd_complete(uint16_t opcode, uint8_t status,
const void *param, uint8_t len,
void *user_data)
@@ -501,7 +545,6 @@ static gboolean recv_iface_packet(GIOChannel *io, GIOCondition cond,
uint8_t buf[256];
int fd;
ssize_t ret;
- int phy_hdr_size = (cdata->sk_type == SOCK_DGRAM) ? 1 : 0;
if (cond & (G_IO_ERR | G_IO_HUP | G_IO_NVAL))
goto done;
@@ -516,9 +559,9 @@ static gboolean recv_iface_packet(GIOChannel *io, GIOCondition cond,
tester_print("Recv %d bytes", (int)ret);
- if (ret != cdata->send_data_len - phy_hdr_size)
+ if (ret != cdata->send_expect_data_len)
return TRUE;
- if (memcmp(buf, cdata->send_data + phy_hdr_size, ret))
+ if (memcmp(buf, cdata->send_expect_data, ret))
return TRUE;
tester_print("Received sent packet");
@@ -559,7 +602,7 @@ static gboolean client_open_iface(gpointer user_data)
recv_iface_packet, data);
g_io_channel_unref(io);
- tester_debug("Send %u+1 bytes", cdata->send_data_len - 1);
+ tester_debug("Send %u bytes", cdata->send_data_len);
bthost_send_cid(bthost, data->handle, data->dcid,
cdata->send_data, cdata->send_data_len);
} else if (cdata->disconnect) {
@@ -670,5 +713,15 @@ int main(int argc, char *argv[])
setup_powered_client,
test_connect);
+ test_6lowpan("Client Recv IPHC Dgram - Success",
+ &client_recv_iphc_dgram,
+ setup_powered_client,
+ test_connect);
+
+ test_6lowpan("Client Recv IPHC Raw - Success",
+ &client_recv_iphc_raw,
+ setup_powered_client,
+ test_connect);
+
return tester_run();
}
--
2.51.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH BlueZ 2/2] 6lowpan-tester: re-enable previously crashing test
2025-11-01 12:10 [PATCH BlueZ 1/2] 6lowpan-tester: add test for header compression Pauli Virtanen
@ 2025-11-01 12:10 ` Pauli Virtanen
2025-11-01 13:41 ` [BlueZ,1/2] 6lowpan-tester: add test for header compression bluez.test.bot
1 sibling, 0 replies; 3+ messages in thread
From: Pauli Virtanen @ 2025-11-01 12:10 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Pauli Virtanen
Enable test that previously crashed kernel, since there's a patch now:
Client Recv Raw - Success
---
tools/6lowpan-tester.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tools/6lowpan-tester.c b/tools/6lowpan-tester.c
index 7fdacefeb..65dba173b 100644
--- a/tools/6lowpan-tester.c
+++ b/tools/6lowpan-tester.c
@@ -337,7 +337,6 @@ static const struct client_data client_recv_raw = {
.send_expect_data_len = sizeof(dgram_data) - 1,
.sk_type = SOCK_RAW,
.disconnect = true,
- .skip_by_default_reason = "kernel BUG at net/core/skbuff.c:212"
};
static const uint8_t iphc_dgram_data[64+2] = {
--
2.51.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [BlueZ,1/2] 6lowpan-tester: add test for header compression
2025-11-01 12:10 [PATCH BlueZ 1/2] 6lowpan-tester: add test for header compression Pauli Virtanen
2025-11-01 12:10 ` [PATCH BlueZ 2/2] 6lowpan-tester: re-enable previously crashing test Pauli Virtanen
@ 2025-11-01 13:41 ` bluez.test.bot
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2025-11-01 13:41 UTC (permalink / raw)
To: linux-bluetooth, pav
[-- Attachment #1: Type: text/plain, Size: 1262 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=1018491
---Test result---
Test Summary:
CheckPatch PENDING 0.25 seconds
GitLint PENDING 0.30 seconds
BuildEll PASS 20.05 seconds
BluezMake PASS 2586.97 seconds
MakeCheck PASS 20.60 seconds
MakeDistcheck PASS 184.21 seconds
CheckValgrind PASS 236.00 seconds
CheckSmatch PASS 309.75 seconds
bluezmakeextell PASS 128.82 seconds
IncrementalBuild PENDING 0.29 seconds
ScanBuild PASS 915.36 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-11-01 13:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-01 12:10 [PATCH BlueZ 1/2] 6lowpan-tester: add test for header compression Pauli Virtanen
2025-11-01 12:10 ` [PATCH BlueZ 2/2] 6lowpan-tester: re-enable previously crashing test Pauli Virtanen
2025-11-01 13:41 ` [BlueZ,1/2] 6lowpan-tester: add test for header compression bluez.test.bot
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).