aboutsummaryrefslogtreecommitdiffstats
path: root/tests/msc_vlr
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2017-08-22 18:06:42 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2017-08-22 18:13:54 +0200
commit05230eac4a78bb6592299e07d2ebcb491d78887c (patch)
treef55f161e21fc6fb3deed9dfeb768ab9bb798e471 /tests/msc_vlr
parent84da6b1edb806ac0d7b8a0c40c80f83c4b1d92b9 (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: I8a50e8963dce80609749571b61fc6ffe1c54660c
Diffstat (limited to 'tests/msc_vlr')
-rw-r--r--tests/msc_vlr/msc_vlr_tests.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c
index 28201d05b..2049e9f8e 100644
--- a/tests/msc_vlr/msc_vlr_tests.c
+++ b/tests/msc_vlr/msc_vlr_tests.c
@@ -242,8 +242,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;