[MERGED] osmo-msc[master]: fix msc_vlr tests after libosmocore uses localtime for SMS

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/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Tue Aug 22 16:48:28 UTC 2017


Neels Hofmeyr has submitted this change and it was merged.

Change subject: fix msc_vlr tests after libosmocore uses localtime for SMS
......................................................................


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
---
M tests/msc_vlr/msc_vlr_tests.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c
index 28201d0..2049e9f 100644
--- a/tests/msc_vlr/msc_vlr_tests.c
+++ b/tests/msc_vlr/msc_vlr_tests.c
@@ -242,8 +242,8 @@
 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;

-- 
To view, visit https://gerrit.osmocom.org/3581
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8a50e8963dce80609749571b61fc6ffe1c54660c
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list