* [PATCH] Bluetooth: Enable LTK distribution to slave devices
From: johan.hedberg @ 2014-01-29 21:55 UTC (permalink / raw)
To: linux-bluetooth
From: Johan Hedberg <johan.hedberg@intel.com>
So far we've only been requesting the LTK to be distributed to the
master (initiator) of pairing, which is usually enough since it's the
master that will establish future connections and initiate encryption.
However, in the case that both devices support switching to the opposing
role (which seems to be increasingly common) pairing will have to
performed again since the "new" master will not have all information.
As there is no real harm in it, this patch updates the code to always
try distributing the LTK also to the slave device, thereby enabling role
switches for future connections.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
---
net/bluetooth/smp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index 45007362683b..9b1167007653 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -216,7 +216,7 @@ static void build_pairing_cmd(struct l2cap_conn *conn,
req->io_capability = conn->hcon->io_capability;
req->oob_flag = SMP_OOB_NOT_PRESENT;
req->max_key_size = SMP_MAX_ENC_KEY_SIZE;
- req->init_key_dist = 0;
+ req->init_key_dist = dist_keys;
req->resp_key_dist = dist_keys;
req->auth_req = (authreq & AUTH_REQ_MASK);
return;
@@ -225,7 +225,7 @@ static void build_pairing_cmd(struct l2cap_conn *conn,
rsp->io_capability = conn->hcon->io_capability;
rsp->oob_flag = SMP_OOB_NOT_PRESENT;
rsp->max_key_size = SMP_MAX_ENC_KEY_SIZE;
- rsp->init_key_dist = 0;
+ rsp->init_key_dist = req->init_key_dist & dist_keys;
rsp->resp_key_dist = req->resp_key_dist & dist_keys;
rsp->auth_req = (authreq & AUTH_REQ_MASK);
}
--
1.8.5.3
^ permalink raw reply related
* Re: [RFC BlueZ 0/2] Print bluetoothd messages in btmon
From: Vinicius Costa Gomes @ 2014-01-29 21:35 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: BlueZ development
In-Reply-To: <ACF337D1-0BF3-494E-959C-27B210C3E532@holtmann.org>
Hi Marcel,
On 22:42 Tue 28 Jan, Marcel Holtmann wrote:
> Hi Vinicius,
>
> > It is very common when debugging issues, specially users' problems to
> > ask for btmon logs and the accompaining bluetoothd logs. And depending
> > on the issue, it takes some time to relate the HCI/MGMT commands to
> > bluetoothd messages that help narrow down the problem.
> >
> > This is just a proof of concept, to know if this will be generally
> > helpful. And so, it needs some improvements: sending bluetoothd the USR2
> > signal so debug is enabled, color support and better formatting.
>
> so I am thinking to do this completely different.
>
> I think that the btsnoop 2.0 format should get a section for notes/comments/logs where we can store text information. So you can actually interline HCI traffic with human readable comments. For example Apple is doing that with their Packet Logger. Obvious this is only useful if everything is in a single file that can be easily shared.
>
> For this to work we need to read all the data from monitor interface of the kernel. Which means that the kernel also needs to have the debug/log output of bluetoothd. Meaning that bluetoothd would write the debug/logs into the kernel monitor interface and then they would be distributed to every btmon instance.
>
> As a result bluetoothd would only log warnings, error and info messages to syslog/journal and all debug information should go back to the kernel.
Sounds great.
>
> Initially I was thinking just adding writing support monitor channel, but that is silly since it will turn on promiscuous mode. Something that is causing a bit of overhead on a production system. So we rather not do that. Maybe it would be better to assign a new HCI channel for bluetoothd logging data.
>
> The one thing that is pretty obvious already is that we want to log per HCI index from bluetoothd. Which means we need to change the logging to be HCI controller aware. Without being HCI controller aware it is pretty much useless.
>
I liked this. And having the logs HCI aware even makes sense if the logs go the usual places (syslog/journal). So it is a nice intermediate stage.
> One interesting thing to think about is if we should tie enabling debug logs to the fact if btmon is running or not. And if we might allow btmon to configure the level of logs we want. It would be kinda cool if we can start btmon with -d ‘*audio*’ and then it magically gets all audio logs. Now it gets a bit funny with a kernel interface writing back into userspace to configure the logging level of a daemon.
This gets complicated when we have multiple btmon's running. Interesting nonetheless.
>
> I have been toying with the idea of having filters on btmon already and making the kernel just filter out packets so that userspace does not get woken up. I just never figured out the right API to do it.
>
> Regards
>
> Marcel
>
Cheers,
--
Vinicius
^ permalink raw reply
* Re: [PATCH] android/a2dp: Fix crash on remote disconnection
From: Luiz Augusto von Dentz @ 2014-01-29 18:38 UTC (permalink / raw)
To: Szymon Janc; +Cc: linux-bluetooth@vger.kernel.org
In-Reply-To: <1391010302-13231-1-git-send-email-szymon.janc@tieto.com>
Hi Szymon,
On Wed, Jan 29, 2014 at 7:45 AM, Szymon Janc <szymon.janc@tieto.com> wrote:
> Remove setups when a2dp device is removed. This fix following:
>
> Invalid read of size 4
> at 0x115E32: bt_stream_close (a2dp.c:1352)
> by 0x111DFB: ipc_handle_msg (ipc.c:95)
> by 0x11234B: audio_watch_cb (audio-ipc.c:67)
> by 0x48BD9C7: ??? (in /system/lib/libglib.so)
> Address 0x4a590f4 is 12 bytes inside a block of size 20 free'd
> at 0x4897E6C: free (in
> /system/lib/valgrind/vgpreload_memcheck-arm-linux.so)
> by 0x48C5E2B: g_free (in /system/lib/libglib.so)
>
> Invalid read of size 4
> at 0x113638: avdtp_close (avdtp.c:3201)
> by 0x115E39: bt_stream_close (a2dp.c:1352)
> by 0x111DFB: ipc_handle_msg (ipc.c:95)
> by 0x11234B: audio_watch_cb (audio-ipc.c:67)
> by 0x48BD9C7: ??? (in /system/lib/libglib.so)
> Address 0x4a594a4 is 28 bytes inside a block of size 1,100 free'd
> at 0x4897E6C: free (in
> /system/lib/valgrind/vgpreload_memcheck-arm-linux.so)
> by 0x48C5E2B: g_free (in /system/lib/libglib.so)
> ---
> android/a2dp.c | 49 +++++++++++++++++++++++++++++++++----------------
> 1 file changed, 33 insertions(+), 16 deletions(-)
>
> diff --git a/android/a2dp.c b/android/a2dp.c
> index 8d8fa7d..a215ce2 100644
> --- a/android/a2dp.c
> +++ b/android/a2dp.c
> @@ -122,6 +122,37 @@ static void unregister_endpoint(void *data)
> g_free(endpoint);
> }
>
> +static void setup_free(void *data)
> +{
> + struct a2dp_setup *setup = data;
> +
> + if (!g_slist_find(setup->endpoint->presets, setup->preset))
> + preset_free(setup->preset);
> +
> + g_free(setup);
> +}
> +
> +static void setup_remove(struct a2dp_setup *setup)
> +{
> + setups = g_slist_remove(setups, setup);
> + setup_free(setup);
> +}
> +
> +static void setup_remove_all_by_dev(struct a2dp_device *dev)
> +{
> + GSList *l = setups;
> +
> + while (l) {
> + struct a2dp_setup *setup = l->data;
> + GSList *next = g_slist_next(l);
> +
> + if (setup->dev == dev)
> + setup_remove(setup);
> +
> + l = next;
> + }
> +}
> +
> static void a2dp_device_free(void *data)
> {
> struct a2dp_device *dev = data;
> @@ -137,6 +168,8 @@ static void a2dp_device_free(void *data)
> g_io_channel_unref(dev->io);
> }
>
> + setup_remove_all_by_dev(dev);
> +
> devices = g_slist_remove(devices, dev);
> g_free(dev);
> }
> @@ -828,22 +861,6 @@ static struct a2dp_device *find_device_by_session(struct avdtp *session)
> return NULL;
> }
>
> -static void setup_free(void *data)
> -{
> - struct a2dp_setup *setup = data;
> -
> - if (!g_slist_find(setup->endpoint->presets, setup->preset))
> - preset_free(setup->preset);
> -
> - g_free(setup);
> -}
> -
> -static void setup_remove(struct a2dp_setup *setup)
> -{
> - setups = g_slist_remove(setups, setup);
> - setup_free(setup);
> -}
> -
> static struct a2dp_setup *find_setup(uint8_t id)
> {
> GSList *l;
> --
> 1.8.5.3
Pushed, thanks.
--
Luiz Augusto von Dentz
^ permalink raw reply
* Re: [PATCH BlueZ] audio/AVRCP: Fix sending invalid response to GetCapabilities
From: Luiz Augusto von Dentz @ 2014-01-29 17:07 UTC (permalink / raw)
To: linux-bluetooth@vger.kernel.org
In-Reply-To: <1390939534-15699-1-git-send-email-luiz.dentz@gmail.com>
Hi,
On Tue, Jan 28, 2014 at 12:05 PM, Luiz Augusto von Dentz
<luiz.dentz@gmail.com> wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> The attribute count has to be initialized with 0 since we reuse the same
> buffer for both command and responses it may be already be set causing
> invalid response to be generated.
> ---
> profiles/audio/avrcp.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
> index 59a966e..ad5dc34 100644
> --- a/profiles/audio/avrcp.c
> +++ b/profiles/audio/avrcp.c
> @@ -921,6 +921,7 @@ static uint8_t avrcp_handle_get_capabilities(struct avrcp *session,
>
> return AVC_CTYPE_STABLE;
> case CAP_EVENTS_SUPPORTED:
> + pdu->params[1] = 0;
> for (i = 1; i <= AVRCP_EVENT_LAST; i++) {
> if (session->supported_events & (1 << i)) {
> pdu->params[1]++;
> --
> 1.8.4.2
Applied.
--
Luiz Augusto von Dentz
^ permalink raw reply
* Re: [PATCHv2 0/8] Set of AVCTP fixes
From: Luiz Augusto von Dentz @ 2014-01-29 17:07 UTC (permalink / raw)
To: Andrei Emeltchenko; +Cc: linux-bluetooth@vger.kernel.org
In-Reply-To: <1390998967-24610-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
Hi Andrei,
On Wed, Jan 29, 2014 at 4:35 AM, Andrei Emeltchenko
<Andrei.Emeltchenko.news@gmail.com> wrote:
> From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
>
> AVCTP issues found during writing test cases.
>
> Changes:
> * v2: Added last 2 patches to series.
>
> Andrei Emeltchenko (8):
> android/avctp: Use predefined HEADER_LENGTH instead of sizeof
> android/avctp: Fix wrong error message
> avctp: Use already calculated avc header
> avctp: trivial: Do not break short line
> avctp: Use predefined HEADER_LENGTH instead of sizeof
> avctp: Fix wrong error message
> android/avctp: Move AVC_HEADER_LENGTH from avctp header
> avctp: Fix unchecked return value
>
> android/avctp.c | 16 +++++++------
> android/avctp.h | 1 -
> profiles/audio/avctp.c | 64 +++++++++++++++++++++++++++++++++++---------------
> 3 files changed, 54 insertions(+), 27 deletions(-)
>
> --
> 1.8.3.2
Patches 1-7 applied, patch 8 needs some investigation if we can reduce
that many ioctl in a row.
--
Luiz Augusto von Dentz
^ permalink raw reply
* Re: [PATCH 1/2] android/bluetooth: Add threashold to RSSI change
From: Anderson Lizardo @ 2014-01-29 16:12 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: Szymon Janc, BlueZ development
In-Reply-To: <755599B7-D32C-424C-B2B8-E0E8539C31EE@holtmann.org>
Hi Marcel,
On Tue, Jan 28, 2014 at 9:02 PM, Marcel Holtmann <marcel@holtmann.org> wrote:
>> And why not:
>>
>> int delta = abs(old - new);
>>
>> (unless there is no abs() in bionic)
>
> I remember that abs() needs -lm or something stupid.
>From my tests, it does not require any extra libraries other than
libc6 (at least in recent versions). It seems that at least for x86 it
is even optimized to a few machine instructions (as I could not find
the library call when using objdump on code that does
"abs(atoi(argv[1]))").
Best Regards,
--
Anderson Lizardo
http://www.indt.org/?lang=en
INdT - Manaus - Brazil
^ permalink raw reply
* [PATCH] android/a2dp: Fix crash on remote disconnection
From: Szymon Janc @ 2014-01-29 15:45 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Szymon Janc
Remove setups when a2dp device is removed. This fix following:
Invalid read of size 4
at 0x115E32: bt_stream_close (a2dp.c:1352)
by 0x111DFB: ipc_handle_msg (ipc.c:95)
by 0x11234B: audio_watch_cb (audio-ipc.c:67)
by 0x48BD9C7: ??? (in /system/lib/libglib.so)
Address 0x4a590f4 is 12 bytes inside a block of size 20 free'd
at 0x4897E6C: free (in
/system/lib/valgrind/vgpreload_memcheck-arm-linux.so)
by 0x48C5E2B: g_free (in /system/lib/libglib.so)
Invalid read of size 4
at 0x113638: avdtp_close (avdtp.c:3201)
by 0x115E39: bt_stream_close (a2dp.c:1352)
by 0x111DFB: ipc_handle_msg (ipc.c:95)
by 0x11234B: audio_watch_cb (audio-ipc.c:67)
by 0x48BD9C7: ??? (in /system/lib/libglib.so)
Address 0x4a594a4 is 28 bytes inside a block of size 1,100 free'd
at 0x4897E6C: free (in
/system/lib/valgrind/vgpreload_memcheck-arm-linux.so)
by 0x48C5E2B: g_free (in /system/lib/libglib.so)
---
android/a2dp.c | 49 +++++++++++++++++++++++++++++++++----------------
1 file changed, 33 insertions(+), 16 deletions(-)
diff --git a/android/a2dp.c b/android/a2dp.c
index 8d8fa7d..a215ce2 100644
--- a/android/a2dp.c
+++ b/android/a2dp.c
@@ -122,6 +122,37 @@ static void unregister_endpoint(void *data)
g_free(endpoint);
}
+static void setup_free(void *data)
+{
+ struct a2dp_setup *setup = data;
+
+ if (!g_slist_find(setup->endpoint->presets, setup->preset))
+ preset_free(setup->preset);
+
+ g_free(setup);
+}
+
+static void setup_remove(struct a2dp_setup *setup)
+{
+ setups = g_slist_remove(setups, setup);
+ setup_free(setup);
+}
+
+static void setup_remove_all_by_dev(struct a2dp_device *dev)
+{
+ GSList *l = setups;
+
+ while (l) {
+ struct a2dp_setup *setup = l->data;
+ GSList *next = g_slist_next(l);
+
+ if (setup->dev == dev)
+ setup_remove(setup);
+
+ l = next;
+ }
+}
+
static void a2dp_device_free(void *data)
{
struct a2dp_device *dev = data;
@@ -137,6 +168,8 @@ static void a2dp_device_free(void *data)
g_io_channel_unref(dev->io);
}
+ setup_remove_all_by_dev(dev);
+
devices = g_slist_remove(devices, dev);
g_free(dev);
}
@@ -828,22 +861,6 @@ static struct a2dp_device *find_device_by_session(struct avdtp *session)
return NULL;
}
-static void setup_free(void *data)
-{
- struct a2dp_setup *setup = data;
-
- if (!g_slist_find(setup->endpoint->presets, setup->preset))
- preset_free(setup->preset);
-
- g_free(setup);
-}
-
-static void setup_remove(struct a2dp_setup *setup)
-{
- setups = g_slist_remove(setups, setup);
- setup_free(setup);
-}
-
static struct a2dp_setup *find_setup(uint8_t id)
{
GSList *l;
--
1.8.5.3
^ permalink raw reply related
* [PATCH 2/2] android/pts: Add android version to PTS test
From: Sebastian Chlad @ 2014-01-29 13:27 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Sebastian Chlad
In-Reply-To: <1391002025-15997-1-git-send-email-sebastianx.chlad@intel.com>
---
android/pts-avctp.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/android/pts-avctp.txt b/android/pts-avctp.txt
index a57ecee..efd525e 100644
--- a/android/pts-avctp.txt
+++ b/android/pts-avctp.txt
@@ -2,6 +2,7 @@ PTS test results for AVCTP
PTS version: 5.0
Tested: 29.01.2014
+Android version: 4.4
Results:
PASS test passed
--
1.8.3.2
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
^ permalink raw reply related
* [PATCH 1/2] android/pts: PTS test results for AVCTP
From: Sebastian Chlad @ 2014-01-29 13:27 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Sebastian Chlad
---
android/pts-avctp.txt | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/android/pts-avctp.txt b/android/pts-avctp.txt
index c057a10..a57ecee 100644
--- a/android/pts-avctp.txt
+++ b/android/pts-avctp.txt
@@ -1,7 +1,7 @@
PTS test results for AVCTP
PTS version: 5.0
-Tested: --not yet tested--
+Tested: 29.01.2014
Results:
PASS test passed
@@ -29,13 +29,13 @@ TC_CT_FRA_BV_04_C N/A
-------------------------------------------------------------------------------
Test Name Result Notes
-------------------------------------------------------------------------------
-TC_TG_CCM_BV_01_C INC
-TC_TG_CCM_BV_02_C INC
-TC_TG_CCM_BV_03_C INC
-TC_TG_CCM_BV_04_C INC
-TC_TG_NFR_BV_02_C INC
-TC_TG_NFR_BV_03_C INC
-TC_TG_NFR_BI_01_C INC
-TC_TG_FRA_BV_02_C INC
+TC_TG_CCM_BV_01_C PASS avtest --device hci0 --avctp --send x <bdaddr>
+TC_TG_CCM_BV_02_C PASS avtest --device hci0 --avctp --send x <bdaddr>
+TC_TG_CCM_BV_03_C PASS avtest --device hci0 --avctp --send x <bdaddr>
+TC_TG_CCM_BV_04_C PASS avtest --device hci0 --avctp --send x <bdaddr>
+TC_TG_NFR_BV_02_C PASS avtest --device hci0 --avctp --send x <bdaddr>
+TC_TG_NFR_BV_03_C PASS avtest --device hci0 --avctp --send x <bdaddr>
+TC_TG_NFR_BI_01_C PASS
+TC_TG_FRA_BV_02_C FAIL
TC_TG_FRA_BV_03_C INC
-------------------------------------------------------------------------------
--
1.8.3.2
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
^ permalink raw reply related
* [PATCHv2 3/3] unit/avctp: Add TP/NFR/BI-01-C test
From: Andrei Emeltchenko @ 2014-01-29 12:41 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1390999274-15631-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
To verify that the IUT (TG) reports to the test system (CT) the
reception of a control message intended for an invalid PID (PID not
registered for reception of messages).
---
unit/test-avctp.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/unit/test-avctp.c b/unit/test-avctp.c
index 8c97a82..041e0c0 100644
--- a/unit/test-avctp.c
+++ b/unit/test-avctp.c
@@ -267,5 +267,9 @@ int main(int argc, char *argv[])
raw_pdu(0x00, 0x11, 0x0e, 0x00, 0x00, 0x00),
raw_pdu(0x02, 0x11, 0x0e, 0x0a, 0x00, 0x00));
+ define_test("/TP/NFR/BI-01-C", test_server,
+ raw_pdu(0x00, 0xff, 0xff, 0x00, 0x00, 0x00),
+ raw_pdu(0x03, 0xff, 0xff));
+
return g_test_run();
}
--
1.8.3.2
^ permalink raw reply related
* [PATCHv2 2/3] unit/avctp: Add TP/NFR/BV-02-C test
From: Andrei Emeltchenko @ 2014-01-29 12:41 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1390999274-15631-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
To verify that the IUT (TG) formats correctly the following fields of
the AVCTP response message: “transaction label”, "message type(R)", PID,
“packet type”, IPID and “message information”. Check that AVCTP send
response packet along with other information. Payload is out of scope of
this test (AVC_CTYPE_REJECTED is OK).
---
unit/test-avctp.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/unit/test-avctp.c b/unit/test-avctp.c
index 49bd640..8c97a82 100644
--- a/unit/test-avctp.c
+++ b/unit/test-avctp.c
@@ -244,6 +244,15 @@ static void test_client(gconstpointer data)
execute_context(context);
}
+static void test_server(gconstpointer data)
+{
+ struct context *context = create_context(0x0100, data);
+
+ g_idle_add(send_pdu, context);
+
+ execute_context(context);
+}
+
int main(int argc, char *argv[])
{
g_test_init(&argc, &argv, NULL);
@@ -254,5 +263,9 @@ int main(int argc, char *argv[])
define_test("/TP/NFR/BV-01-C", test_client,
raw_pdu(0x00, 0x11, 0x0e, 0x00, 0x00, 0x00));
+ define_test("/TP/NFR/BV-02-C", test_server,
+ raw_pdu(0x00, 0x11, 0x0e, 0x00, 0x00, 0x00),
+ raw_pdu(0x02, 0x11, 0x0e, 0x0a, 0x00, 0x00));
+
return g_test_run();
}
--
1.8.3.2
^ permalink raw reply related
* [PATCHv2 1/3] unit/avctp: Add AVCTP unit test skeleton and first test
From: Andrei Emeltchenko @ 2014-01-29 12:41 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1390999274-15631-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Adds test TP/NFR/BV-01-C. To verify that the IUT (CT) formats correctly
the following fields of the AVCTP command message: “transaction label”,
"message type(C)", PID, “packet type”, IPID and “message information”.
---
Makefile.am | 8 ++
unit/test-avctp.c | 258 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 266 insertions(+)
create mode 100644 unit/test-avctp.c
diff --git a/Makefile.am b/Makefile.am
index 3a1e6dc..1a44a9f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -273,6 +273,14 @@ unit_test_avdtp_SOURCES = unit/test-avdtp.c \
android/avdtp.c android/avdtp.h
unit_test_avdtp_LDADD = @GLIB_LIBS@
+unit_tests += unit/test-avctp
+
+unit_test_avctp_SOURCES = unit/test-avctp.c \
+ src/shared/util.h src/shared/util.c \
+ src/log.h src/log.c \
+ android/avctp.c android/avctp.h
+unit_test_avctp_LDADD = @GLIB_LIBS@
+
unit_tests += unit/test-gdbus-client
unit_test_gdbus_client_SOURCES = unit/test-gdbus-client.c
diff --git a/unit/test-avctp.c b/unit/test-avctp.c
new file mode 100644
index 0000000..49bd640
--- /dev/null
+++ b/unit/test-avctp.c
@@ -0,0 +1,258 @@
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2014 Intel Corporation. All rights reserved.
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <inttypes.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/socket.h>
+
+#include <glib.h>
+
+#include "src/shared/util.h"
+#include "src/log.h"
+
+#include "android/avctp.h"
+
+struct test_pdu {
+ bool valid;
+ bool fragmented;
+ const uint8_t *data;
+ size_t size;
+};
+
+struct test_data {
+ char *test_name;
+ struct test_pdu *pdu_list;
+};
+
+struct context {
+ GMainLoop *main_loop;
+ struct avctp *session;
+ guint source;
+ guint process;
+ int fd;
+ unsigned int pdu_offset;
+ const struct test_data *data;
+};
+
+#define data(args...) ((const unsigned char[]) { args })
+
+#define raw_pdu(args...) \
+ { \
+ .valid = true, \
+ .data = data(args), \
+ .size = sizeof(data(args)), \
+ }
+
+#define frg_pdu(args...) \
+ { \
+ .valid = true, \
+ .fragmented = true, \
+ .data = data(args), \
+ .size = sizeof(data(args)), \
+ }
+
+#define define_test(name, function, args...) \
+ do { \
+ const struct test_pdu pdus[] = { \
+ args, { } \
+ }; \
+ static struct test_data data; \
+ data.test_name = g_strdup(name); \
+ data.pdu_list = g_malloc(sizeof(pdus)); \
+ memcpy(data.pdu_list, pdus, sizeof(pdus)); \
+ g_test_add_data_func(name, &data, function); \
+ } while (0)
+
+static void test_debug(const char *str, void *user_data)
+{
+ const char *prefix = user_data;
+
+ g_print("%s%s\n", prefix, str);
+}
+
+static void test_free(gconstpointer user_data)
+{
+ const struct test_data *data = user_data;
+
+ g_free(data->test_name);
+ g_free(data->pdu_list);
+}
+
+static gboolean context_quit(gpointer user_data)
+{
+ struct context *context = user_data;
+
+ if (context->process > 0)
+ g_source_remove(context->process);
+
+ g_main_loop_quit(context->main_loop);
+
+ return FALSE;
+}
+
+static gboolean send_pdu(gpointer user_data)
+{
+ struct context *context = user_data;
+ const struct test_pdu *pdu;
+ ssize_t len;
+
+ pdu = &context->data->pdu_list[context->pdu_offset++];
+
+ len = write(context->fd, pdu->data, pdu->size);
+
+ if (g_test_verbose())
+ util_hexdump('<', pdu->data, len, test_debug, "AVCTP: ");
+
+ g_assert_cmpint(len, ==, pdu->size);
+
+ if (pdu->fragmented)
+ return send_pdu(user_data);
+
+ context->process = 0;
+ return FALSE;
+}
+
+static void context_process(struct context *context)
+{
+ if (!context->data->pdu_list[context->pdu_offset].valid) {
+ context_quit(context);
+ return;
+ }
+
+ context->process = g_idle_add(send_pdu, context);
+}
+
+static gboolean test_handler(GIOChannel *channel, GIOCondition cond,
+ gpointer user_data)
+{
+ struct context *context = user_data;
+ const struct test_pdu *pdu;
+ unsigned char buf[512];
+ ssize_t len;
+ int fd;
+
+ pdu = &context->data->pdu_list[context->pdu_offset++];
+
+ if (cond & (G_IO_NVAL | G_IO_ERR | G_IO_HUP)) {
+ context->source = 0;
+ g_print("%s: cond %x\n", __func__, cond);
+ return FALSE;
+ }
+
+ fd = g_io_channel_unix_get_fd(channel);
+
+ len = read(fd, buf, sizeof(buf));
+
+ g_assert(len > 0);
+
+ if (g_test_verbose())
+ util_hexdump('>', buf, len, test_debug, "AVCTP: ");
+
+ g_assert_cmpint(len, ==, pdu->size);
+
+ g_assert(memcmp(buf, pdu->data, pdu->size) == 0);
+
+ if (!pdu->fragmented)
+ context_process(context);
+
+ return TRUE;
+}
+
+static struct context *create_context(uint16_t version, gconstpointer data)
+{
+ struct context *context = g_new0(struct context, 1);
+ GIOChannel *channel;
+ int err, sv[2];
+
+ context->main_loop = g_main_loop_new(NULL, FALSE);
+ g_assert(context->main_loop);
+
+ err = socketpair(AF_UNIX, SOCK_SEQPACKET | SOCK_CLOEXEC, 0, sv);
+ g_assert(err == 0);
+
+ context->session = avctp_new(sv[0], 672, 672, version);
+ g_assert(context->session != NULL);
+
+ channel = g_io_channel_unix_new(sv[1]);
+
+ g_io_channel_set_close_on_unref(channel, TRUE);
+ g_io_channel_set_encoding(channel, NULL, NULL);
+ g_io_channel_set_buffered(channel, FALSE);
+
+ context->source = g_io_add_watch(channel,
+ G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_NVAL,
+ test_handler, context);
+ g_assert(context->source > 0);
+
+ g_io_channel_unref(channel);
+
+ context->fd = sv[1];
+ context->data = data;
+
+ return context;
+}
+
+static void execute_context(struct context *context)
+{
+ g_main_loop_run(context->main_loop);
+
+ if (context->source > 0)
+ g_source_remove(context->source);
+
+ avctp_shutdown(context->session);
+
+ g_main_loop_unref(context->main_loop);
+
+ test_free(context->data);
+ g_free(context);
+}
+
+static void test_client(gconstpointer data)
+{
+ struct context *context = create_context(0x0100, data);
+
+ avctp_send_vendordep_req(context->session, 0, 0, NULL, 0, NULL, NULL);
+
+ execute_context(context);
+}
+
+int main(int argc, char *argv[])
+{
+ g_test_init(&argc, &argv, NULL);
+
+ if (g_test_verbose())
+ __btd_log_init("*", 0);
+
+ define_test("/TP/NFR/BV-01-C", test_client,
+ raw_pdu(0x00, 0x11, 0x0e, 0x00, 0x00, 0x00));
+
+ return g_test_run();
+}
--
1.8.3.2
^ permalink raw reply related
* [PATCHv2 0/3] AVCTP test cases
From: Andrei Emeltchenko @ 2014-01-29 12:41 UTC (permalink / raw)
To: linux-bluetooth
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Set of test cases which are feasible to implement with socketpair.
Fragmentation of AVCTP is not supported yet.
Andrei Emeltchenko (3):
unit/avctp: Add AVCTP unit test skeleton and first test
unit/avctp: Add TP/NFR/BV-02-C test
unit/avctp: Add TP/NFR/BI-01-C test
Makefile.am | 8 ++
unit/test-avctp.c | 275 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 283 insertions(+)
create mode 100644 unit/test-avctp.c
--
1.8.3.2
^ permalink raw reply
* [PATCH] android: Add avtest to debug builds
From: Sebastian Chlad @ 2014-01-29 12:40 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Sebastian Chlad
---
android/Android.mk | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/android/Android.mk b/android/Android.mk
index 1d12da5..238bb7c 100644
--- a/android/Android.mk
+++ b/android/Android.mk
@@ -354,6 +354,34 @@ LOCAL_MODULE := l2ping
include $(BUILD_EXECUTABLE)
#
+# avtest
+#
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := \
+ bluez/tools/avtest.c \
+ bluez/lib/bluetooth.c \
+ bluez/lib/hci.c \
+
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH)/bluez/lib \
+
+lib_headers := \
+ bluetooth.h \
+ hci.h \
+
+$(foreach file,$(lib_headers), $(shell ln -sf ../$(file) $(LOCAL_PATH)/bluez/lib/bluetooth/$(file)))
+
+LOCAL_CFLAGS := $(BLUEZ_COMMON_CFLAGS)
+
+LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
+LOCAL_MODULE_TAGS := debug
+LOCAL_MODULE := avtest
+
+include $(BUILD_EXECUTABLE)
+
+#
# libsbc
#
--
1.8.3.2
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
^ permalink raw reply related
* [PATCHv2 8/8] avctp: Fix unchecked return value
From: Andrei Emeltchenko @ 2014-01-29 12:36 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1390998967-24610-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Refactor code so that ioctl() return value is checked.
---
profiles/audio/avctp.c | 47 +++++++++++++++++++++++++++++++++++++----------
1 file changed, 37 insertions(+), 10 deletions(-)
diff --git a/profiles/audio/avctp.c b/profiles/audio/avctp.c
index 9f87859..a77aa9d 100644
--- a/profiles/audio/avctp.c
+++ b/profiles/audio/avctp.c
@@ -1026,27 +1026,54 @@ static int uinput_create(char *name)
err = -errno;
error("Can't write device information: %s (%d)",
strerror(-err), -err);
- close(fd);
- return err;
+ goto fail;
+ }
+
+ if (ioctl(fd, UI_SET_EVBIT, EV_KEY) < 0) {
+ err = -errno;
+ error("ioctl UI_SET_EVBIT: %s (%d)", strerror(-err), -err);
+ goto fail;
}
- ioctl(fd, UI_SET_EVBIT, EV_KEY);
- ioctl(fd, UI_SET_EVBIT, EV_REL);
- ioctl(fd, UI_SET_EVBIT, EV_REP);
- ioctl(fd, UI_SET_EVBIT, EV_SYN);
+ if (ioctl(fd, UI_SET_EVBIT, EV_REL) < 0) {
+ err = -errno;
+ error("ioctl UI_SET_EVBIT: %s (%d)", strerror(-err), -err);
+ goto fail;
+ }
- for (i = 0; key_map[i].name != NULL; i++)
- ioctl(fd, UI_SET_KEYBIT, key_map[i].uinput);
+ if (ioctl(fd, UI_SET_EVBIT, EV_REP) < 0) {
+ err = -errno;
+ error("ioctl UI_SET_EVBIT: %s (%d)", strerror(-err), -err);
+ goto fail;
+ }
+
+ if (ioctl(fd, UI_SET_EVBIT, EV_SYN) < 0) {
+ err = -errno;
+ error("ioctl UI_SET_EVBIT: %s (%d)", strerror(-err), -err);
+ goto fail;
+ }
+
+ for (i = 0; key_map[i].name != NULL; i++) {
+ if (ioctl(fd, UI_SET_KEYBIT, key_map[i].uinput) < 0) {
+ err = -errno;
+ error("ioctl UI_SET_KEYBIT: %s (%d)", strerror(-err),
+ -err);
+ goto fail;
+ }
+ }
if (ioctl(fd, UI_DEV_CREATE, NULL) < 0) {
err = -errno;
error("Can't create uinput device: %s (%d)",
strerror(-err), -err);
- close(fd);
- return err;
+ goto fail;
}
return fd;
+
+fail:
+ close(fd);
+ return err;
}
static void init_uinput(struct avctp *session)
--
1.8.3.2
^ permalink raw reply related
* [PATCHv2 7/8] android/avctp: Move AVC_HEADER_LENGTH from avctp header
From: Andrei Emeltchenko @ 2014-01-29 12:36 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1390998967-24610-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
There is currently inconsistence in the avctp code with
AVC_HEADER_LENGTH defined in avctp.h but AVCTP_HEADER_LENGTH defined in
avctp.c. Move definition to place it is actually used in consistent way.
---
android/avctp.c | 2 ++
android/avctp.h | 1 -
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/android/avctp.c b/android/avctp.c
index d308ec1..8f35403 100644
--- a/android/avctp.c
+++ b/android/avctp.c
@@ -84,6 +84,7 @@ struct avc_header {
uint8_t subunit_type:5;
uint8_t opcode;
} __attribute__ ((packed));
+#define AVC_HEADER_LENGTH 3
#elif __BYTE_ORDER == __BIG_ENDIAN
@@ -103,6 +104,7 @@ struct avc_header {
uint8_t subunit_id:3;
uint8_t opcode;
} __attribute__ ((packed));
+#define AVC_HEADER_LENGTH 3
#else
#error "Unknown byte order"
diff --git a/android/avctp.h b/android/avctp.h
index a22bf13..e7e0277 100644
--- a/android/avctp.h
+++ b/android/avctp.h
@@ -26,7 +26,6 @@
#define AVCTP_BROWSING_PSM 27
#define AVC_MTU 512
-#define AVC_HEADER_LENGTH 3
/* ctype entries */
#define AVC_CTYPE_CONTROL 0x0
--
1.8.3.2
^ permalink raw reply related
* [PATCHv2 6/8] avctp: Fix wrong error message
From: Andrei Emeltchenko @ 2014-01-29 12:36 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1390998967-24610-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
---
profiles/audio/avctp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/profiles/audio/avctp.c b/profiles/audio/avctp.c
index 0a1a457..9f87859 100644
--- a/profiles/audio/avctp.c
+++ b/profiles/audio/avctp.c
@@ -933,7 +933,7 @@ static gboolean session_cb(GIOChannel *chan, GIOCondition cond, gpointer data)
ret -= AVCTP_HEADER_LENGTH;
if (ret < AVC_HEADER_LENGTH) {
- error("Too small AVCTP packet");
+ error("Too small AVC packet");
goto failed;
}
--
1.8.3.2
^ permalink raw reply related
* [PATCHv2 5/8] avctp: Use predefined HEADER_LENGTH instead of sizeof
From: Andrei Emeltchenko @ 2014-01-29 12:36 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1390998967-24610-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Make code consistent with using HEADER_LENGTH already defined and used
instead of sizeof(). Remove also ugly type conversion.
---
profiles/audio/avctp.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/profiles/audio/avctp.c b/profiles/audio/avctp.c
index 570d609..0a1a457 100644
--- a/profiles/audio/avctp.c
+++ b/profiles/audio/avctp.c
@@ -924,24 +924,24 @@ static gboolean session_cb(GIOChannel *chan, GIOCondition cond, gpointer data)
if (ret <= 0)
goto failed;
- if ((unsigned int) ret < sizeof(struct avctp_header)) {
+ if (ret < AVCTP_HEADER_LENGTH) {
error("Too small AVCTP packet");
goto failed;
}
avctp = (struct avctp_header *) buf;
- ret -= sizeof(struct avctp_header);
- if ((unsigned int) ret < sizeof(struct avc_header)) {
+ ret -= AVCTP_HEADER_LENGTH;
+ if (ret < AVC_HEADER_LENGTH) {
error("Too small AVCTP packet");
goto failed;
}
- avc = (struct avc_header *) (buf + sizeof(struct avctp_header));
+ avc = (struct avc_header *) (buf + AVCTP_HEADER_LENGTH);
- ret -= sizeof(struct avc_header);
+ ret -= AVC_HEADER_LENGTH;
- operands = (uint8_t *) avc + sizeof(struct avc_header);
+ operands = (uint8_t *) avc + AVC_HEADER_LENGTH;
operand_count = ret;
if (avctp->cr == AVCTP_RESPONSE) {
--
1.8.3.2
^ permalink raw reply related
* [PATCHv2 4/8] avctp: trivial: Do not break short line
From: Andrei Emeltchenko @ 2014-01-29 12:36 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1390998967-24610-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
---
profiles/audio/avctp.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/profiles/audio/avctp.c b/profiles/audio/avctp.c
index 78bf1fd..570d609 100644
--- a/profiles/audio/avctp.c
+++ b/profiles/audio/avctp.c
@@ -904,8 +904,7 @@ failed:
return FALSE;
}
-static gboolean session_cb(GIOChannel *chan, GIOCondition cond,
- gpointer data)
+static gboolean session_cb(GIOChannel *chan, GIOCondition cond, gpointer data)
{
struct avctp *session = data;
struct avctp_channel *control = session->control;
--
1.8.3.2
^ permalink raw reply related
* [PATCHv2 3/8] avctp: Use already calculated avc header
From: Andrei Emeltchenko @ 2014-01-29 12:36 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1390998967-24610-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This removes long (81 characters) line as a side effect.
---
profiles/audio/avctp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/profiles/audio/avctp.c b/profiles/audio/avctp.c
index 6fd1454..78bf1fd 100644
--- a/profiles/audio/avctp.c
+++ b/profiles/audio/avctp.c
@@ -942,7 +942,7 @@ static gboolean session_cb(GIOChannel *chan, GIOCondition cond,
ret -= sizeof(struct avc_header);
- operands = buf + sizeof(struct avctp_header) + sizeof(struct avc_header);
+ operands = (uint8_t *) avc + sizeof(struct avc_header);
operand_count = ret;
if (avctp->cr == AVCTP_RESPONSE) {
--
1.8.3.2
^ permalink raw reply related
* [PATCHv2 2/8] android/avctp: Fix wrong error message
From: Andrei Emeltchenko @ 2014-01-29 12:36 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1390998967-24610-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
---
android/avctp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/android/avctp.c b/android/avctp.c
index 4ebf2ff..d308ec1 100644
--- a/android/avctp.c
+++ b/android/avctp.c
@@ -827,7 +827,7 @@ static gboolean session_cb(GIOChannel *chan, GIOCondition cond, gpointer data)
ret -= AVCTP_HEADER_LENGTH;
if (ret < AVC_HEADER_LENGTH) {
- error("Too small AVCTP packet");
+ error("Too small AVC packet");
goto failed;
}
--
1.8.3.2
^ permalink raw reply related
* [PATCHv2 1/8] android/avctp: Use predefined HEADER_LENGTH instead of sizeof
From: Andrei Emeltchenko @ 2014-01-29 12:36 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1390998967-24610-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Make code consistent with using HEADER_LENGTH defined. Remove also type
conversion.
---
android/avctp.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/android/avctp.c b/android/avctp.c
index 6f9b33b..4ebf2ff 100644
--- a/android/avctp.c
+++ b/android/avctp.c
@@ -818,24 +818,24 @@ static gboolean session_cb(GIOChannel *chan, GIOCondition cond, gpointer data)
if (ret <= 0)
goto failed;
- if ((unsigned int) ret < sizeof(struct avctp_header)) {
+ if (ret < AVCTP_HEADER_LENGTH) {
error("Too small AVCTP packet");
goto failed;
}
avctp = (struct avctp_header *) buf;
- ret -= sizeof(struct avctp_header);
- if ((unsigned int) ret < sizeof(struct avc_header)) {
+ ret -= AVCTP_HEADER_LENGTH;
+ if (ret < AVC_HEADER_LENGTH) {
error("Too small AVCTP packet");
goto failed;
}
- avc = (struct avc_header *) (buf + sizeof(struct avctp_header));
+ avc = (struct avc_header *) (buf + AVCTP_HEADER_LENGTH);
- ret -= sizeof(struct avc_header);
+ ret -= AVC_HEADER_LENGTH;
- operands = (uint8_t *) avc + sizeof(struct avc_header);
+ operands = (uint8_t *) avc + AVC_HEADER_LENGTH;
operand_count = ret;
if (avctp->cr == AVCTP_RESPONSE) {
--
1.8.3.2
^ permalink raw reply related
* [PATCHv2 0/8] Set of AVCTP fixes
From: Andrei Emeltchenko @ 2014-01-29 12:35 UTC (permalink / raw)
To: linux-bluetooth
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
AVCTP issues found during writing test cases.
Changes:
* v2: Added last 2 patches to series.
Andrei Emeltchenko (8):
android/avctp: Use predefined HEADER_LENGTH instead of sizeof
android/avctp: Fix wrong error message
avctp: Use already calculated avc header
avctp: trivial: Do not break short line
avctp: Use predefined HEADER_LENGTH instead of sizeof
avctp: Fix wrong error message
android/avctp: Move AVC_HEADER_LENGTH from avctp header
avctp: Fix unchecked return value
android/avctp.c | 16 +++++++------
android/avctp.h | 1 -
profiles/audio/avctp.c | 64 +++++++++++++++++++++++++++++++++++---------------
3 files changed, 54 insertions(+), 27 deletions(-)
--
1.8.3.2
^ permalink raw reply
* [PATCH] android/pts: Add android version to PTS test
From: Sebastian Chlad @ 2014-01-29 11:15 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Sebastian Chlad
Trivial patch helping tracking pts tests results' status
---
android/pts-a2dp.txt | 1 +
android/pts-avrcp.txt | 1 +
android/pts-did.txt | 1 +
android/pts-gap.txt | 1 +
android/pts-hid.txt | 1 +
android/pts-l2cap.txt | 1 +
android/pts-opp.txt | 1 +
android/pts-pbap.txt | 1 +
8 files changed, 8 insertions(+)
diff --git a/android/pts-a2dp.txt b/android/pts-a2dp.txt
index 67f9183..22fe166 100644
--- a/android/pts-a2dp.txt
+++ b/android/pts-a2dp.txt
@@ -2,6 +2,7 @@ PTS test results for A2DP
PTS version: 5.0
Tested: 28.01.2014
+Android version: 4.4
Results:
PASS test passed
diff --git a/android/pts-avrcp.txt b/android/pts-avrcp.txt
index 6ad97f7..934197b 100644
--- a/android/pts-avrcp.txt
+++ b/android/pts-avrcp.txt
@@ -2,6 +2,7 @@ PTS test results for AVRCP
PTS version: 5.0
Tested: 28.01.2014
+Android version: 4.4
Results:
PASS test passed
diff --git a/android/pts-did.txt b/android/pts-did.txt
index d764f09..5c03974 100644
--- a/android/pts-did.txt
+++ b/android/pts-did.txt
@@ -2,6 +2,7 @@ PTS test results for DID
PTS version: 5.0
Tested: 28.01.2014
+Android version: 4.4
Results:
PASS test passed
diff --git a/android/pts-gap.txt b/android/pts-gap.txt
index 1c0feec..b424543 100644
--- a/android/pts-gap.txt
+++ b/android/pts-gap.txt
@@ -2,6 +2,7 @@ PTS test results for GAP
PTS version: 5.0
Tested: 28.01.2014
+Android version: 4.4
Results:
PASS test passed
diff --git a/android/pts-hid.txt b/android/pts-hid.txt
index 5208d92..9d135e2 100644
--- a/android/pts-hid.txt
+++ b/android/pts-hid.txt
@@ -2,6 +2,7 @@ PTS test results for DID
PTS version: 5.0
Tested: 28.01.2014
+Android version: 4.4
Results:
PASS test passed
diff --git a/android/pts-l2cap.txt b/android/pts-l2cap.txt
index 3e46309..b0a195f 100644
--- a/android/pts-l2cap.txt
+++ b/android/pts-l2cap.txt
@@ -2,6 +2,7 @@ PTS test results for L2CAP
PTS version: 5.0
Tested: 29.01.2014
+Android version: 4.4
Results:
PASS test passed
diff --git a/android/pts-opp.txt b/android/pts-opp.txt
index 3c4ab47..9222288 100644
--- a/android/pts-opp.txt
+++ b/android/pts-opp.txt
@@ -2,6 +2,7 @@ PTS test results for OPP
PTS version: 5.0
Tested: 28.01.2014
+Android version: 4.4
Results:
PASS test passed
diff --git a/android/pts-pbap.txt b/android/pts-pbap.txt
index 4312921..c74370a 100644
--- a/android/pts-pbap.txt
+++ b/android/pts-pbap.txt
@@ -2,6 +2,7 @@ PTS test results for PBAP
PTS version: 5.0
Tested: 28.01.2014
+Android version: 4.4
Results:
PASS test passed
--
1.8.3.2
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
^ permalink raw reply related
* [PATCH] android/pts: PTS test results for L2CAP
From: Sebastian Chlad @ 2014-01-29 10:33 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Sebastian Chlad
---
android/pts-l2cap.txt | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/android/pts-l2cap.txt b/android/pts-l2cap.txt
index 51eedf5..3e46309 100644
--- a/android/pts-l2cap.txt
+++ b/android/pts-l2cap.txt
@@ -1,7 +1,7 @@
PTS test results for L2CAP
PTS version: 5.0
-Tested: 10.01.2014
+Tested: 29.01.2014
Results:
PASS test passed
@@ -87,16 +87,18 @@ TC_ERM_BV_06_C PASS
TC_ERM_BV_07_C PASS l2test -X ertm -P 33 &
TC_ERM_BV_08_C PASS
TC_ERM_BV_09_C PASS l2test -X ertm -P 33 &
-TC_ERM_BV_10_C INC
-TC_ERM_BV_11_C INC
-TC_ERM_BV_12_C INC
+TC_ERM_BV_10_C PASS l2test -x -X ertm -P 33 -D 35000 -Q 1 -R -N 1 &
+ btmgmt disconnect
+TC_ERM_BV_11_C PASS l2test -x -X ertm -P 33 -D 35000 -Q 1 -R -N 1 &
+ btmgmt disconnect
+TC_ERM_BV_12_C PASS l2test -x -X ertm -P 33 -R -N 1
TC_ERM_BV_13_C PASS
TC_ERM_BV_14_C PASS
TC_ERM_BV_15_C PASS
TC_ERM_BV_16_C PASS
TC_ERM_BV_17_C PASS
-TC_ERM_BV_18_C INC
-TC_ERM_BV_19_C INC
+TC_ERM_BV_18_C PASS l2test -x -X ertm -P 33 -R -N 1
+TC_ERM_BV_19_C PASS l2test -x -X ertm -P 33 -R -N 1
TC_ERM_BV_20_C PASS
TC_ERM_BV_21_C PASS
TC_ERM_BV_22_C PASS
@@ -106,9 +108,9 @@ TC_ERM_BI_02_C PASS
TC_ERM_BI_03_C PASS
TC_ERM_BI_04_C PASS
TC_ERM_BI_05_C PASS
-TC_STM_BV_01_C INC
-TC_STM_BV_02_C INC
-TC_STM_BV_03_C INC
+TC_STM_BV_01_C PASS l2test -x -X ertm -P 33 -R -N 1 -Y 3 &
+TC_STM_BV_02_C PASS l2test -x -X ertm -P 33 -R -N 1 -Y 3 &
+TC_STM_BV_03_C PASS l2test -x -X ertm -P 33 -R -N 1 -Y 3 &
TC_STM_BV_11_C N/A
TC_STM_BV_12_C N/A
TC_STM_BV_13_C N/A
--
1.8.3.2
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox