[PATCH 0/7] Introduce MM Auth test suite and fix two issues

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Neels Hofmeyr nhofmeyr at sysmocom.de
Sat Mar 26 20:35:32 UTC 2016


Though MM Auth might be tested implicitly, it is acutely lacking a dedicated
test suite. I found two problems in the MM Auth logic, and to have regression
tests for those, I need an actual test suite.

So, at first I add a bread-and-butter test suite for MM Auth. Then, I
cosmetically improve use of constants in return values. Finally, I fix the two
issues with reflection in the new tests.

Neels Hofmeyr (7):
  Add MM Auth test; add auth_action_str() function
  MM Auth test: add two tests for AUTH_THEN_CIPH
  MM Auth test: add test to re-use existing auth
  MM Auth: introduce AUTH_ERROR constant.
  MM Auth: return AUTH_NOT_AVAIL instead of hardcoded zero
  Fix MM Auth: disallow key_seq mismatch
  Fix MM Auth: zero-initialize auth tuple before first use

 openbsc/.gitignore                    |   1 +
 openbsc/configure.ac                  |   1 +
 openbsc/include/openbsc/auth.h        |  18 ++
 openbsc/src/libmsc/auth.c             |  24 ++-
 openbsc/tests/Makefile.am             |   2 +-
 openbsc/tests/mm_auth/Makefile.am     |  21 +++
 openbsc/tests/mm_auth/mm_auth_test.c  | 340 ++++++++++++++++++++++++++++++++++
 openbsc/tests/mm_auth/mm_auth_test.ok |  40 ++++
 openbsc/tests/testsuite.at            |   7 +
 9 files changed, 446 insertions(+), 8 deletions(-)
 create mode 100644 openbsc/tests/mm_auth/Makefile.am
 create mode 100644 openbsc/tests/mm_auth/mm_auth_test.c
 create mode 100644 openbsc/tests/mm_auth/mm_auth_test.ok

-- 
2.1.4




More information about the OpenBSC mailing list