[PATCH libosmocore 5/8] smscb: add test-case for reassembling a normal message
Alex Badea
vamposdecampos at gmail.com
Sat Jan 5 20:26:29 CET 2013
Signed-off-by: Alex Badea <vamposdecampos at gmail.com>
---
tests/smscb/smscb_test.c | 21 +++++++++++++++++++++
tests/smscb/smscb_test.ok | 3 +++
2 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/tests/smscb/smscb_test.c b/tests/smscb/smscb_test.c
index 80cf69c..9948f5f 100644
--- a/tests/smscb/smscb_test.c
+++ b/tests/smscb/smscb_test.c
@@ -45,6 +45,27 @@ static uint8_t smscb_test_messages[][23] = {
0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
},
+ /* 4 blocks with a normal message */
+ {
+ 0x20, 0x00, 0x70, 0x00, 0x32, 0x01, 0x11, 0x3c,
+ 0xaa, 0xaf, 0xd1, 0x68, 0x34, 0x1a, 0x8d, 0x46,
+ 0xa3, 0xd1, 0x68, 0x34, 0x1a, 0x8d, 0x46,
+ },
+ {
+ 0x21, 0xa3, 0xd1, 0x68, 0x34, 0x1a, 0x8d, 0x46,
+ 0xa3, 0xd1, 0x68, 0x34, 0x1a, 0x8d, 0x46, 0xa3,
+ 0xd1, 0x68, 0x34, 0x1a, 0x8d, 0x46, 0xa3,
+ },
+ {
+ 0x22, 0xd1, 0x68, 0x34, 0x1a, 0x8d, 0x46, 0xa3,
+ 0xd1, 0x68, 0x34, 0x1a, 0x8d, 0x46, 0xa3, 0xd1,
+ 0x68, 0x34, 0x1a, 0x8d, 0x46, 0xa3, 0xd1,
+ },
+ {
+ 0x23, 0x68, 0x34, 0x1a, 0x8d, 0x46, 0xa3, 0xd1,
+ 0x68, 0x34, 0x1a, 0x8d, 0x46, 0xa3, 0xd1, 0x68,
+ 0x34, 0x1a, 0x8d, 0x46, 0xa3, 0xd1, 0x00,
+ },
};
static int l3_cb(struct msgb *msg, struct smscb_entity *se, void *ctx)
diff --git a/tests/smscb/smscb_test.ok b/tests/smscb/smscb_test.ok
index 5954fc6..c4dd4b8 100644
--- a/tests/smscb/smscb_test.ok
+++ b/tests/smscb/smscb_test.ok
@@ -5,3 +5,6 @@
smscb l3 cb
cmd_type: 15
cbmsg:
+smscb l3 cb
+cmd_type: 0
+cbmsg: 00 70 00 32 01 11 3c aa af d1 68 34 1a 8d 46 a3 d1 68 34 1a 8d 46 a3 d1 68 34 1a 8d 46 a3 d1 68 34 1a 8d 46 a3 d1 68 34 1a 8d 46 a3 d1 68 34 1a 8d 46 a3 d1 68 34 1a 8d 46 a3 d1 68 34 1a 8d 46 a3 d1 68 34 1a 8d 46 a3 d1 68 34 1a 8d 46 a3 d1 68 34 1a 8d 46 a3 d1 00
--
1.7.0.4
More information about the baseband-devel
mailing list