OSDN Git Service

unit/test-gatt: Fix long write testcases
authorŁukasz Rymanowski <lukasz.rymanowski@codecoup.pl>
Fri, 18 Mar 2016 13:08:10 +0000 (14:08 +0100)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 22 Mar 2016 11:41:52 +0000 (13:41 +0200)
Idea of long write is that each part of data is continuation
of previous one. There shall be not gaps in the offsets between.

If there are gaps in offset then we have reliable write rather than
long write

unit/test-gatt.c

index 944bfba..dfa9fa4 100644 (file)
@@ -3852,8 +3852,8 @@ int main(int argc, char *argv[])
                        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(0x16, 0x03, 0x00, 0x12, 0x00, 0xff),
+                       raw_pdu(0x17, 0x03, 0x00, 0x12, 0x00, 0xff),
                        raw_pdu(0x18, 0x01),
                        raw_pdu(0x19));
 
@@ -3866,8 +3866,8 @@ int main(int argc, char *argv[])
                        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(0x16, 0x82, 0x00, 0x12, 0x00, 0xff),
+                       raw_pdu(0x17, 0x82, 0x00, 0x12, 0x00, 0xff),
                        raw_pdu(0x18, 0x01),
                        raw_pdu(0x19));
 
@@ -4374,8 +4374,8 @@ int main(int argc, char *argv[])
                        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(0x16, 0x04, 0x00, 0x12, 0x00, 0xff),
+                       raw_pdu(0x17, 0x04, 0x00, 0x12, 0x00, 0xff),
                        raw_pdu(0x18, 0x01),
                        raw_pdu(0x19));
 
@@ -4388,8 +4388,8 @@ int main(int argc, char *argv[])
                        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(0x16, 0x83, 0x00, 0x12, 0x00, 0xff),
+                       raw_pdu(0x17, 0x83, 0x00, 0x12, 0x00, 0xff),
                        raw_pdu(0x18, 0x01),
                        raw_pdu(0x19));