2021-11-23 13:18:44 +00:00
|
|
|
AT_INIT
|
|
|
|
AT_BANNER([Regression tests.])
|
libosmo-gtlv: add generic TLV de- and encoder
An all new TLV parser supporting:
- Any size of T and L (determined by callback function),
- "Grouped IEs", so that an IE payload is a nested IE structure,
- optional/mandatory/multi-occurence IEs,
- decoding unordered tags (or enforcing strict order).
Will be used for PFCP message decoding and encoding, a T16L16V protocol
which requires above features.
Upcoming patches add
- translating PDUs to plain C structs and vice versa
- TLV generator to reduce repetition a in protocol definition
- TLIV capability
Previously, the way we deal with TLVs causes a lot of code
re-implementation: the TL decoding is taken care of by the API, but for
encoding, we essentially re-implement each protocol and each encoded
message in the individual programs. This API is an improvement in that
we only once implement the TL coding (or just use osmo_t8l8v_cfg /
osmo_t16l16v_cfg), get symmetric de- and encoding of the TL, and only
need to deal with the value part of each IE.
The common pattern of
- store TL preliminarily,
- write V data and
- update L after V is complete
is conveniently done by osmo_gtlv_put_update_tl().
Related: SYS#5599
Change-Id: Ib0fd00d9f288ffe13b7e67701f3e47073587404a
2022-01-12 01:38:39 +00:00
|
|
|
|
|
|
|
AT_SETUP([gtlv])
|
|
|
|
AT_KEYWORDS([gtlv])
|
|
|
|
cat $abs_srcdir/libosmo-gtlv/gtlv_test.ok > expout
|
|
|
|
AT_CHECK([$abs_top_builddir/tests/libosmo-gtlv/gtlv_test], [], [expout], [ignore])
|
|
|
|
AT_CLEANUP
|
2022-01-12 01:57:58 +00:00
|
|
|
|
|
|
|
AT_SETUP([gtlv_dec_enc])
|
|
|
|
AT_KEYWORDS([gtlv_dec_enc])
|
|
|
|
cat $abs_srcdir/libosmo-gtlv/gtlv_dec_enc_test.ok > expout
|
|
|
|
AT_CHECK([$abs_top_builddir/tests/libosmo-gtlv/gtlv_dec_enc_test], [], [expout], [ignore])
|
|
|
|
AT_CLEANUP
|
2022-01-12 01:58:02 +00:00
|
|
|
|
|
|
|
AT_SETUP([gtlv_gen])
|
|
|
|
AT_KEYWORDS([gtlv_gen])
|
|
|
|
cat $abs_srcdir/libosmo-gtlv/test_gtlv_gen/gtlv_gen_test.ok > expout
|
|
|
|
AT_CHECK([$abs_top_builddir/tests/libosmo-gtlv/test_gtlv_gen/gtlv_gen_test], [], [expout], [ignore])
|
|
|
|
AT_CLEANUP
|
2022-03-14 15:38:15 +00:00
|
|
|
|
|
|
|
AT_SETUP([tliv])
|
|
|
|
AT_KEYWORDS([tliv])
|
|
|
|
cat $abs_srcdir/libosmo-gtlv/test_tliv/tliv_test.ok > expout
|
|
|
|
AT_CHECK([$abs_top_builddir/tests/libosmo-gtlv/test_tliv/tliv_test], [], [expout], [ignore])
|
|
|
|
AT_CLEANUP
|
2022-03-17 13:56:28 +00:00
|
|
|
|
|
|
|
AT_SETUP([pfcp])
|
|
|
|
AT_KEYWORDS([pfcp])
|
|
|
|
cat $abs_srcdir/libosmo-pfcp/pfcp_test.ok > expout
|
|
|
|
AT_CHECK([$abs_top_builddir/tests/libosmo-pfcp/pfcp_test], [], [expout], [ignore])
|
|
|
|
AT_CLEANUP
|