aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests/gbproxy/gbproxy_test.c
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2014-09-19 16:40:21 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-10-09 17:47:30 +0200
commit51fde08b0759287b2d74ecf858925553ed915f2f (patch)
tree772db4620f93447661bebf2794151cbbcc84e537 /openbsc/tests/gbproxy/gbproxy_test.c
parentc6807c4405d6dcc42d9dab23fa5f259464fdfc32 (diff)
gbproxy/test: Fix time calculation in test_gbproxy_tlli_expire()
A single test case still uses time() to obtain the reference time. This commit fixes this by using the 'now' variable instead, that contains a fixed time value and does therefore not depend on when the test is executed. Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/tests/gbproxy/gbproxy_test.c')
-rw-r--r--openbsc/tests/gbproxy/gbproxy_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/tests/gbproxy/gbproxy_test.c b/openbsc/tests/gbproxy/gbproxy_test.c
index 6ac1ae902..df7b22ead 100644
--- a/openbsc/tests/gbproxy/gbproxy_test.c
+++ b/openbsc/tests/gbproxy/gbproxy_test.c
@@ -3780,7 +3780,7 @@ static void test_gbproxy_tlli_expire(void)
register_tlli(peer, tlli2, imsi2, ARRAY_SIZE(imsi2), now);
OSMO_ASSERT(peer->patch_state.logical_link_count == 2);
- num_removed = gbproxy_remove_stale_link_infos(peer, time(NULL) + 2);
+ num_removed = gbproxy_remove_stale_link_infos(peer, now + 2);
OSMO_ASSERT(num_removed == 1);
OSMO_ASSERT(peer->patch_state.logical_link_count == 1);