[PATCH libosmocore 6/8] smscb: add test-case for reassembling a Schedule message

Alex Badea vamposdecampos at gmail.com
Sat Jan 5 19:26:30 UTC 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 9948f5f..779c2af 100644
--- a/tests/smscb/smscb_test.c
+++ b/tests/smscb/smscb_test.c
@@ -66,6 +66,27 @@ static uint8_t smscb_test_messages[][23] = {
 		0x68, 0x34, 0x1a, 0x8d,  0x46, 0xa3, 0xd1, 0x68,
 		0x34, 0x1a, 0x8d, 0x46,  0xa3, 0xd1, 0x00,
 	},
+	/* 4 blocks with a Schedule message */
+	{
+		0x28, 0x01, 0x1f, 0x00,  0x00, 0x00, 0x00, 0x00,
+		0x00, 0x80, 0x32, 0x40,  0x40, 0x40, 0x01, 0x40,
+		0x40, 0x40, 0x01, 0x40,  0x40, 0x40, 0x01,
+	},
+	{
+		0x21, 0x40, 0x40, 0x40,  0x01, 0x40, 0x40, 0x40,
+		0x01, 0x40, 0x40, 0x40,  0x01, 0x40, 0x40, 0x40,
+		0x01, 0x40, 0x40, 0x2b,  0x2b, 0x2b, 0x2b,
+	},
+	{
+		0x22, 0x2b, 0x2b, 0x2b,  0x2b, 0x2b, 0x2b, 0x2b,
+		0x2b, 0x2b, 0x2b, 0x2b,  0x2b, 0x2b, 0x2b, 0x2b,
+		0x2b, 0x2b, 0x2b, 0x2b,  0x2b, 0x2b, 0x2b,
+	},
+	{
+		0x23, 0x2b, 0x2b, 0x2b,  0x2b, 0x2b, 0x2b, 0x2b,
+		0x2b, 0x2b, 0x2b, 0x2b,  0x2b, 0x2b, 0x2b, 0x2b,
+		0x2b, 0x2b, 0x2b, 0x2b,  0x2b, 0x2b, 0x2b,
+	},
 };
 
 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 c4dd4b8..f28ab5b 100644
--- a/tests/smscb/smscb_test.ok
+++ b/tests/smscb/smscb_test.ok
@@ -8,3 +8,6 @@ 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 
+smscb l3 cb
+cmd_type: 8
+cbmsg:	01 1f 00 00 00 00 00 00 80 32 40 40 40 01 40 40 40 01 40 40 40 01 40 40 40 01 40 40 40 01 40 40 40 01 40 40 40 01 40 40 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 
-- 
1.7.0.4





More information about the baseband-devel mailing list