gtphub: make test code reusable for future tests.

Generalize to make the PDP ctx message definitions and "sending" of messages
from SGSN->gtphub->GGSN and back reusable in future tests.

Publish gsn_addr_from_sockaddr() in gtphub.h for use in gtphub_test.c.

Use an osmo_sockaddr for resolved_ggsn_addr, because one is needed for
comparison in probably every future test.

Add LVL2_ASSERT() to print assertion message and return instead of abort,
so that functions can be called from several tests without losing the
info of which test caused it from which line.

Use globals for struct gtphub and time_t now, to reduce nr of args that need to
be passed around when writing tests. Add a default test setup function.

Sponsored-by: On-Waves ehi
3 files changed
tree: ff722434292655148823d181ccff2b59e2f73be1
  1. debian/
  2. hlrsync/
  3. linux-kernel/
  4. openbsc/
  5. wireshark/
  6. .gitignore