All of lore.kernel.org
 help / color / mirror / Atom feed
* [BlueZ 1/3] doc: fix minor typos
@ 2015-04-05 18:39 Florian Grandel
  2015-04-05 18:39 ` [BlueZ 2/3] tools: fix misleading test output Florian Grandel
  2015-04-05 18:39 ` [BlueZ 3/3] tools: add read adv features success tests Florian Grandel
  0 siblings, 2 replies; 9+ messages in thread
From: Florian Grandel @ 2015-04-05 18:39 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Florian Grandel

The documentation contained minor typos which are being fixed here.

Signed-off-by: Florian Grandel <fgrandel@gmail.com>
---
 doc/coding-style.txt          | 2 +-
 doc/maintainer-guidelines.txt | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/coding-style.txt b/doc/coding-style.txt
index b3fbd2e..f0bf880 100644
--- a/doc/coding-style.txt
+++ b/doc/coding-style.txt
@@ -61,7 +61,7 @@ if (err || !S_ISDIR(st.st_mode))
 M2: Multiple line comment
 =========================
 
-If your comments have more then one line, please start it from the second line.
+If your comment has more than one line, please start it from the second line.
 
 Example:
 /*
diff --git a/doc/maintainer-guidelines.txt b/doc/maintainer-guidelines.txt
index fef90c8..21162d4 100644
--- a/doc/maintainer-guidelines.txt
+++ b/doc/maintainer-guidelines.txt
@@ -99,7 +99,7 @@ verified first:
 	- Check that the names are acceptible with other maintainers
 	- Ensure that the file modes are correct
 	- Verify that the license & copyright headers are correct
-	- If the file is supposed to be part of the release taraball,
+	- If the file is supposed to be part of the release tarball,
 	  make sure that it gets picked up by 'make dist' (particularly
 	  important for documentation or other files that are not code)
 
-- 
1.9.1


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

* [BlueZ 2/3] tools: fix misleading test output
  2015-04-05 18:39 [BlueZ 1/3] doc: fix minor typos Florian Grandel
@ 2015-04-05 18:39 ` Florian Grandel
  2015-04-05 18:39 ` [BlueZ 3/3] tools: add read adv features success tests Florian Grandel
  1 sibling, 0 replies; 9+ messages in thread
From: Florian Grandel @ 2015-04-05 18:39 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Florian Grandel

The setup_add_advertising() function claimed to add an advertising
instance while unpowered although it actually adds the instance while
powered. This patch fixes the tester output accordingly.
---
 tools/mgmt-tester.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index 6a9b527..174c3b7 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
@@ -4894,7 +4894,7 @@ static void setup_add_advertising(const void *test_data)
 	unsigned char adv_param[sizeof(*cp) + 6];
 	unsigned char param[] = { 0x01 };
 
-	tester_print("Adding advertising instance while unpowered");
+	tester_print("Adding advertising instance while powered");
 
 	cp = (struct mgmt_cp_add_advertising *) adv_param;
 	memset(cp, 0, sizeof(*cp));
-- 
1.9.1


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

* [BlueZ 3/3] tools: add read adv features success tests
  2015-04-05 18:39 [BlueZ 1/3] doc: fix minor typos Florian Grandel
  2015-04-05 18:39 ` [BlueZ 2/3] tools: fix misleading test output Florian Grandel
@ 2015-04-05 18:39 ` Florian Grandel
  2015-04-05 19:11   ` [BlueZ v2 0/3] Minor improvements to the docs and mgmt API tests Florian Grandel
                     ` (3 more replies)
  1 sibling, 4 replies; 9+ messages in thread
From: Florian Grandel @ 2015-04-05 18:39 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Florian Grandel

The mgmt-tester did not yet contains tests for the happy path of the
MGMT_OP_READ_ADV_FEATURES command. This patch adds two tests: one
calling the command without an advertising instance and one with one
advertising instance added.
---
 doc/test-coverage.txt |  2 +-
 tools/mgmt-tester.c   | 29 +++++++++++++++++++++++++++++
 2 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/doc/test-coverage.txt b/doc/test-coverage.txt
index fa8a04a..19bb73c 100644
--- a/doc/test-coverage.txt
+++ b/doc/test-coverage.txt
@@ -39,7 +39,7 @@ Automated end-to-end testing
 
 Application		Count	Description
 -------------------------------------------
-mgmt-tester		 293	Kernel management interface testing
+mgmt-tester		 295	Kernel management interface testing
 l2cap-tester		  27	Kernel L2CAP implementation testing
 rfcomm-tester		   9	Kernel RFCOMM implementation testing
 bnep-tester		   1	Kernel BNEP implementation testing
diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index 174c3b7..d9e1c6f 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
@@ -3862,6 +3862,28 @@ static const struct generic_data read_adv_features_invalid_index_test = {
 	.expect_status = MGMT_STATUS_INVALID_INDEX,
 };
 
+static const uint8_t read_adv_features_rsp_1[] =  {
+			0x1f, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x01, 0x00,
+};
+
+static const struct generic_data read_adv_features_success_1 = {
+	.send_opcode = MGMT_OP_READ_ADV_FEATURES,
+	.expect_param = read_adv_features_rsp_1,
+	.expect_len = sizeof(read_adv_features_rsp_1),
+	.expect_status = MGMT_STATUS_SUCCESS,
+};
+
+static const uint8_t read_adv_features_rsp_2[] =  {
+			0x1f, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x01, 0x01, 0x01
+};
+
+static const struct generic_data read_adv_features_success_2 = {
+	.send_opcode = MGMT_OP_READ_ADV_FEATURES,
+	.expect_param = read_adv_features_rsp_2,
+	.expect_len = sizeof(read_adv_features_rsp_2),
+	.expect_status = MGMT_STATUS_SUCCESS,
+};
+
 static const uint8_t add_advertising_param_1[] = {
 	0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00,
 	0x03, 0x02, 0x0d, 0x18,
@@ -6384,6 +6406,13 @@ int main(int argc, char *argv[])
 	test_bredrle("Read Advertising Features - Invalid index",
 				&read_adv_features_invalid_index_test,
 				NULL, test_command_generic);
+	test_bredrle("Read Advertising Features - Success 1 (No instance)",
+				&read_adv_features_success_1,
+				NULL, test_command_generic);
+	test_bredrle("Read Advertising Features - Success 2 (One instance)",
+				&read_adv_features_success_2,
+				setup_add_advertising,
+				test_command_generic);
 
 	test_bredrle("Add Advertising - Failure: LE off",
 					&add_advertising_fail_1,
-- 
1.9.1


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

* [BlueZ v2 0/3] Minor improvements to the docs and mgmt API tests
  2015-04-05 18:39 ` [BlueZ 3/3] tools: add read adv features success tests Florian Grandel
@ 2015-04-05 19:11   ` Florian Grandel
  2015-04-09  9:42     ` Johan Hedberg
  2015-04-05 19:11   ` [BlueZ v2 1/3] doc: fix minor typos Florian Grandel
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Florian Grandel @ 2015-04-05 19:11 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Florian Grandel

v1 -> v2: found more instances of misleading test messages

Florian Grandel (3):
  doc: fix minor typos
  tools: fix misleading test output
  tools: add read adv features success tests

 doc/coding-style.txt          |  2 +-
 doc/maintainer-guidelines.txt |  2 +-
 doc/test-coverage.txt         |  2 +-
 tools/mgmt-tester.c           | 37 +++++++++++++++++++++++++++++++++----
 4 files changed, 36 insertions(+), 7 deletions(-)

-- 
1.9.1


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

* [BlueZ v2 1/3] doc: fix minor typos
  2015-04-05 18:39 ` [BlueZ 3/3] tools: add read adv features success tests Florian Grandel
  2015-04-05 19:11   ` [BlueZ v2 0/3] Minor improvements to the docs and mgmt API tests Florian Grandel
@ 2015-04-05 19:11   ` Florian Grandel
  2015-04-05 19:11   ` [BlueZ v2 2/3] tools: fix misleading test output Florian Grandel
  2015-04-05 19:11   ` [BlueZ v2 3/3] tools: add read adv features success tests Florian Grandel
  3 siblings, 0 replies; 9+ messages in thread
From: Florian Grandel @ 2015-04-05 19:11 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Florian Grandel

The documentation contained minor typos which are being fixed here.

Signed-off-by: Florian Grandel <fgrandel@gmail.com>
---
 doc/coding-style.txt          | 2 +-
 doc/maintainer-guidelines.txt | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/coding-style.txt b/doc/coding-style.txt
index b3fbd2e..f0bf880 100644
--- a/doc/coding-style.txt
+++ b/doc/coding-style.txt
@@ -61,7 +61,7 @@ if (err || !S_ISDIR(st.st_mode))
 M2: Multiple line comment
 =========================
 
-If your comments have more then one line, please start it from the second line.
+If your comment has more than one line, please start it from the second line.
 
 Example:
 /*
diff --git a/doc/maintainer-guidelines.txt b/doc/maintainer-guidelines.txt
index fef90c8..21162d4 100644
--- a/doc/maintainer-guidelines.txt
+++ b/doc/maintainer-guidelines.txt
@@ -99,7 +99,7 @@ verified first:
 	- Check that the names are acceptible with other maintainers
 	- Ensure that the file modes are correct
 	- Verify that the license & copyright headers are correct
-	- If the file is supposed to be part of the release taraball,
+	- If the file is supposed to be part of the release tarball,
 	  make sure that it gets picked up by 'make dist' (particularly
 	  important for documentation or other files that are not code)
 
-- 
1.9.1


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

* [BlueZ v2 2/3] tools: fix misleading test output
  2015-04-05 18:39 ` [BlueZ 3/3] tools: add read adv features success tests Florian Grandel
  2015-04-05 19:11   ` [BlueZ v2 0/3] Minor improvements to the docs and mgmt API tests Florian Grandel
  2015-04-05 19:11   ` [BlueZ v2 1/3] doc: fix minor typos Florian Grandel
@ 2015-04-05 19:11   ` Florian Grandel
  2015-04-05 19:11   ` [BlueZ v2 3/3] tools: add read adv features success tests Florian Grandel
  3 siblings, 0 replies; 9+ messages in thread
From: Florian Grandel @ 2015-04-05 19:11 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Florian Grandel

The setup_add_advertising() function claimed to add an advertising
instance while unpowered although it actually adds the instance while
powered. This patch fixes several tester output instances accordingly.
---

Notes:
    v1 -> v2: found and corrected more instances of this problem

 tools/mgmt-tester.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index 6a9b527..72e9bd9 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
@@ -4894,7 +4894,7 @@ static void setup_add_advertising(const void *test_data)
 	unsigned char adv_param[sizeof(*cp) + 6];
 	unsigned char param[] = { 0x01 };
 
-	tester_print("Adding advertising instance while unpowered");
+	tester_print("Adding advertising instance while powered");
 
 	cp = (struct mgmt_cp_add_advertising *) adv_param;
 	memset(cp, 0, sizeof(*cp));
@@ -4929,7 +4929,7 @@ static void setup_add_advertising_connectable(const void *test_data)
 	unsigned char adv_param[sizeof(*cp) + 6];
 	unsigned char param[] = { 0x01 };
 
-	tester_print("Adding advertising instance while unpowered");
+	tester_print("Adding advertising instance while connectable");
 
 	cp = (struct mgmt_cp_add_advertising *) adv_param;
 	memset(cp, 0, sizeof(*cp));
@@ -4968,7 +4968,7 @@ static void setup_add_advertising_timeout(const void *test_data)
 	unsigned char adv_param[sizeof(*cp) + 6];
 	unsigned char param[] = { 0x01 };
 
-	tester_print("Adding advertising instance while unpowered");
+	tester_print("Adding advertising instance with timeout");
 
 	cp = (struct mgmt_cp_add_advertising *) adv_param;
 	memset(cp, 0, sizeof(*cp));
@@ -5004,7 +5004,7 @@ static void setup_set_and_add_advertising(const void *test_data)
 	unsigned char adv_param[sizeof(*cp) + 6];
 	unsigned char param[] = { 0x01 };
 
-	tester_print("Adding advertising instance while unpowered");
+	tester_print("Set and add advertising instance");
 
 	cp = (struct mgmt_cp_add_advertising *) adv_param;
 	memset(cp, 0, sizeof(*cp));
-- 
1.9.1


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

* [BlueZ v2 3/3] tools: add read adv features success tests
  2015-04-05 18:39 ` [BlueZ 3/3] tools: add read adv features success tests Florian Grandel
                     ` (2 preceding siblings ...)
  2015-04-05 19:11   ` [BlueZ v2 2/3] tools: fix misleading test output Florian Grandel
@ 2015-04-05 19:11   ` Florian Grandel
  3 siblings, 0 replies; 9+ messages in thread
From: Florian Grandel @ 2015-04-05 19:11 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Florian Grandel

The mgmt-tester did not yet contain tests for the success path of the
MGMT_OP_READ_ADV_FEATURES command. This patch adds two tests: one
calling the command without an advertising instance and one with one
advertising instance added.
---
 doc/test-coverage.txt |  2 +-
 tools/mgmt-tester.c   | 29 +++++++++++++++++++++++++++++
 2 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/doc/test-coverage.txt b/doc/test-coverage.txt
index fa8a04a..19bb73c 100644
--- a/doc/test-coverage.txt
+++ b/doc/test-coverage.txt
@@ -39,7 +39,7 @@ Automated end-to-end testing
 
 Application		Count	Description
 -------------------------------------------
-mgmt-tester		 293	Kernel management interface testing
+mgmt-tester		 295	Kernel management interface testing
 l2cap-tester		  27	Kernel L2CAP implementation testing
 rfcomm-tester		   9	Kernel RFCOMM implementation testing
 bnep-tester		   1	Kernel BNEP implementation testing
diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index 72e9bd9..c0f58ce 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
@@ -3862,6 +3862,28 @@ static const struct generic_data read_adv_features_invalid_index_test = {
 	.expect_status = MGMT_STATUS_INVALID_INDEX,
 };
 
+static const uint8_t read_adv_features_rsp_1[] =  {
+			0x1f, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x01, 0x00,
+};
+
+static const struct generic_data read_adv_features_success_1 = {
+	.send_opcode = MGMT_OP_READ_ADV_FEATURES,
+	.expect_param = read_adv_features_rsp_1,
+	.expect_len = sizeof(read_adv_features_rsp_1),
+	.expect_status = MGMT_STATUS_SUCCESS,
+};
+
+static const uint8_t read_adv_features_rsp_2[] =  {
+			0x1f, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x01, 0x01, 0x01
+};
+
+static const struct generic_data read_adv_features_success_2 = {
+	.send_opcode = MGMT_OP_READ_ADV_FEATURES,
+	.expect_param = read_adv_features_rsp_2,
+	.expect_len = sizeof(read_adv_features_rsp_2),
+	.expect_status = MGMT_STATUS_SUCCESS,
+};
+
 static const uint8_t add_advertising_param_1[] = {
 	0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00,
 	0x03, 0x02, 0x0d, 0x18,
@@ -6384,6 +6406,13 @@ int main(int argc, char *argv[])
 	test_bredrle("Read Advertising Features - Invalid index",
 				&read_adv_features_invalid_index_test,
 				NULL, test_command_generic);
+	test_bredrle("Read Advertising Features - Success 1 (No instance)",
+				&read_adv_features_success_1,
+				NULL, test_command_generic);
+	test_bredrle("Read Advertising Features - Success 2 (One instance)",
+				&read_adv_features_success_2,
+				setup_add_advertising,
+				test_command_generic);
 
 	test_bredrle("Add Advertising - Failure: LE off",
 					&add_advertising_fail_1,
-- 
1.9.1


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

* Re: [BlueZ v2 0/3] Minor improvements to the docs and mgmt API tests
  2015-04-05 19:11   ` [BlueZ v2 0/3] Minor improvements to the docs and mgmt API tests Florian Grandel
@ 2015-04-09  9:42     ` Johan Hedberg
  2015-04-09  9:49       ` Florian Grandel
  0 siblings, 1 reply; 9+ messages in thread
From: Johan Hedberg @ 2015-04-09  9:42 UTC (permalink / raw)
  To: Florian Grandel; +Cc: linux-bluetooth

Hi Florian,

On Sun, Apr 05, 2015, Florian Grandel wrote:
> v1 -> v2: found more instances of misleading test messages
> 
> Florian Grandel (3):
>   doc: fix minor typos
>   tools: fix misleading test output
>   tools: add read adv features success tests
> 
>  doc/coding-style.txt          |  2 +-
>  doc/maintainer-guidelines.txt |  2 +-
>  doc/test-coverage.txt         |  2 +-
>  tools/mgmt-tester.c           | 37 +++++++++++++++++++++++++++++++++----
>  4 files changed, 36 insertions(+), 7 deletions(-)

All three patches have been applied. Thanks.

One note: I had to manually remove the "Signed-off-by" from one patch
1/3 since we don't use that for the user space tree.

Johan

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

* Re: [BlueZ v2 0/3] Minor improvements to the docs and mgmt API tests
  2015-04-09  9:42     ` Johan Hedberg
@ 2015-04-09  9:49       ` Florian Grandel
  0 siblings, 0 replies; 9+ messages in thread
From: Florian Grandel @ 2015-04-09  9:49 UTC (permalink / raw)
  To: BlueZ development; +Cc: Johan Hedberg

> One note: I had to manually remove the "Signed-off-by" from one patch
> 1/3 since we don't use that for the user space tree.

Oups, sorry. And thanks for your review. :-)

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

end of thread, other threads:[~2015-04-09  9:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-05 18:39 [BlueZ 1/3] doc: fix minor typos Florian Grandel
2015-04-05 18:39 ` [BlueZ 2/3] tools: fix misleading test output Florian Grandel
2015-04-05 18:39 ` [BlueZ 3/3] tools: add read adv features success tests Florian Grandel
2015-04-05 19:11   ` [BlueZ v2 0/3] Minor improvements to the docs and mgmt API tests Florian Grandel
2015-04-09  9:42     ` Johan Hedberg
2015-04-09  9:49       ` Florian Grandel
2015-04-05 19:11   ` [BlueZ v2 1/3] doc: fix minor typos Florian Grandel
2015-04-05 19:11   ` [BlueZ v2 2/3] tools: fix misleading test output Florian Grandel
2015-04-05 19:11   ` [BlueZ v2 3/3] tools: add read adv features success tests Florian Grandel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.