Skip to contentSkip to conversation

Add mesh testing support

PATCH Applied Brian Gix 3 participants 5 messages Aug 31, 2022 – Sep 1, 2022

Subsystems (3)
lore
Share & tools
lore

Brian Gix

author
#0 lore raw

v4 cover Add mesh testing support

This patch set reserves MGMT events and opcodes for Mesh, and adds a new unit tester for those features: mesh-tester

v2 - v4: Fix whitespace

Brian Gix (2):
lib: Add mgmt opcodes and events for Mesh
tools: Add mesh-tester to test Kernel mesh support

 Makefile.tools      |   12 +-
 lib/mgmt.h          |   47 ++
 tools/mesh-tester.c | 1441 +++++++++++++++++++++++++++++++++++++++++++
 tools/test-runner.c |    2 +
 4 files changed, 1501 insertions(+), 1 deletion(-)
 create mode 100644 tools/mesh-tester.c
Signature · 1 line
2.37.2
author
#1 lore raw

PATCH v4 1/2 lib: Add mgmt opcodes and events for Mesh

---
 lib/mgmt.h | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)
lib/mgmt.h +47 -0
index 430bd0ef6..79b77d31a 100644
@@ -760,6 +760,38 @@ struct mgmt_cp_add_adv_patterns_monitor_rssi {
 	struct mgmt_adv_pattern patterns[0];
 } __packed;
 
+#define MGMT_OP_SET_MESH_RECEIVER		0x0057
+struct mgmt_cp_set_mesh {
+	uint8_t enable;
+	uint16_t window;
+	uint16_t period;
+	uint8_t num_ad_types;
+	uint8_t ad_types[];
+} __packed;
+
+#define MGMT_OP_MESH_READ_FEATURES	0x0058
+struct mgmt_rp_mesh_read_features {
+	uint16_t index;
+	uint8_t max_handles;
+	uint8_t used_handles;
+	uint8_t handles[];
+} __packed;
+
+#define MGMT_OP_MESH_SEND		0x0059
+struct mgmt_cp_mesh_send {
+	struct mgmt_addr_info addr;
+	uint64_t instant;
+	uint16_t delay;
+	uint8_t cnt;
+	uint8_t adv_data_len;
+	uint8_t adv_data[];
+} __packed;
+
+#define MGMT_OP_MESH_SEND_CANCEL	0x005A
+struct mgmt_cp_mesh_send_cancel {
+	uint8_t handle;
+} __packed;
+
 #define MGMT_EV_CMD_COMPLETE		0x0001
 struct mgmt_ev_cmd_complete {
 	uint16_t opcode;
@@ -1035,6 +1067,21 @@ struct mgmt_ev_adv_monitor_device_lost {
 	struct mgmt_addr_info addr;
 } __packed;
 
+#define MGMT_EV_MESH_DEVICE_FOUND	0x0031
+struct mgmt_ev_mesh_device_found {
+	struct mgmt_addr_info addr;
+	int8_t rssi;
+	uint64_t instant;
+	uint32_t flags;
+	uint16_t eir_len;
+	uint8_t	eir[];
+} __packed;
+
+#define MGMT_EV_MESH_PACKET_CMPLT		0x0032
+struct mgmt_ev_mesh_pkt_cmplt {
+	uint8_t	handle;
+} __packed;
+
 static const char *mgmt_op[] = {
 	"<0x0000>",
 	"Read Version",
Signature · 1 line
2.37.2
#2 lore raw

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=672998

---Test result---

Test Summary:

CheckPatch                    PASS      4.62 seconds
GitLint                       PASS      2.24 seconds
Prep - Setup ELL              PASS      31.12 seconds
Build - Prep                  PASS      0.88 seconds
Build - Configure             PASS      10.05 seconds
Build - Make                  PASS      950.81 seconds
Make Check                    PASS      12.98 seconds
Make Check w/Valgrind         PASS      334.75 seconds
Make Distcheck                PASS      277.41 seconds
Build w/ext ELL - Configure   PASS      10.23 seconds
Build w/ext ELL - Make        PASS      97.15 seconds
Incremental Build w/ patches  PASS      231.34 seconds
Scan Build                    PASS      746.78 seconds

---
Regards,
Linux Bluetooth

author
#3 lore raw

PATCH v4 2/2 tools: Add mesh-tester to test Kernel mesh support

In reply to Brian Gix

Ever growing set of tests for Mesh kernel support

---
 Makefile.tools      |   12 +-
 tools/mesh-tester.c | 1441 +++++++++++++++++++++++++++++++++++++++++++
 tools/test-runner.c |    2 +
 3 files changed, 1454 insertions(+), 1 deletion(-)
 create mode 100644 tools/mesh-tester.c
Makefile.tools +11 -1
index 9412aed36..f4b951474 100644
@@ -86,7 +86,8 @@ noinst_PROGRAMS += emulator/btvirt emulator/b1ee emulator/hfp \
 					tools/l2cap-tester tools/sco-tester \
 					tools/smp-tester tools/hci-tester \
 					tools/rfcomm-tester tools/bnep-tester \
-					tools/userchan-tester tools/iso-tester
+					tools/userchan-tester tools/iso-tester \
+					tools/mesh-tester
 
 emulator_btvirt_SOURCES = emulator/main.c monitor/bt.h \
 				emulator/serial.h emulator/serial.c \
@@ -127,6 +128,15 @@ tools_mgmt_tester_SOURCES = tools/mgmt-tester.c monitor/bt.h \
 tools_mgmt_tester_LDADD = lib/libbluetooth-internal.la \
 				src/libshared-glib.la $(GLIB_LIBS)
 
+tools_mesh_tester_SOURCES = tools/mesh-tester.c monitor/bt.h \
+				emulator/hciemu.h emulator/hciemu.c \
+				emulator/vhci.h emulator/vhci.c \
+				emulator/btdev.h emulator/btdev.c \
+				emulator/bthost.h emulator/bthost.c \
+				emulator/smp.c
+tools_mesh_tester_LDADD = lib/libbluetooth-internal.la \
+				src/libshared-glib.la $(GLIB_LIBS)
+
 tools_l2cap_tester_SOURCES = tools/l2cap-tester.c monitor/bt.h \
 				emulator/hciemu.h emulator/hciemu.c \
 				emulator/vhci.h emulator/vhci.c \
tools/mesh-tester.c new file +1441 -0

1,441 lines not on this page · raw message

tools/test-runner.c +2 -0
index 71d50e015..e1794e8c1 100644
@@ -614,6 +614,7 @@ static const char *test_table[] = {
 	"rfcomm-tester",
 	"sco-tester",
 	"iso-tester",
+	"mesh-tester",
 	"bnep-tester",
 	"check-selftest",
 	"tools/mgmt-tester",
@@ -622,6 +623,7 @@ static const char *test_table[] = {
 	"tools/rfcomm-tester",
 	"tools/sco-tester",
 	"tools/iso-tester",
+	"tools/mesh-tester",
 	"tools/bnep-tester",
 	"tools/check-selftest",
 	NULL
Signature · 1 line
2.37.2
#4 lore raw
In reply to Brian Gix
This series was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Hello:

This series was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Quoted 11 lines · On Wed, 31 Aug 2022 16:59:30 -0700 you wrote:

This patch set reserves MGMT events and opcodes for Mesh, and adds a new unit tester for those features: mesh-tester

v2 - v4: Fix whitespace

Brian Gix (2):
lib: Add mgmt opcodes and events for Mesh
tools: Add mesh-tester to test Kernel mesh support

[...]

Here is the summary with links:
- [BlueZ,v4,1/2] lib: Add mgmt opcodes and events for Mesh

    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=4f452c7753da
  - [BlueZ,v4,2/2] tools: Add mesh-tester to test Kernel mesh support
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=da4b654834b1

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html