* [PATCH BlueZ 1/2] unit/test-gatt: Add /TP/GAD/CL/BV-02-C-1-alternative
@ 2016-10-17 10:02 Łukasz Rymanowski
2016-10-17 10:02 ` [PATCH BlueZ 2/2] shared/gatt-helpers: Fix find by type response handling Łukasz Rymanowski
2016-10-18 10:59 ` [PATCH BlueZ 1/2] unit/test-gatt: Add /TP/GAD/CL/BV-02-C-1-alternative Luiz Augusto von Dentz
0 siblings, 2 replies; 3+ messages in thread
From: Łukasz Rymanowski @ 2016-10-17 10:02 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Łukasz Rymanowski
According to GATT.TS.4.2.1,
4.4.3 TP/GAD/CL/BV-02-C [Discover Primary Services by Service UUID – by Client]
Pass verdict is also when response has end_handle = 0xffff.
This patch add such test.
---
unit/test-gatt.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/unit/test-gatt.c b/unit/test-gatt.c
index 8129719..c7a8fa5 100644
--- a/unit/test-gatt.c
+++ b/unit/test-gatt.c
@@ -2414,6 +2414,14 @@ int main(int argc, char *argv[])
0x18),
raw_pdu(0x01, 0x06, 0x08, 0x00, 0x0a));
+ define_test_att("/TP/GAD/CL/BV-02-C-1-alternative",
+ test_search_primary, &uuid_16,
+ NULL,
+ MTU_EXCHANGE_CLIENT_PDUS,
+ raw_pdu(0x06, 0x01, 0x00, 0xff, 0xff, 0x00, 0x28, 0x00,
+ 0x18),
+ raw_pdu(0x07, 0x01, 0x00, 0xFF, 0xFF));
+
define_test_att("/TP/GAD/CL/BV-02-C-2", test_search_primary, &uuid_128,
NULL,
MTU_EXCHANGE_CLIENT_PDUS,
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH BlueZ 2/2] shared/gatt-helpers: Fix find by type response handling
2016-10-17 10:02 [PATCH BlueZ 1/2] unit/test-gatt: Add /TP/GAD/CL/BV-02-C-1-alternative Łukasz Rymanowski
@ 2016-10-17 10:02 ` Łukasz Rymanowski
2016-10-18 10:59 ` [PATCH BlueZ 1/2] unit/test-gatt: Add /TP/GAD/CL/BV-02-C-1-alternative Luiz Augusto von Dentz
1 sibling, 0 replies; 3+ messages in thread
From: Łukasz Rymanowski @ 2016-10-17 10:02 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Łukasz Rymanowski
Due to regression from
db24bf0 shared/gatt-helper: Consolidate error checking,
procedure Discover Primary Services by Service UUID, can succeed
only when last response is Error Response with ATTRIBUTE_NOT_FOUND
error code.
With this patch it also succeed when Find By Type response contains
service which is already in a required search range.
It is verified with unit test /TP/GAD/CL/BV-02-C-1-alternative
---
src/shared/gatt-helpers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/shared/gatt-helpers.c b/src/shared/gatt-helpers.c
index a0a5b26..6b39bb1 100644
--- a/src/shared/gatt-helpers.c
+++ b/src/shared/gatt-helpers.c
@@ -797,7 +797,7 @@ static void find_by_type_val_cb(uint8_t opcode, const void *pdu,
goto done;
}
- success = false;
+ success = true;
done:
discovery_op_complete(op, success, att_ecode);
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH BlueZ 1/2] unit/test-gatt: Add /TP/GAD/CL/BV-02-C-1-alternative
2016-10-17 10:02 [PATCH BlueZ 1/2] unit/test-gatt: Add /TP/GAD/CL/BV-02-C-1-alternative Łukasz Rymanowski
2016-10-17 10:02 ` [PATCH BlueZ 2/2] shared/gatt-helpers: Fix find by type response handling Łukasz Rymanowski
@ 2016-10-18 10:59 ` Luiz Augusto von Dentz
1 sibling, 0 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2016-10-18 10:59 UTC (permalink / raw)
To: Łukasz Rymanowski; +Cc: linux-bluetooth@vger.kernel.org
Hi Lukasz,
On Mon, Oct 17, 2016 at 1:02 PM, =C5=81ukasz Rymanowski
<lukasz.rymanowski@codecoup.pl> wrote:
> According to GATT.TS.4.2.1,
> 4.4.3 TP/GAD/CL/BV-02-C [Discover Primary Services by Service UUID =E2=80=
=93 by Client]
>
> Pass verdict is also when response has end_handle =3D 0xffff.
> This patch add such test.
> ---
> unit/test-gatt.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/unit/test-gatt.c b/unit/test-gatt.c
> index 8129719..c7a8fa5 100644
> --- a/unit/test-gatt.c
> +++ b/unit/test-gatt.c
> @@ -2414,6 +2414,14 @@ int main(int argc, char *argv[])
> 0x18),
> raw_pdu(0x01, 0x06, 0x08, 0x00, 0x0a));
>
> + define_test_att("/TP/GAD/CL/BV-02-C-1-alternative",
> + test_search_primary, &uuid_16,
> + NULL,
> + MTU_EXCHANGE_CLIENT_PDUS,
> + raw_pdu(0x06, 0x01, 0x00, 0xff, 0xff, 0x00, 0x28,=
0x00,
> + 0x18),
> + raw_pdu(0x07, 0x01, 0x00, 0xFF, 0xFF));
> +
> define_test_att("/TP/GAD/CL/BV-02-C-2", test_search_primary, &uui=
d_128,
> NULL,
> MTU_EXCHANGE_CLIENT_PDUS,
> --
> 2.7.4
Applied, thanks. I just change the order so it doesn't break bisect.
--=20
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-10-18 10:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-17 10:02 [PATCH BlueZ 1/2] unit/test-gatt: Add /TP/GAD/CL/BV-02-C-1-alternative Łukasz Rymanowski
2016-10-17 10:02 ` [PATCH BlueZ 2/2] shared/gatt-helpers: Fix find by type response handling Łukasz Rymanowski
2016-10-18 10:59 ` [PATCH BlueZ 1/2] unit/test-gatt: Add /TP/GAD/CL/BV-02-C-1-alternative Luiz Augusto von Dentz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).