msc_vlr_tests patches

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/.

Max msuraev at sysmocom.de
Tue Feb 13 13:17:17 UTC 2018


Hi.


On 12.02.2018 16:23, Neels Hofmeyr wrote:
> thanks for looking at the msc_vlr_tests.c. That 'while (0)' was a curious
> artifact indeed :)

I didn't even thought it's a valid C code :)

> The reason why I wanted that number output only in verbose mode is, I don't
> want to adjust unrelated *.err output when adding a test in any position that
> is not the last.

Curious. When would we want to do that? I assumed tests are independent 
of each other. That's not the case?

> 2) pass IMSI as param / print the IMSI.
>
> The IMSI used in the tests is (incidentally) the same throughout the tests and
> doesn't really need to change in any way. It is but a local variable that
> ensures there are no string constant typos within a test function.  It mayybe
> could be one or more global string constants, but doesn't make sense as a
> parameter passed to each and every test: some tests also (might) use two IMSIs.
> Running the same tests with differing IMSIs is not needed, and I don't see a
> patch introducing that. What was the idea there to justify the bloat?

The idea is to make IMSI into actual parameter so it would be easy to 
introduce tests with different edge cases - shorter-than-normal, 
longer-than-normal IMSI etc. It have not materialized (yet?) though due 
to way too many hardcoded hex strings in tests.

> 3) you moved gsm_network creation into a separate function, but that function
> is still called only once. So it's just cosmetic, or was there another purpose?
>
See above.

-- 
- Max Suraev <msuraev at sysmocom.de>       http://www.sysmocom.de/
=======================================================================
* sysmocom - systems for mobile communications GmbH
* Alt-Moabit 93
* 10559 Berlin, Germany
* Sitz / Registered office: Berlin, HRB 134158 B
* Geschaeftsfuehrer / Managing Directors: Harald Welte




More information about the OpenBSC mailing list