diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-08-22 18:53:40 +0200 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-08-22 18:53:40 +0200 |
commit | a277769b657ad2065f8625626e0f81842f7e91b3 (patch) | |
tree | 187bdfb1ff33dc227b5fc74c7628063ccd6c046b | |
parent | 4e73ea88cd463246f8ee95ba5b9e31bdd693d804 (diff) |
fix msc_vlr tests after libosmocore uses localtime for SMS
libosmocore change-id I4efdb1eaae43aced33961b64d4f14b0040321c10 changes the
gsm340_gen_scts() from gmtime to localtime, meaning that by feeding a mere zero
as timestamp, we get different results depending on the local machine's
timezone setting. Instead of calling gsm340_gen_scts() with zero, simply write
a bunch of bytes as time so that the tests get identical SMS bytes every time.
Change-Id: I8a980535ac3e538676ad23d2eccc368bb8b57759
-rw-r--r-- | openbsc/tests/msc_vlr/msc_vlr_tests.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsc/tests/msc_vlr/msc_vlr_tests.c b/openbsc/tests/msc_vlr/msc_vlr_tests.c index 4af4e1bde..49a85c367 100644 --- a/openbsc/tests/msc_vlr/msc_vlr_tests.c +++ b/openbsc/tests/msc_vlr/msc_vlr_tests.c @@ -259,8 +259,8 @@ int __wrap_RAND_bytes(unsigned char *buf, int num) void __real_gsm340_gen_scts(uint8_t *scts, time_t time); void __wrap_gsm340_gen_scts(uint8_t *scts, time_t time) { - /* Remove the time to encode for deterministic test results */ - __real_gsm340_gen_scts(scts, 0); + /* Write fixed time bytes for deterministic test results */ + osmo_hexparse("07101000000000", scts, 7); } const char *paging_expecting_imsi = NULL; |