[PATCH BlueZ] mgmt-tester: Fix adding padding for Ext Adv (Scan Response) Data

Subsystems: the rest

STALE1878d

3 messages, 2 authors, 2021-06-09 · open the first message on its own page

[PATCH BlueZ] mgmt-tester: Fix adding padding for Ext Adv (Scan Response) Data

From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Date: 2021-06-09 21:25:30

From: Luiz Augusto von Dentz <redacted>

These commands are actually of variable size so they don't expect
padding like in the non-extended version.
---
 tools/mgmt-tester.c | 54 +++------------------------------------------
 1 file changed, 3 insertions(+), 51 deletions(-)
diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index 6109883ad..52cd19a36 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
@@ -5572,9 +5572,6 @@ static const char ext_adv_hci_ad_data_valid[] = {
 	0x19, /* GAP Appearance */
 	0x01,
 	0x23,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
 };
 
 static const char ext_adv_hci_scan_rsp_data_valid[] = {
@@ -5588,9 +5585,6 @@ static const char ext_adv_hci_scan_rsp_data_valid[] = {
 	'e',
 	's',
 	't',
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00,
 };
 
 static const uint8_t ext_adv_data_invalid[] = {
@@ -7619,10 +7613,6 @@ static const uint8_t set_ext_adv_data_uuid[] = {
 	0x09,
 	/* advertise heart rate monitor and manufacturer specific data */
 	0x03, 0x02, 0x0d, 0x18, 0x04, 0xff, 0x01, 0x02, 0x03,
-	/* padding */
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00
 };
 
 static const struct generic_data add_ext_advertising_success_1 = {
@@ -7649,10 +7639,6 @@ static const uint8_t set_ext_adv_data_test1[] = {
 	0x06,				/* AD len */
 	0x08,				/* AD type: shortened local name */
 	0x74, 0x65, 0x73, 0x74, 0x31,	/* "test1" */
-	/* padding */
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00,
 };
 
 static const struct generic_data add_ext_advertising_success_pwron_data = {
@@ -7695,10 +7681,6 @@ static const uint8_t set_ext_adv_data_txpwr[] = {
 	0x02, 			/* AD len */
 	0x0a,			/* AD type: tx power */
 	0x00,			/* tx power */
-	/* padding */
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 };
 
 static const struct generic_data add_ext_advertising_success_4 = {
@@ -7752,10 +7734,6 @@ static const uint8_t set_ext_scan_rsp_uuid[] = {
 	0x05,			/* AD len */
 	0x03,			/* AD type: all 16 bit service class UUIDs */
 	0x0d, 0x18, 0x0f, 0x18,	/* heart rate monitor, battery service */
-	/* padding */
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00,
 };
 
 static const struct generic_data add_ext_advertising_success_7 = {
@@ -7819,9 +7797,6 @@ static const uint8_t set_ext_adv_data_general_discov[] = {
 	0x04,			/* AD len */
 	0xff,			/* AD type: manufacturer specific data */
 	0x01, 0x02, 0x03,	/* custom advertising data */
-	/* padding */
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 };
 
 static const uint8_t set_ext_adv_data_limited_discov[] = {
@@ -7834,9 +7809,6 @@ static const uint8_t set_ext_adv_data_limited_discov[] = {
 	0x01,			/* limited discoverable */
 	/* rest: same as before */
 	0x03, 0x02, 0x0d, 0x18, 0x04, 0xff, 0x01, 0x02, 0x03,
-	/* padding */
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 };
 
 static const uint8_t set_ext_adv_data_uuid_txpwr[] = {
@@ -7853,9 +7825,6 @@ static const uint8_t set_ext_adv_data_uuid_txpwr[] = {
 	0x02,			/* AD len */
 	0x0a,			/* AD type: tx power */
 	0x00,			/* tx power */
-	/* padding */
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 };
 
 static const struct generic_data add_ext_advertising_success_9 = {
@@ -8131,10 +8100,6 @@ static const uint8_t set_ext_adv_data_test2[] = {
 	0x06,				/* AD len */
 	0x08,				/* AD type: shortened local name */
 	0x74, 0x65, 0x73, 0x74, 0x32,	/* "test2" */
-	/* padding */
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00,
 };
 
 static const struct generic_data multi_ext_advertising_switch = {
@@ -8236,10 +8201,6 @@ static const uint8_t ext_scan_rsp_data_empty[] = {
 	0x01,				/* controller should not fragment */
 	0x01, /* scan rsp data len */
 	0x00, /* scan rsp data */
-	/* placeholder data */
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 };
 
 static const struct generic_data add_ext_advertising_no_name_set = {
@@ -8262,10 +8223,8 @@ static const uint8_t set_ext_scan_rsp_data_name_fits_in_scrsp[] = {
 	0x0c, /* Scan rsp data len */
 	0x0b, /* Local name data len */
 	0x09, /* Complete name */
-	0x54, 0x65, 0x73, 0x74, 0x20, 0x6e, 0x61, 0x6d, 0x65, /* "Test name" */
-	/* padding */
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	/* "Test name" */
+	0x54, 0x65, 0x73, 0x74, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x00,
 };
 
 static const struct generic_data add_ext_advertising_name_fits_in_scrsp = {
@@ -8291,11 +8250,8 @@ static const uint8_t set_ext_scan_rsp_data_shortened_name_fits[] = {
 	0x0d, /* Scan rsp data len */
 	0x0c, /* Local name data len */
 	0x08, /* Short name */
-	0x54, 0x65, 0x73, 0x74, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x31,
 	/* "Test name1" */
-	/* padding */
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x54, 0x65, 0x73, 0x74, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x31, 0x00,
 };
 
 static const struct generic_data add_ext_advertising_shortened_name_in_scrsp = {
@@ -8326,8 +8282,6 @@ static const uint8_t set_ext_scan_rsp_data_param_name_data_ok[] = {
 	0x09, /* Complete name */
 	0x54, 0x65, 0x73, 0x74, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x00,
 	/* "Test name" */
-	/* padding */
-	0x00,
 };
 
 static const struct generic_data add_ext_advertising_name_data_ok = {
@@ -8374,8 +8328,6 @@ static const uint8_t set_ext_scan_rsp_data_name_data_appear[] = {
 	0x09, /* Complete name */
 	0x54, 0x65, 0x73, 0x74, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x00,
 	/* "Test name" */
-	/* padding */
-	0x00,
 };
 
 static const struct generic_data add_ext_advertising_name_data_appear = {
-- 
2.31.1

RE: [BlueZ] mgmt-tester: Fix adding padding for Ext Adv (Scan Response) Data

From: <hidden>
Date: 2021-06-09 22:06:36

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

---Test result---

Test Summary:
CheckPatch                    PASS      0.81 seconds
GitLint                       PASS      0.12 seconds
Prep - Setup ELL              PASS      48.50 seconds
Build - Prep                  PASS      0.16 seconds
Build - Configure             PASS      8.46 seconds
Build - Make                  PASS      210.61 seconds
Make Check                    PASS      9.60 seconds
Make Distcheck                PASS      245.58 seconds
Build w/ext ELL - Configure   PASS      8.34 seconds
Build w/ext ELL - Make        PASS      198.66 seconds

Details
##############################
Test: CheckPatch - PASS
Desc: Run checkpatch.pl script with rule in .checkpatch.conf

##############################
Test: GitLint - PASS
Desc: Run gitlint with rule in .gitlint

##############################
Test: Prep - Setup ELL - PASS
Desc: Clone, build, and install ELL

##############################
Test: Build - Prep - PASS
Desc: Prepare environment for build

##############################
Test: Build - Configure - PASS
Desc: Configure the BlueZ source tree

##############################
Test: Build - Make - PASS
Desc: Build the BlueZ source tree

##############################
Test: Make Check - PASS
Desc: Run 'make check'

##############################
Test: Make Distcheck - PASS
Desc: Run distcheck to check the distribution

##############################
Test: Build w/ext ELL - Configure - PASS
Desc: Configure BlueZ source with '--enable-external-ell' configuration

##############################
Test: Build w/ext ELL - Make - PASS
Desc: Build BlueZ source with '--enable-external-ell' configuration



---
Regards,
Linux Bluetooth

Re: [BlueZ] mgmt-tester: Fix adding padding for Ext Adv (Scan Response) Data

From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Date: 2021-06-09 22:19:41

Hi,

On Wed, Jun 9, 2021 at 3:05 PM [off-list ref] wrote:
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=497549

---Test result---

Test Summary:
CheckPatch                    PASS      0.81 seconds
GitLint                       PASS      0.12 seconds
Prep - Setup ELL              PASS      48.50 seconds
Build - Prep                  PASS      0.16 seconds
Build - Configure             PASS      8.46 seconds
Build - Make                  PASS      210.61 seconds
Make Check                    PASS      9.60 seconds
Make Distcheck                PASS      245.58 seconds
Build w/ext ELL - Configure   PASS      8.34 seconds
Build w/ext ELL - Make        PASS      198.66 seconds

Details
##############################
Test: CheckPatch - PASS
Desc: Run checkpatch.pl script with rule in .checkpatch.conf

##############################
Test: GitLint - PASS
Desc: Run gitlint with rule in .gitlint

##############################
Test: Prep - Setup ELL - PASS
Desc: Clone, build, and install ELL

##############################
Test: Build - Prep - PASS
Desc: Prepare environment for build

##############################
Test: Build - Configure - PASS
Desc: Configure the BlueZ source tree

##############################
Test: Build - Make - PASS
Desc: Build the BlueZ source tree

##############################
Test: Make Check - PASS
Desc: Run 'make check'

##############################
Test: Make Distcheck - PASS
Desc: Run distcheck to check the distribution

##############################
Test: Build w/ext ELL - Configure - PASS
Desc: Configure BlueZ source with '--enable-external-ell' configuration

##############################
Test: Build w/ext ELL - Make - PASS
Desc: Build BlueZ source with '--enable-external-ell' configuration



---
Regards,
Linux Bluetooth
Pushed.

-- 
Luiz Augusto von Dentz
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help