All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] tools: Add tests for start discovery
@ 2013-04-02 23:34 Alvaro Silva
  2013-04-02 23:35 ` [PATCH 2/2] tools: Add tests for stop discovery Alvaro Silva
  2013-04-03  7:56 ` [PATCH 1/2] tools: Add tests for start discovery Johan Hedberg
  0 siblings, 2 replies; 3+ messages in thread
From: Alvaro Silva @ 2013-04-02 23:34 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Alvaro Silva

Add HCI command test and discovering event test for start discovery.
---
 tools/mgmt-tester.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index ac7c01a..3def64e 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
@@ -1066,6 +1066,8 @@ static const char start_discovery_invalid_param[] = { 0x00 };
 static const char start_discovery_bredr_param[] = { 0x01 };
 static const char start_discovery_le_param[] = { 0x06 };
 static const char start_discovery_bredrle_param[] = { 0x07 };
+static const char start_discovery_valid_hci[] = { 0x01, 0x01 };
+static const char start_discovery_evt[] = { 0x07, 0x01 };
 
 static const struct generic_data start_discovery_not_powered_test_1 = {
 	.send_opcode = MGMT_OP_START_DISCOVERY,
@@ -1095,6 +1097,12 @@ static const struct generic_data start_discovery_valid_param_test_1 = {
 	.expect_status = MGMT_STATUS_SUCCESS,
 	.expect_param = start_discovery_bredrle_param,
 	.expect_len = sizeof(start_discovery_bredr_param),
+	.expect_hci_command = BT_HCI_CMD_LE_SET_SCAN_ENABLE,
+	.expect_hci_param = start_discovery_valid_hci,
+	.expect_hci_len = sizeof(start_discovery_valid_hci),
+	.expect_alt_ev = MGMT_EV_DISCOVERING,
+	.expect_alt_ev_param = start_discovery_evt,
+	.expect_alt_ev_len = sizeof(start_discovery_evt),
 };
 
 static const char stop_discovery_bredrle_param[] = { 0x07 };
-- 
1.7.9.5


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

* [PATCH 2/2] tools:  Add tests for stop discovery
  2013-04-02 23:34 [PATCH 1/2] tools: Add tests for start discovery Alvaro Silva
@ 2013-04-02 23:35 ` Alvaro Silva
  2013-04-03  7:56 ` [PATCH 1/2] tools: Add tests for start discovery Johan Hedberg
  1 sibling, 0 replies; 3+ messages in thread
From: Alvaro Silva @ 2013-04-02 23:35 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Alvaro Silva

Add HCI test and discovering event test for stop discovery.
---
 tools/mgmt-tester.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index 3def64e..3f16e67 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
@@ -1107,6 +1107,8 @@ static const struct generic_data start_discovery_valid_param_test_1 = {
 
 static const char stop_discovery_bredrle_param[] = { 0x07 };
 static const char stop_discovery_bredrle_invalid_param[] = { 0x06 };
+static const char stop_discovery_valid_hci[] = { 0x00, 0x00 };
+static const char stop_discovery_evt[] = { 0x07, 0x00 };
 
 static const struct generic_data stop_discovery_success_test_1 = {
 	.send_opcode = MGMT_OP_STOP_DISCOVERY,
@@ -1115,6 +1117,12 @@ static const struct generic_data stop_discovery_success_test_1 = {
 	.expect_status = MGMT_STATUS_SUCCESS,
 	.expect_param = stop_discovery_bredrle_param,
 	.expect_len = sizeof(stop_discovery_bredrle_param),
+	.expect_hci_command = BT_HCI_CMD_LE_SET_SCAN_ENABLE,
+	.expect_hci_param = stop_discovery_valid_hci,
+	.expect_hci_len = sizeof(stop_discovery_valid_hci),
+	.expect_alt_ev = MGMT_EV_DISCOVERING,
+	.expect_alt_ev_param = stop_discovery_evt,
+	.expect_alt_ev_len = sizeof(stop_discovery_evt),
 };
 
 static const struct generic_data stop_discovery_rejected_test_1 = {
-- 
1.7.9.5


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

* Re: [PATCH 1/2] tools: Add tests for start discovery
  2013-04-02 23:34 [PATCH 1/2] tools: Add tests for start discovery Alvaro Silva
  2013-04-02 23:35 ` [PATCH 2/2] tools: Add tests for stop discovery Alvaro Silva
@ 2013-04-03  7:56 ` Johan Hedberg
  1 sibling, 0 replies; 3+ messages in thread
From: Johan Hedberg @ 2013-04-03  7:56 UTC (permalink / raw)
  To: Alvaro Silva; +Cc: linux-bluetooth

Hi Alvaro,

On Tue, Apr 02, 2013, Alvaro Silva wrote:
> Add HCI command test and discovering event test for start discovery.
> ---
>  tools/mgmt-tester.c |    8 ++++++++
>  1 file changed, 8 insertions(+)

Both patches in this set have been applied, however I tweaked the commit
messages to be less misleading since you're not really adding new test
cases but just refining existing ones.

Johan

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

end of thread, other threads:[~2013-04-03  7:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-02 23:34 [PATCH 1/2] tools: Add tests for start discovery Alvaro Silva
2013-04-02 23:35 ` [PATCH 2/2] tools: Add tests for stop discovery Alvaro Silva
2013-04-03  7:56 ` [PATCH 1/2] tools: Add tests for start discovery Johan Hedberg

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.