summaryrefslogtreecommitdiffstats
path: root/tests/abis/abis_test.ok
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2017-03-24 20:16:33 +0100
committerMax <msuraev@sysmocom.de>2017-04-28 08:45:09 +0000
commitf74cfd35acadbebe7ccd9fc02d05920958f43ad3 (patch)
tree77392c943c0633674807e1a311428d78221b8623 /tests/abis/abis_test.ok
parent8a4895c0e5de4f04b5de85ed6bbae60edca3df9c (diff)
Add SW Description (de)marshalling
* data structure representing 3GPP TS 52.021 ยง9.4.62 SW Description * function to serialize it into msgb * function to deserialize it from buffer * functions to extract/estimate buffer size for SW Description * test harness (partially taken from OpenBSC) There are several similar functions to deal with SW Description in OpenBSC, there's also need to use similar functionality in OsmoBTS. Hence it's better to put the code into common library with proper tests and documentation. Change-Id: Ib63b6b5e83b8914864fc7edd789f8958cdc993cd Related: OS#1614
Diffstat (limited to 'tests/abis/abis_test.ok')
-rw-r--r--tests/abis/abis_test.ok41
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/abis/abis_test.ok b/tests/abis/abis_test.ok
new file mode 100644
index 00000000..e6b626be
--- /dev/null
+++ b/tests/abis/abis_test.ok
@@ -0,0 +1,41 @@
+Testing SW Description (de)serialization...
+msgb[4096] :: {msgb->len} 45 == 45 {len} - ok]:
+ SW DESCR (with header)
+ length: {extracted} 45 = 45 {expected} - OK, failsafe - OK
+ FILE ID [8 == 8 -> 1, ok] 0 => OK
+ FILE VERSION [30 == 30 -> 1, ok] 0 => OK
+msgb[4096] :: {msgb->len} 44 == 44 {len} - ok]:
+ SW DESCR (without header)
+ length: {extracted} 44 = 44 {expected} - OK, failsafe - OK
+ FILE ID [8 == 8 -> 1, ok] 0 => OK
+ FILE VERSION [30 == 30 -> 1, ok] 0 => OK
+msgb[4096] :: {msgb->len} 89 == 45 {len} - fail]:
+ SW DESCR (expected failure)
+ length: {extracted} 44 = 89 {expected} - FAIL, failsafe - OK
+ FILE ID [8 == 8 -> 1, ok] 0 => OK
+ FILE VERSION [30 == 30 -> 1, ok] 0 => OK
+parsing chained 42 12 00 03 01 02 03 13 00 03 03 04 05 <1st: 13, total: 13>
+ SW Descr (half)
+ FILE ID: [3] 01 02 03 => OK
+ FILE VERSION: [3] 03 04 05 => OK
+parsing chained 42 12 00 03 01 02 03 13 00 03 03 04 05 42 12 00 03 09 07 05 13 00 03 06 07 08 <1st: 13, total: 26>
+ SW Descr (full)
+ FILE ID: [3] 01 02 03 => OK
+ FILE VERSION: [3] 03 04 05 => OK
+parsing chained 42 12 00 03 09 07 05 13 00 03 06 07 08 <1st: 13, total: 13>
+ SW Descr ( 2nd)
+ FILE ID: [3] 09 07 05 => OK
+ FILE VERSION: [3] 06 07 08 => OK
+len: 13
+file_id: 01 02 03
+file_ver: 03 04 05
+test_simple_sw_config(): OK
+test_simple_sw_short(): OK
+len: 13
+file_id: 01 02 03
+file_ver: 03 04 05
+len: 13
+file_id: 09 07 05
+file_ver: 06 07 08
+test_dual_sw_config(): OK
+OK.