2015-03-13 06:34:39

by Gowtham Anandha Babu

[permalink] [raw]
Subject: [PATCH 0/7] Add Write Long value server TC

Adds the below server test cases (tested against small and large DB):
1) Write Long Characteristic Value - to Server
2) Write Long Characteristic Value – Invalid Handle Response
3) Write Long Characteristic Value – Write Not Permitted Response
4) Write Long Characteristic Descriptors – from Server
5) Write Long Characteristic Descriptor – Invalid Handle
6) Write Long Characteristic Descriptor – Write Not Permitted

Tested using valgrind also, no regression/core dump found.

Bharat Panda (3):
unit/test-gatt: Add TP/GAW/SR/BV-05-C test
unit/test-gatt: Add TP/GAW/SR/BI-07-C test
unit/test-gatt: Add TP/GAW/SR/BI-08-C test

Gowtham Anandha Babu (4):
unit/test-gatt: Add TP/GAW/SR/BV-09-C test
unit/test-gatt: Add TP/GAW/SR/BI-25-C test
unit/test-gatt: Add TP/GAW/SR/BI-26-C test
doc/test-coverage: Update test-gatt count

doc/test-coverage.txt | 4 +-
unit/test-gatt.c | 120 ++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 122 insertions(+), 2 deletions(-)

--
1.9.1



2015-03-13 13:01:53

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: [PATCH 0/7] Add Write Long value server TC

Hi Gowtham,

On Fri, Mar 13, 2015 at 8:34 AM, Gowtham Anandha Babu
<[email protected]> wrote:
> Adds the below server test cases (tested against small and large DB):
> 1) Write Long Characteristic Value - to Server
> 2) Write Long Characteristic Value – Invalid Handle Response
> 3) Write Long Characteristic Value – Write Not Permitted Response
> 4) Write Long Characteristic Descriptors – from Server
> 5) Write Long Characteristic Descriptor – Invalid Handle
> 6) Write Long Characteristic Descriptor – Write Not Permitted
>
> Tested using valgrind also, no regression/core dump found.
>
> Bharat Panda (3):
> unit/test-gatt: Add TP/GAW/SR/BV-05-C test
> unit/test-gatt: Add TP/GAW/SR/BI-07-C test
> unit/test-gatt: Add TP/GAW/SR/BI-08-C test
>
> Gowtham Anandha Babu (4):
> unit/test-gatt: Add TP/GAW/SR/BV-09-C test
> unit/test-gatt: Add TP/GAW/SR/BI-25-C test
> unit/test-gatt: Add TP/GAW/SR/BI-26-C test
> doc/test-coverage: Update test-gatt count
>
> doc/test-coverage.txt | 4 +-
> unit/test-gatt.c | 120 ++++++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 122 insertions(+), 2 deletions(-)
>
> --
> 1.9.1

Pushed, thanks.


--
Luiz Augusto von Dentz

2015-03-13 06:34:46

by Gowtham Anandha Babu

[permalink] [raw]
Subject: [PATCH 7/7] doc/test-coverage: Update test-gatt count

---
doc/test-coverage.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/test-coverage.txt b/doc/test-coverage.txt
index 511e1e6..48fd9ed 100644
--- a/doc/test-coverage.txt
+++ b/doc/test-coverage.txt
@@ -29,9 +29,9 @@ test-gobex-header 28 OBEX header handling
test-gobex-apparam 18 OBEX apparam handling
test-gobex-transfer 36 OBEX transfer handling
test-gdbus-client 13 D-Bus client handling
-test-gatt 131 GATT qualification test cases
+test-gatt 149 GATT qualification test cases
-----
- 706
+ 724


Automated end-to-end testing
--
1.9.1


2015-03-13 06:34:42

by Gowtham Anandha Babu

[permalink] [raw]
Subject: [PATCH 3/7] unit/test-gatt: Add TP/GAW/SR/BI-08-C test

From: Bharat Panda <[email protected]>

Verify that a Generic Attribute Profile server can detect and reject
a Write Long Characteristic Value Request to a non-writeable long
Characteristic Value and issue a Write Not Permitted Response.
---
unit/test-gatt.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)

diff --git a/unit/test-gatt.c b/unit/test-gatt.c
index 5e79293..22bfe44 100644
--- a/unit/test-gatt.c
+++ b/unit/test-gatt.c
@@ -3187,6 +3187,22 @@ int main(int argc, char *argv[])
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
raw_pdu(0x01, 0x16, 0x0f, 0xf0, 0x01));

+ define_test_server("/TP/GAW/SR/BI-08-C/small", test_server,
+ ts_small_db, NULL,
+ raw_pdu(0x03, 0x00, 0x02),
+ raw_pdu(0x16, 0x05, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
+ raw_pdu(0x01, 0x16, 0x05, 0x00, 0x03));
+
+ define_test_server("/TP/GAW/SR/BI-08-C/large-1", test_server,
+ ts_large_db_1, NULL,
+ raw_pdu(0x03, 0x00, 0x02),
+ raw_pdu(0x16, 0x73, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
+ raw_pdu(0x01, 0x16, 0x73, 0x00, 0x03));
+
define_test_client("/TP/GAW/CL/BV-08-C", test_client, service_db_1,
&test_write_7,
SERVICE_DATA_1_PDUS,
--
1.9.1


2015-03-13 06:34:44

by Gowtham Anandha Babu

[permalink] [raw]
Subject: [PATCH 5/7] unit/test-gatt: Add TP/GAW/SR/BI-25-C test

Verify that a Generic Attribute Profile server can detect a Write
long characteristic descriptor Request with an invalid characteristic
handle and issue an Invalid Handle Response.
---
unit/test-gatt.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)

diff --git a/unit/test-gatt.c b/unit/test-gatt.c
index 2b9039a..f1d7011 100644
--- a/unit/test-gatt.c
+++ b/unit/test-gatt.c
@@ -3303,5 +3303,21 @@ int main(int argc, char *argv[])
raw_pdu(0x18, 0x01),
raw_pdu(0x19));

+ define_test_server("/TP/GAW/SR/BI-25-C/small", test_server,
+ ts_small_db, NULL,
+ raw_pdu(0x03, 0x00, 0x02),
+ raw_pdu(0x16, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
+ raw_pdu(0x01, 0x16, 0x00, 0x00, 0x01));
+
+ define_test_server("/TP/GAW/SR/BI-25-C/large-1", test_server,
+ ts_large_db_1, NULL,
+ raw_pdu(0x03, 0x00, 0x02),
+ raw_pdu(0x16, 0x0f, 0xf0, 0x00, 0x00, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
+ raw_pdu(0x01, 0x16, 0x0f, 0xf0, 0x01));
+
return tester_run();
}
--
1.9.1


2015-03-13 06:34:45

by Gowtham Anandha Babu

[permalink] [raw]
Subject: [PATCH 6/7] unit/test-gatt: Add TP/GAW/SR/BI-26-C test

Verify that a Generic Attribute Profile server can detect and reject
a Write long characteristic descriptor Request to a non-writeable
long characteristic descriptor and issue a Write Not Permitted Response.
---
unit/test-gatt.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)

diff --git a/unit/test-gatt.c b/unit/test-gatt.c
index f1d7011..93ee2c7 100644
--- a/unit/test-gatt.c
+++ b/unit/test-gatt.c
@@ -3319,5 +3319,21 @@ int main(int argc, char *argv[])
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
raw_pdu(0x01, 0x16, 0x0f, 0xf0, 0x01));

+ define_test_server("/TP/GAW/SR/BI-26-C/small", test_server,
+ ts_small_db, NULL,
+ raw_pdu(0x03, 0x00, 0x02),
+ raw_pdu(0x16, 0x13, 0xf0, 0x00, 0x00, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
+ raw_pdu(0x01, 0x16, 0x13, 0xf0, 0x03));
+
+ define_test_server("/TP/GAW/SR/BI-26-C/large-1", test_server,
+ ts_large_db_1, NULL,
+ raw_pdu(0x03, 0x00, 0x02),
+ raw_pdu(0x16, 0x04, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
+ raw_pdu(0x01, 0x16, 0x04, 0x00, 0x03));
+
return tester_run();
}
--
1.9.1


2015-03-13 06:34:43

by Gowtham Anandha Babu

[permalink] [raw]
Subject: [PATCH 4/7] unit/test-gatt: Add TP/GAW/SR/BV-09-C test

Verify that a Generic Attribute Profile server can support writing
a long characteristic descriptor selected by handle.
---
unit/test-gatt.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

diff --git a/unit/test-gatt.c b/unit/test-gatt.c
index 22bfe44..2b9039a 100644
--- a/unit/test-gatt.c
+++ b/unit/test-gatt.c
@@ -3275,5 +3275,33 @@ int main(int argc, char *argv[])
raw_pdu(0x12, 0x04, 0x00, 0x01, 0x02, 0x03),
raw_pdu(0x01, 0x12, 0x04, 0x00, 0x03));

+ define_test_server("/TP/GAW/SR/BV-09-C/small", test_server,
+ ts_small_db, NULL,
+ raw_pdu(0x03, 0x00, 0x02),
+ raw_pdu(0x16, 0x04, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
+ raw_pdu(0x17, 0x04, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
+ raw_pdu(0x16, 0x04, 0x00, 0x3f, 0x00, 0xff),
+ raw_pdu(0x17, 0x04, 0x00, 0x3f, 0x00, 0xff),
+ raw_pdu(0x18, 0x01),
+ raw_pdu(0x19));
+
+ define_test_server("/TP/GAW/SR/BV-09-C/large-1", test_server,
+ ts_large_db_1, NULL,
+ raw_pdu(0x03, 0x00, 0x02),
+ raw_pdu(0x16, 0x83, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
+ raw_pdu(0x17, 0x83, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
+ raw_pdu(0x16, 0x83, 0x00, 0x3f, 0x00, 0xff),
+ raw_pdu(0x17, 0x83, 0x00, 0x3f, 0x00, 0xff),
+ raw_pdu(0x18, 0x01),
+ raw_pdu(0x19));
+
return tester_run();
}
--
1.9.1


2015-03-13 06:34:41

by Gowtham Anandha Babu

[permalink] [raw]
Subject: [PATCH 2/7] unit/test-gatt: Add TP/GAW/SR/BI-07-C test

From: Bharat Panda <[email protected]>

Verify that a Generic Attribute Profile server can detect a Write
Long Characteristic Request with an invalid characteristic handle
and issue an Invalid Handle Response.
---
unit/test-gatt.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)

diff --git a/unit/test-gatt.c b/unit/test-gatt.c
index 7578ddf..5e79293 100644
--- a/unit/test-gatt.c
+++ b/unit/test-gatt.c
@@ -3171,6 +3171,22 @@ int main(int argc, char *argv[])
raw_pdu(0x18, 0x01),
raw_pdu(0x19));

+ define_test_server("/TP/GAW/SR/BI-07-C/small", test_server,
+ ts_small_db, NULL,
+ raw_pdu(0x03, 0x00, 0x02),
+ raw_pdu(0x16, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
+ raw_pdu(0x01, 0x16, 0x00, 0x00, 0x01));
+
+ define_test_server("/TP/GAW/SR/BI-07-C/large-1", test_server,
+ ts_large_db_1, NULL,
+ raw_pdu(0x03, 0x00, 0x02),
+ raw_pdu(0x16, 0x0f, 0xf0, 0x00, 0x00, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
+ raw_pdu(0x01, 0x16, 0x0f, 0xf0, 0x01));
+
define_test_client("/TP/GAW/CL/BV-08-C", test_client, service_db_1,
&test_write_7,
SERVICE_DATA_1_PDUS,
--
1.9.1


2015-03-13 06:34:40

by Gowtham Anandha Babu

[permalink] [raw]
Subject: [PATCH 1/7] unit/test-gatt: Add TP/GAW/SR/BV-05-C test

From: Bharat Panda <[email protected]>

Verify that a Generic Attribute Profile server can support writing
a long Characteristic Value selected by handle.
---
unit/test-gatt.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

diff --git a/unit/test-gatt.c b/unit/test-gatt.c
index 1babe11..7578ddf 100644
--- a/unit/test-gatt.c
+++ b/unit/test-gatt.c
@@ -3143,6 +3143,34 @@ int main(int argc, char *argv[])
raw_pdu(0x12, 0x04, 0x00, 0x01, 0x02, 0x03),
raw_pdu(0x01, 0x12, 0x04, 0x00, 0x03));

+ define_test_server("/TP/GAW/SR/BV-05-C/small", test_server,
+ ts_small_db, NULL,
+ raw_pdu(0x03, 0x00, 0x02),
+ raw_pdu(0x16, 0x03, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
+ raw_pdu(0x17, 0x03, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
+ raw_pdu(0x16, 0x03, 0x00, 0x3f, 0x00, 0xff),
+ raw_pdu(0x17, 0x03, 0x00, 0x3f, 0x00, 0xff),
+ raw_pdu(0x18, 0x01),
+ raw_pdu(0x19));
+
+ define_test_server("/TP/GAW/SR/BV-05-C/large-1", test_server,
+ ts_large_db_1, NULL,
+ raw_pdu(0x03, 0x00, 0x02),
+ raw_pdu(0x16, 0x82, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
+ raw_pdu(0x17, 0x82, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff),
+ raw_pdu(0x16, 0x82, 0x00, 0x3f, 0x00, 0xff),
+ raw_pdu(0x17, 0x82, 0x00, 0x3f, 0x00, 0xff),
+ raw_pdu(0x18, 0x01),
+ raw_pdu(0x19));
+
define_test_client("/TP/GAW/CL/BV-08-C", test_client, service_db_1,
&test_write_7,
SERVICE_DATA_1_PDUS,
--
1.9.1